Send a bunch of zero-bytes to the YubiHSM, and flush the input buffer.
1072
def reset(stick):
    
    nulls = (pyhsm.defines.YSM_MAX_PKT_SIZE - 1) * '\x00'
    res = YHSM_Cmd(stick, pyhsm.defines.YSM_NULL, payload = nulls).execute(read_response = False)
    unlock = stick.acquire()
    try:
        stick.drain()
        stick.flush()
    finally:
        unlock()
    return res == 0
1288680
def flush(self, multithread=True, **kwargs):
        '''
        
        '''
        if self._write_buf.tell() > 0:
            data = self._write_buf.getvalue()
            self._write_buf = BytesIO()

            if multithread:
                self._async_upload_part_request(data, index=self._cur_part, **kwargs)
            else:
                self.upload_part(data, self._cur_part, **kwargs)

            self._cur_part += 1

        if len(self._http_threadpool_futures) > 0:
            dxpy.utils.wait_for_all_futures(self._http_threadpool_futures)
            try:
                for future in self._http_threadpool_futures:
                    if future.exception() != None:
                        raise future.exception()
            finally:
                self._http_threadpool_futures = set()
1136513
function flush() {
		output += buffer;
		output += character;
		buffer = '';
		supercall = false;
		methodname = false;
		superargs = false;
	}
696212
def flush(self):
        """"""
        if self._wbuf:
            buffer = ''.join(self._wbuf)
            self._wbuf = []
            self.write(buffer)
115722
public function flushBuffer() {
        $content = $this->format($this->buffer->flush());

        if ( ! $this->is(OutputVerbosity::SILENT)) {
            fwrite($this->getOutputStream(), $content);
        }
    }
212334
def flush():
    """"""
    try:
        sys.stdout.flush()
        sys.stderr.flush()
    except (AttributeError, ValueError, IOError):
        pass  # unsupported
    try:
        libc.fflush(None)
    except (AttributeError, ValueError, IOError):
        pass
830130
def send(self, data):
        
        self.stdin.write(data)
        self.stdin.flush()
1137637
def flush(self, error=False, prompt=False):
        """"""
        # Fix for Issue 2452 
        if PY3:
            try:
                text = "".join(self.__buffer)
            except TypeError:
                text = b"".join(self.__buffer)
                try:
                    text = text.decode( locale.getdefaultlocale()[1] )
                except:
                    pass
        else:
            text = "".join(self.__buffer)

        self.__buffer = []
        self.insert_text(text, at_end=True, error=error, prompt=prompt)
        QCoreApplication.processEvents()
        self.repaint()
        # Clear input buffer:
        self.new_input_line = True
1326505
def flush_records(self):
        
        s = b"".join(p.raw_stateful() for p in self.buffer_out)
        self.socket.send(s)
        self.buffer_out = []
699417
public void flushBuffer() throws IOException {
        if (mCompressedSegments != 0) {
            throw new IOException("cannot flush a compressed buffer");
        }
        
        // marked the stream as having been previously flushed to avoid
        // attempting to compress the stream after the fact
        mFlushed = true;
        
        // write the internal buffer to the output stream and then clear any
        // data in the internal buffer to avoid duplicated data.
        ByteBuffer bytes = mBuffer;
        OutputStream out = super.getOutputStream();
        bytes.writeTo(out);
        bytes.clear();
        
        super.flushBuffer();
    }
727194
def flush(self):
        
        self._write_all(self._wbuffer.getvalue())
        self._wbuffer = BytesIO()
        return
1319800
void flush(OutputStream out, String encoding)
         throws IOException
    {
        flush(new OutputStreamWriter(out,encoding));
    }
357254
private void flushData() {
    byte[] data = Arrays.copyOf(pendingBuffer, pendingLength);
    pendingLength = 0;
    handler.onData(data);
  }
729633
def _flush_bits_to_stream(self):
        
        if len(self._bits) == 0:
            return 0

        bits = list(self._bits)

        diff = 8 - (len(bits) % 8)
        padding = [0] * diff

        bits = bits + padding

        self._stream.write(bits_to_bytes(bits))

        self._bits.clear()
65237
def send(self, sock, msg):
    """"""
    data = pickle.dumps(msg)
    buf = struct.pack('>I', len(data)) + data
    sock.sendall(buf)
263171
public void flush() throws IOException {
        for (int i = curBit; i < 8; i++) {
            curByte[i] = 0;
        }
        curBit = 0;
        writeCurByte();
    }
119573
def flush(self):
        
        self._write_all(self._wbuffer.getvalue())
        self._wbuffer = StringIO()
        return