Grab the data from the current frame
506435
private void getBodyFromFrame() {
        if (dataPayload == null) {
            dataPayload = new ArrayList<byte[]>();
        }
        if (currentFrame.getFrameType() == FrameTypes.DATA) {
            dataPayload.add(((FrameData) currentFrame).getData());
        }
    }
339768
def getouterframes(frame, context=1):
    """"""
    framelist = []
    while frame:
        framelist.append((frame,) + getframeinfo(frame, context))
        frame = frame.f_back
    return framelist
324734
def parsedata(self, packet):
        ''''''
        data = []
        datalength = ord(packet[3])
        position = 4
        while position < datalength + 4:
            data.append(packet[position])
            position += 1
        return data
754066
def _advance_frame(self):
        
        self.current_frame += 1
        if self.current_frame == self.frame_len:
            self.current_frame = 0
220812
def current_frame(self):
        
        if not self._pause_level:
            return (
                int((self._clock() + self._offset) * self.frames_per_second)
                % len(self._frames)
            )
        else:
            return self._paused_frame
985075
def current_line(self):
        ''''''
        if self.is_optimized_out():
            return '(frame information optimized out)'
        with open(self.filename(), 'r') as f:
            all_lines = f.readlines()
            # Convert from 1-based current_line_num to 0-based list offset:
            return all_lines[self.current_line_num()-1]
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)
868548
def get(self):
        
        chunk_size = self._smallest_buffer()
        all_full = self._all_full()

        if all_full:
            right_context = 0
            num_frames = chunk_size - self.current_left_context
        else:
            right_context = self.right_context
            num_frames = self.min_frames

        chunk_size_needed = num_frames + self.current_left_context + right_context

        if chunk_size >= chunk_size_needed:
            data = []
            keep_frames = self.left_context + self.right_context
            keep_from = max(0, chunk_size - keep_frames)

            for index in range(self.num_buffers):
                data.append(self.buffers[index][:chunk_size])
                self.buffers[index] = self.buffers[index][keep_from:]

            if self.num_buffers == 1:
                data = data[0]

            chunk = Chunk(data,
                          self.current_frame,
                          all_full,
                          self.current_left_context,
                          right_context)

            self.current_left_context = min(self.left_context, chunk_size)
            self.current_frame = max(self.current_frame + chunk_size - keep_frames, 0)

            return chunk
684843
async def read_data_frame(self, max_size: int) -> Optional[Frame]:
        
        # 6.2. Receiving Data
        while True:
            frame = await self.read_frame(max_size)

            # 5.5. Control Frames
            if frame.opcode == OP_CLOSE:
                # 7.1.5.  The WebSocket Connection Close Code
                # 7.1.6.  The WebSocket Connection Close Reason
                self.close_code, self.close_reason = parse_close(frame.data)
                # Echo the original data instead of re-serializing it with
                # serialize_close() because that fails when the close frame is
                # empty and parse_close() synthetizes a 1005 close code.
                await self.write_close_frame(frame.data)
                return None

            elif frame.opcode == OP_PING:
                # Answer pings.
                ping_hex = frame.data.hex() or "[empty]"
                logger.debug(
                    "%s - received ping, sending pong: %s", self.side, ping_hex
                )
                await self.pong(frame.data)

            elif frame.opcode == OP_PONG:
                # Acknowledge pings on solicited pongs.
                if frame.data in self.pings:
                    # Acknowledge all pings up to the one matching this pong.
                    ping_id = None
                    ping_ids = []
                    while ping_id != frame.data:
                        ping_id, pong_waiter = self.pings.popitem(last=False)
                        ping_ids.append(ping_id)
                        pong_waiter.set_result(None)
                    pong_hex = binascii.hexlify(frame.data).decode() or "[empty]"
                    logger.debug(
                        "%s - received solicited pong: %s", self.side, pong_hex
                    )
                    ping_ids = ping_ids[:-1]
                    if ping_ids:
                        pings_hex = ", ".join(
                            binascii.hexlify(ping_id).decode() or "[empty]"
                            for ping_id in ping_ids
                        )
                        plural = "s" if len(ping_ids) > 1 else ""
                        logger.debug(
                            "%s - acknowledged previous ping%s: %s",
                            self.side,
                            plural,
                            pings_hex,
                        )
                else:
                    pong_hex = binascii.hexlify(frame.data).decode() or "[empty]"
                    logger.debug(
                        "%s - received unsolicited pong: %s", self.side, pong_hex
                    )

            # 5.6. Data Frames
            else:
                return frame
1023429
private function readFrame()
    {
        $buf = $this->transport_->readAll(4);
        $val = unpack('N', $buf);
        $sz = $val[1];

        $this->rBuf_ = $this->transport_->readAll($sz);
    }
918545
def _get(self, *args, **kwargs):
        """"""
        prev_data = kwargs.pop('prev_data', [])
        resp = self._request('get', *args, **kwargs)
        resp_content = resp._content
        if not resp_content:
            # No content so its obviously not paginated
            return resp

        # if resp._content is a bytes object, decode it so we can loads it as json
        if isinstance(resp_content, bytes):
            resp_content = resp_content.decode('utf-8')

        # Load the json so we can use the data as python objects
        content = json.loads(resp_content)
        if 'pagination' not in content:
            # Result is not paginated
            return resp

        page_info = content['pagination']
        if not page_info['next_uri']:
            # next_uri is None when the cursor has been iterated to the last element
            content['data'].extend(prev_data)
            # If resp._content was is a bytes object, only set it as a bytes object
            if isinstance(resp_content, bytes):
                resp._content = json.dumps(content).decode('utf-8')
            else:
                resp._content = json.dumps(content)
            return resp

        prev_data.extend(content['data'])
        next_page_id = page_info['next_uri'].split('=')[-1]
        kwargs.update({
            'prev_data': prev_data,
            'params': {'starting_after': next_page_id}
        })
        return self._get(*args, **kwargs)
661545
def current_frame(raw=False):
        '''
        
        '''

        # `import sys` is important here, because the `sys` module is special
        # and we will end up with the class frame instead of the `current` one.

        if NATIVE:
            import sys

            frame = sys._getframe()
        else:
            frame = _getframe()

        frame = frame.f_back

        if not raw:
            frame = Frame(frame)

        return frame
1326528
def getdata(self):
        
        if self.bounding_box:
            return self.image.crop(self.bounding_box).getdata()
997466
def get_frame():
    """"""
    ret = QFrame()
    ret.setLineWidth(1)
    ret.setMidLineWidth(0)
    ret.setFrameShadow(QFrame.Sunken)
    ret.setFrameShape(QFrame.Box)
    return ret
866759
def __read_frame(self):
        

        if self.__frame_header_cache is None:
            _logger.debug("Reading frame header.")
            (length, frame_type) = struct.unpack('!II', self.__read(8))
            self.__frame_header_cache = (length, frame_type)
        else:
            (length, frame_type) = self.__frame_header_cache

        try:
            data = self.__read(length - 4)
        except errno.EAGAIN:
            self.__frame_header_cache = (length, frame_type)
            raise

        self.__frame_header_cache = None
        self.__process_message(frame_type, data)
661385
def read(cls, filename, offset=0):
        """"""
        i = 0
        with fileutil.opened(filename, "rb") as file:
            file.seek(offset)
            tag = cls()
            tag._read_header(file)
            for (frameid, bflags, data) in tag._read_frames(file):
                if len(data) == 0:
                    warn("{0}: Ignoring empty frame".format(frameid), 
                         EmptyFrameWarning)
                else:
                    frame = tag._decode_frame(frameid, bflags, data, i)
                    if frame is not None:
                        l = tag._frames.setdefault(frame.frameid, [])
                        l.append(frame)
                        if file.tell() > tag.offset + tag.size:
                            break
                        i += 1
            try:
                tag._filename = file.name
            except AttributeError:
                pass
            return tag
745535
function frame () {
    if (!animationActive) return
    const expectedFrameNumber = (Date.now() - animationStartTime) / 1000 * 60
    const updateCount = Math.min(expectedFrameNumber - lastFrameNumber, 10)
    lastFrameNumber = expectedFrameNumber
    for (let i = 0; i < updateCount; i++) {
      update()
      if (!shouldAnimate()) {
        animationActive = false
        break
      }
    }
    draw()
    if (animationActive) {
      window.requestAnimationFrame(frame)
    }
  }