Get the range of archor reading_ids.

        Returns:
            (int, int): The lowest and highest reading ids.

            If no reading ids have been loaded, (0, 0) is returned.
5193
def id_range(self):
        

        if len(self._anchor_points) == 0:
            return (0, 0)

        return (self._anchor_points[0].reading_id, self._anchor_points[-1].reading_id)
74502
def range_values(args):
    
    if len(args) == 1:
        return Interval(0, args[0].high)
    elif len(args) == 2:
        return Interval(args[0].low, args[1].high)
    elif len(args) == 3:
        is_neg = args[2].low < 0
        is_pos = args[2].high > 0
        if is_neg and is_pos:
            return UNKNOWN_RANGE
        elif is_neg:
            return Interval(args[1].low, args[0].high)
        else:
            return Interval(args[0].low, args[1].high)
272375
def get_range(self, range_start, range_end, **kwargs):
        
        range_response = self.get_range_response(range_start, range_end,
                                                 **kwargs)
        for kv in range_response.kvs:
            yield (kv.value, KVMetadata(kv, range_response.header))
797877
def _index_range(self, version, symbol, date_range=None, **kwargs):
        
        if date_range and 'segment_index' in version:
            # index is read-only but it's never written to
            index = np.frombuffer(decompress(version['segment_index']), dtype=INDEX_DTYPE)
            dtcol = self._datetime64_index(index)
            if dtcol and len(index):
                dts = index[dtcol]
                start, end = _start_end(date_range, dts)
                if start > dts[-1]:
                    return -1, -1
                idxstart = min(np.searchsorted(dts, start), len(dts) - 1)
                idxend = min(np.searchsorted(dts, end, side='right'), len(dts) - 1)
                return int(index['index'][idxstart]), int(index['index'][idxend] + 1)
        return super(PandasStore, self)._index_range(version, symbol, **kwargs)
913322
def total_read_throughput(self):
        
        total = self.read_throughput
        for index in itervalues(self.global_indexes):
            total += index.read_throughput
        return total
904473
def _read_range(self, start, end=0):
        
        try:
            with _handle_client_exception():
                return self._client.get_object(*self._client_args, headers=dict(
                    Range=self._http_range(start, end)))[1]

        except _ClientException as exception:
            if exception.http_status == 416:
                # EOF
                return b''
            raise
509200
def _range(self, xloc, cache):
        
        uloc = numpy.zeros((2, len(self)))
        for dist in evaluation.sorted_dependencies(self, reverse=True):
            if dist not in self.inverse_map:
                continue
            idx = self.inverse_map[dist]
            xloc_ = xloc[idx].reshape(1, -1)
            uloc[:, idx] = evaluation.evaluate_bound(
                dist, xloc_, cache=cache).flatten()
        return uloc
1109590
def get_range(self, i):
        

        try:
            m = i.match(RE_INT_ITER)
            if m:
                return self.get_int_range(*m.groups())

            m = i.match(RE_CHR_ITER)
            if m:
                return self.get_char_range(*m.groups())
        except Exception:  # pragma: no cover
            # TODO: We really should never fail here,
            # but if we do, assume the sequence range
            # was invalid. This catch can probably
            # be removed in the future with more testing.
            pass

        return None
338196
def selection_range(self):
        
        selected = self.selectionModel().selection()
        """:type: QItemSelection """

        if selected.isEmpty():
            return -1, -1

        min_row = min(rng.top() for rng in selected)
        max_row = max(rng.bottom() for rng in selected)

        return min_row, max_row
1017695
private IdReader<ID> getIdReader()
  {
    if (_idReader != null)
      return _idReader;

    Class<?> idType = _entityInfo.id().getJavaType();

    if (isInteger(idType)) {
      _idReader = (IdReader<ID>) new IntIdReader();
    }
    else if (long.class == idType || Long.class == idType) {
      _idReader = (IdReader<ID>) new LongIdReader();
    }
    else if (IdAsset.class == idType) {
      _idReader = (IdReader<ID>) new IdAssetReader();
    }
    else if (String.class == idType) {
      _idReader = (IdReader<ID>) new StringIdReader();
    }
    else {
      throw new IllegalStateException(String.valueOf(idType));
    }

    return _idReader;
  }
1229714
def _check_min_max_indices(self, min_index=None, max_index=None):
        
        min_index = min_index or 0
        max_index = max_index or len(self)
        if min_index < 0:
            self.log_exc(u"min_index is negative", None, True, ValueError)
        if max_index > len(self):
            self.log_exc(u"max_index is bigger than the number of intervals in the list", None, True, ValueError)
        return min_index, max_index
666627
def range_per(self):
    
    rp = float((self.raw_data[-1] - self.raw_data[-2]) / self.raw_data[-2] * 100)
    return rp
1227641
def _read_range(self, start, end=0):
        
        # Get object part
        response = self._client.request(
            'GET', self.name, headers=dict(Range=self._http_range(start, end)),
            timeout=self._TIMEOUT)

        if response.status_code == 416:
            # EOF
            return b''

        # Get object content
        return _handle_http_errors(response).content
1112460
def _read_at(self, d,
                 interpolation='linear',
                 index=False,
                 return_basis=False):
        
        method = {'linear': utils.linear,
                  'none': None}

        i, d = utils.find_previous(self.basis,
                                   d,
                                   index=True,
                                   return_distance=True)

        if index:
            return i
        else:
            return method[interpolation](self[i], self[i+1], d)
1089335
def parse_range_header(header, maxlen=0):
    ''' '''
    if not header or header[:6] != 'bytes=': return
    ranges = [r.split('-', 1) for r in header[6:].split(',') if '-' in r]
    for start, end in ranges:
        try:
            if not start:  # bytes=-100    -> last 100 bytes
                start, end = max(0, maxlen-int(end)), maxlen
            elif not end:  # bytes=100-    -> all but the first 99 bytes
                start, end = int(start), maxlen
            else:          # bytes=100-200 -> bytes 100-200 (inclusive)
                start, end = int(start), min(int(end)+1, maxlen)
            if 0 <= start < end <= maxlen:
                yield start, end
        except ValueError:
            pass
1311942
def getReadLengths(reads, gapChars):
    
    gapChars = set(gapChars)
    result = {}
    for read in reads:
        result[read.id] = len(read) - sum(
            character in gapChars for character in read.sequence)
    return result
439305
def find_range(values, soft_range=[]):
    
    try:
        values = np.array(values)
        values = np.squeeze(values) if len(values.shape) > 1 else values
        if len(soft_range):
            values = np.concatenate([values, soft_range])
        if values.dtype.kind == 'M':
            return values.min(), values.max()
        return np.nanmin(values), np.nanmax(values)
    except:
        try:
            values = sorted(values)
            return (values[0], values[-1])
        except:
            return (None, None)