S.index(value, [start, [stop]]) -> integer -- return first index of value.
           Raises ValueError if the value is not present.

           Supporting start and stop arguments is optional, but
           recommended.
432407
def index(self, value, start=0, stop=None):
        
        if start is not None and start < 0:
            start = max(len(self) + start, 0)
        if stop is not None and stop < 0:
            stop += len(self)

        try:
            if not isinstance(start, numbers.Integral):
                start = self.index(start)
            if not isinstance(stop, numbers.Integral):
                stop = self.index(stop)
        except IndexNotFound:
            raise IntError('slice indices must be integers or have an __index__ method') from None

        from pcapkit.protocols.protocol import Protocol
        try:
            flag = issubclass(value, Protocol)
        except TypeError:
            flag = issubclass(type(value), Protocol)
        if flag or isinstance(value, Protocol):
            value = value.__index__()
            if isinstance(value, tuple):
                value = r'|'.join(value)

        try:
            for index, data in enumerate(self.__data__[start:stop]):
                if re.fullmatch(value, data, re.IGNORECASE):
                    return index
        except Exception:
            raise IndexNotFound(f'{value!r} is not in {self.__class__.__name__!r}')
334239
def get_index(self, bucket, index, startkey, endkey=None,
                  return_terms=None, max_results=None, continuation=None,
                  timeout=None, term_regex=None):
        
        raise NotImplementedError
776981
public int get(int index) {
        if (d_bitsPerElem == 0)
            return 0;

        int startIdx = (index * d_bitsPerElem) / INT_SIZE;
        int startBit = (index * d_bitsPerElem) % INT_SIZE;

        int result = (d_data[startIdx] >>> startBit) & MASK[d_bitsPerElem];

        if ((startBit + d_bitsPerElem) > INT_SIZE) {
            int done = INT_SIZE - startBit;
            result |= (d_data[startIdx + 1] & MASK[d_bitsPerElem - done]) << done;
        }

        return result;
    }
1350812
def find(value, find, start=0):
    
    l = len(value)
    if is_list(find):
        m = l
        for f in find:
            i = value.find(f, start)
            if i == -1:
                continue
            m = min(m, i)
        return m
    else:
        i = value.find(find, start)
        if i == -1:
            return l
        return i
1202303
def range(start, stop):
    

    length = stop - start

    out = list(length=length)

    index = 0

    orig_start = start

    while start < stop:
        val = index + orig_start
        out[index] = val
        index = index + 1
        start = orig_start + index

    return out
1061906
def index(self, value):
        

        for i, x in enumerate(self):
            if x == value:
                return i

        raise ValueError("{} is not in list".format(value))
79677
public boolean get(int index) throws ArrayIndexOutOfBoundsException {
        if (index < 0 || index >= length) {
            throw new ArrayIndexOutOfBoundsException(Integer.toString(index));
        }

        return (repn[subscript(index)] & position(index)) != 0;
    }
1128700
def pop(self, index=-1):
        
        # pylint: disable=arguments-differ
        value = self._list.pop(index)
        self._set.remove(value)
        return value
131526
def feature(self, index):
        
        if index < 0 or index >= self.num_features_:
            raise ValueError('Index %d out of range' %(index))
        return self.features_[index]
363436
def index(a, x, atol=None):
    """"""
    i = bs.bisect_left(a, x)
    if i != len(a):
        if atol is None:
            if a[i] == x: return i
        else:
            if abs(a[i] - x) < atol: return i
    raise ValueError
1291430
function raiseIndex() {
      var length = result.length;
      if (queued) {
        // if queued remove the previous bench and subsequent skipped non-entries
        do {
          ++index > 0 && shift.call(benches);
        } while ((length = benches.length) && !('0' in benches));
      }
      else {
        while (++index < length && !(index in result)) { }
      }
      // if we reached the last index then return `false`
      return (queued ? length : index < length) ? index : (index = false);
    }
808809
def _start_stop(item):
    
    if isinstance(item, tuple):
        item = item[0]
    if isinstance(item, slice):
        # Slice.
        if item.step not in (None, 1):
            raise NotImplementedError()
        return item.start, item.stop
    elif isinstance(item, (list, np.ndarray)):
        # List or array of indices.
        return np.min(item), np.max(item)
    else:
        # Integer.
        return item, item + 1
267382
def _ensure_valid_index(self, value):
        
        # GH5632, make sure that we are a Series convertible
        if not len(self.index) and is_list_like(value):
            try:
                value = Series(value)
            except (ValueError, NotImplementedError, TypeError):
                raise ValueError('Cannot set a frame with no defined index '
                                 'and a value that cannot be converted to a '
                                 'Series')

            self._data = self._data.reindex_axis(value.index.copy(), axis=1,
                                                 fill_value=np.nan)
479323
def item(self, index: int) -> Optional[Node]:
        
        if not isinstance(index, int):
            raise TypeError(
                'Indeces must be integer, not {}'.format(type(index)))
        return self.__nodes[index] if 0 <= index < self.length else None
92588
def getIndex(predicateFn: Callable[[T], bool], items: List[T]) -> int:
    
    try:
        return next(i for i, v in enumerate(items) if predicateFn(v))
    except StopIteration:
        return -1
311894
def get_header_index(self, hdrclass, startidx=0):
        '''
        
        '''
        for hdridx in range(startidx, len(self._headers)):
            if isinstance(self._headers[hdridx], hdrclass):
                return hdridx
        return -1
1024409
function isIndex$1(value, length) {
  length = length == null ? MAX_SAFE_INTEGER : length;
  return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
}