if there is existing frame data, sends a frame with nothing in it
340840
function () {
      if (!this.recording || this.recording.blank()) return;
      var finalFrame = this.recording.cloneCurrentFrame();
      finalFrame.hands = [];
      finalFrame.fingers = [];
      finalFrame.pointables = [];
      finalFrame.tools = [];
      this.sendImmediateFrame(finalFrame);
    }
1038960
def is_null(value, msg=None, except_=None):
    '''
    
    '''
    # dataframes, even if empty, are not considered null
    value = False if hasattr(value, 'empty') else value
    result = bool(
        value is None or
        value != value or
        repr(value) == 'NaT')
    if except_:
        return is_true(result, msg=msg, except_=except_)
    else:
        return bool(result)
137432
def _raise_error_if_sframe_empty(dataset, variable_name="SFrame"):
    
    err_msg = "Input %s either has no rows or no columns. A non-empty SFrame "
    err_msg += "is required."

    if dataset.num_rows() == 0 or dataset.num_columns() == 0:
        raise ToolkitError(err_msg % variable_name)
117690
def get_frame(self, outdata, frames, timedata, status):
		

		if not self.keep_listening:
			raise sd.CallbackStop
		
		try:
			chunk = self.queue.get_nowait()
			# Check if the chunk contains the expected number of frames
			# The callback function raises a ValueError otherwise.
			if chunk.shape[0] == frames:
				outdata[:] = chunk
			else:
				outdata.fill(0)
		except Empty:
			outdata.fill(0)
579876
def preview_data_frame_transform(self, body, params=None):
        
        if body in SKIP_IN_PATH:
            raise ValueError("Empty value passed for a required argument 'body'.")
        return self.transport.perform_request(
            "POST", "/_data_frame/transforms/_preview", params=params, body=body
        )
912084
def process_frame(self, f, frame_str):
        
        frame_type = f.cmd.lower()

        if frame_type in ['disconnect']:
            return

        if frame_type == 'send':
            frame_type = 'message'
            f.cmd = 'MESSAGE'

        if frame_type in ['connected', 'message', 'receipt', 'error', 'heartbeat']:
            if frame_type == 'message':
                if f.headers['destination'] not in self.subscriptions.values():
                    return
                (f.headers, f.body) = self.notify('before_message', f.headers, f.body)
            self.notify(frame_type, f.headers, f.body)
        if 'receipt' in f.headers:
            receipt_frame = Frame('RECEIPT', {'receipt-id': f.headers['receipt']})
            lines = convert_frame(receipt_frame)
            self.send(encode(pack(lines)))
        log.debug("Received frame: %r, headers=%r, body=%r", f.cmd, f.headers, f.body)
749364
def _send_mbus(self, frame):
        
        # for auto_open mode, check TCP and open if need
        if self.__auto_open and not self.is_open():
            self.open()
        # send request
        bytes_send = self._send(frame)
        if bytes_send:
            if self.__debug:
                self._pretty_dump('Tx', frame)
            return bytes_send
        else:
            return None
1253807
def get_frame(self, in_data, frame_count, time_info, status):
		
		while self.keep_listening:
			try:
				frame = self.queue.get(False, timeout=queue_timeout)
				return (frame, pyaudio.paContinue)
			except Empty:
				pass
		return (None, pyaudio.paComplete)
505591
def dump_frames(self, frame):
        
        current_thread = threading.currentThread()
        frames = []
        frame_browser = frame
        
        # Browse the frame chain as far as we can
        _logger.f_debug("dump_frames(), frame analysis:")
        spacer = ""
        while hasattr(frame_browser, 'f_back') and frame_browser.f_back != self.frame_beginning:
            spacer += "="
            _logger.f_debug("%s>frame = %s, frame.f_code = %s, frame.f_back = %s, "
                            "self.frame_beginning = %s",
                            spacer,
                            hex(id(frame_browser)),
                            frame_browser.f_code,
                            hex(id(frame_browser.f_back)),
                            hex(id(self.frame_beginning)))

            # At root frame, globals == locals so we dump only globals
            if hasattr(frame_browser.f_back, 'f_back')\
                    and frame_browser.f_back.f_back != self.frame_beginning:
                locals_vars_list = self.extract_object_properties(frame_browser.f_locals,
                                                                  limit_size=True)
            else:
                locals_vars_list = []
                                
            globals_vars_list = self.extract_object_properties(frame_browser.f_globals,
                                                               limit_size=True)
            # normalize path sent to debugging client
            file_path = self.normalize_path_out(frame_browser.f_code.co_filename)

            frame_name = "%s() [%s]" % (frame_browser.f_code.co_name, current_thread.name,)
            remote_frame = {
                'id': id(frame_browser),
                'name': frame_name,
                'line_number': frame_browser.f_lineno,  # Warning 1 based
                'file_path': file_path,
                'f_locals': locals_vars_list + globals_vars_list,
                'thread': current_thread.ident,
                'thread_name': current_thread.name
            }
            frames.append(remote_frame)
            frame_browser = frame_browser.f_back
        return frames
1156751
def _recv_frameify(self, data):
        

        # Get the state and framer
        state = self._recv_framer_state
        framer = None

        # Grab off as many frames as we can
        frameify = None
        while True:
            # Check if we need to change framers
            if framer != self._recv_framer:
                # Notify the currently-running framer
                if frameify:
                    try:
                        frameify.throw(framers.FrameSwitch)
                    except StopIteration:
                        pass

                # Set up the new framer
                framer = self._recv_framer
                state._reset(framer)
                frameify = framer.frameify(state, data)
                data = ''  # Now part of the state's buffer

            # Get the next frame
            try:
                frame = frameify.next()
            except StopIteration:
                # OK, we've extracted as many frames as we can
                break

            # OK, send the frame to the application
            if self._application:
                self._application.recv_frame(frame)
1121136
def _send_streamify(self, frame):
        

        # Get the state and framer
        state = self._send_framer_state
        framer = self._send_framer

        # Reset the state as needed
        state._reset(framer)

        # Now pass the frame through streamify() and return the result
        return framer.streamify(state, frame)
1156797
boolean processNextFrame() throws IOException {
    try {
      reader.processNextFrame();
      return receivedCloseCode == -1;
    } catch (Exception e) {
      failWebSocket(e, null);
      return false;
    }
  }
1036139
def do_async_send(self):
        
        assert len(self.sendbuf)

        nwritten = self.sock.send(self.sendbuf)
        nframes = 0

        for entry in self.sendbuf_frames:
            frame, offset, callback = entry

            if offset <= nwritten:
                nframes += 1

                if callback:
                    callback()
            else:
                entry[1] -= nwritten

        self.sendbuf = self.sendbuf[nwritten:]
        self.sendbuf_frames = self.sendbuf_frames[nframes:]
442457
def nulldata_script(data: bytes) -> NulldataScript:
    ''''''

    stack = StackData.from_bytes(data)
    return NulldataScript(stack)
1334867
def put_if_empty(self, key, value):
        
        if self.has_data_for_key(key):
            return False
        self.put_data(key, value)
        return True
1225031
def process_frame(self, frame):
        
        cmd_method = frame.cmd.lower()

        if not cmd_method in VALID_COMMANDS:
            raise ProtocolError("Invalid STOMP command: {}".format(frame.cmd))

        method = getattr(self, cmd_method, None)

        if not self.engine.connected and method not in (self.connect, self.stomp):
            raise ProtocolError("Not connected.")

        try:
            transaction = frame.headers.get('transaction')
            if not transaction or method in (self.begin, self.commit, self.abort):
                method(frame)
            else:
                if not transaction in self.engine.transactions:
                    raise ProtocolError(
                        "Invalid transaction specified: %s" % transaction)
                self.engine.transactions[transaction].append(frame)
        except Exception as e:
            self.engine.log.error("Error processing STOMP frame: %s" % e)
            self.engine.log.exception(e)
            try:
                self.engine.connection.send_frame(ErrorFrame(str(e), str(e)))
            except Exception as e:  # pragma: no cover
                self.engine.log.error("Could not send error frame: %s" % e)
                self.engine.log.exception(e)
        else:
            # The protocol is not especially clear here (not sure why I'm surprised)
            # about the expected behavior WRT receipts and errors.  We will assume that
            # the RECEIPT frame should not be sent if there is an error frame.
            # Also we'll assume that a transaction should not preclude sending the receipt
            # frame.
            # import pdb; pdb.set_trace()
            if frame.headers.get('receipt') and method != self.connect:
                self.engine.connection.send_frame(ReceiptFrame(
                    receipt=frame.headers.get('receipt')))
657237
def write_ping(self, data: bytes) -> None:
        """"""
        assert isinstance(data, bytes)
        self._write_frame(True, 0x9, data)