gets the amount of data available on the FIFO right now.
        :return: the number of bytes available on the FIFO which will be proportional to the number of samples available
        based on the values the device is configured to sample.
161710
def getFifoCount(self):
        
        bytes = self.i2c_io.readBlock(self.MPU6050_ADDRESS, self.MPU6050_RA_FIFO_COUNTH, 2)
        count = (bytes[0] << 8) + bytes[1]
        logger.debug("FIFO Count: %d", count)
        return count
1298392
def memory_usage(self):
        
        data = super(Field, self).memory_usage()
        values = 0
        for value in self.field_values:
            values += value.memory_usage()
        data['field_values'] = values
        return data
1026783
public int available() throws IOException {
        checkForClosed();
        return (int) Math.min(_file.length() - _offset + bytesLeftInBuffer(), Integer.MAX_VALUE);
    }
1156517
def request_length(self):
        
        remainder = self.stop_at - self.offset
        return self.chunk_size if remainder > self.chunk_size else remainder
154164
def get_size(self):
    
    if not self._is_open:
      raise IOError('Not opened.')

    if self._uncompressed_stream_size is None:
      self._uncompressed_stream_size = self._GetUncompressedStreamSize()

    return self._uncompressed_stream_size
1047150
def remaining_bytes(self, meta=True):
        
        pos, self._pos = self._pos, len(self.buffer)
        return self.buffer[pos:]
227265
def sampling_rate(self):
        
        with self.container.open_if_needed(mode='r') as cnt:
            return cnt.get(self.key)[1]
408492
def get_file_size(self, fid):
        
        url = self.get_file_url(fid)
        res = self.conn.head(url)
        if res is not None:
            size = res.headers.get("content-length", None)
            if size is not None:
                return int(size)
        return None
1130263
def num_samples(self, sr=None):
        
        native_sr = self.sampling_rate
        num_samples = units.seconds_to_sample(self.duration, native_sr)

        if sr is not None:
            ratio = float(sr) / native_sr
            num_samples = int(np.ceil(num_samples * ratio))

        return num_samples
206345
def fetch(self):
        
        self.limit.set_request_args(self.kwargs)
        data = self.connection.call(*self.args, **self.kwargs)
        self.limit.post_fetch(data)
        self.last_evaluated_key = data.get('LastEvaluatedKey')
        if self.last_evaluated_key is None:
            self.kwargs.pop('ExclusiveStartKey', None)
        else:
            self.kwargs['ExclusiveStartKey'] = self.last_evaluated_key
        self._update_capacity(data)
        if 'consumed_capacity' in data:
            self.consumed_capacity += data['consumed_capacity']
        for raw_item in data['Items']:
            item = self.connection.dynamizer.decode_keys(raw_item)
            if self.limit.accept(item):
                yield item
1355056
def get_available_frequencies(self):
        '''
        
        '''
        fpath = path.join("cpu0","cpufreq","scaling_available_frequencies")
        data = self.__read_cpu_file(fpath).rstrip("\n").split()
        return data
763641
def get_samples(self, sample_count):
        
        if self.amplitude.value <= 0:
            return None
        # Build samples by rolling the period cache through the buffer
        rolled_array = numpy.roll(self.wave_cache,
                                  -1 * self.last_played_sample)
        # Append remaining partial period
        full_count, remainder = divmod(sample_count, self.cache_length)
        final_subarray = rolled_array[:int(remainder)]
        return_array = numpy.concatenate((numpy.tile(rolled_array, full_count),
                                          final_subarray))
        # Keep track of where we left off to prevent popping between chunks
        self.last_played_sample = int(((self.last_played_sample + remainder) %
                                       self.cache_length))
        # Multiply output by amplitude
        return return_array * (self.amplitude.value *
                               self.amplitude_multiplier)
905294
def _data(self):
        """"""
        current_position = self.file.tell()
        self.file.seek(self.position)
        data = self.file.read(self.length)
        self.file.seek(current_position)
        if self.length % 2:
            data += '\x00' # Padding byte
        return data
871373
def get_data(self):
        

        target = DeviceTarget(self.device_id)
        return self._fssapi.get_file(target, self.path)[self.device_id]
674065
def read(self):
        

        if self._current >= len(self._data):
            return None
        self._current += 1
        return self._data[self._current - 1]
525243
def num_samples(self):
        
        with self.container.open_if_needed(mode='r') as cnt:
            return cnt.get(self.key)[0].shape[0]
946128
def __get_data_size(self):
        
        response = self.__response
        if response == const.CMD_PREPARE_DATA:
            size = unpack('I', self.__data[:4])[0]
            return size
        else:
            return 0