If the track allows it, seeks to a position.

        Parameters
        ----------
        position : int
            Between 0 and track length.
358306
async def seek(self, position: int):
        
        if self.current.seekable:
            position = max(min(position, self.current.length), 0)
            await self.node.seek(self.channel.guild.id, position)
1042825
public function seek($position)
    {
        if ($position < 0) {
            $position = 0;
        } elseif ($position > $this->count()) {
            $position = $this->count();
        }

        if (isset($this->rows[ $position ])) {
            $this->position = $position;
        }
    }
1197451
def reserve_position(fp, fmt='I'):
    
    position = fp.tell()
    fp.seek(struct.calcsize(str('>' + fmt)), 1)
    return position
585398
def seek(self, offset: int = 0, *args, **kwargs):
        

        return self.fp.seek(offset, *args, **kwargs)
138997
public void seek(final long timestamp) {
    if ((timestamp & 0xFFFFFFFF00000000L) != 0) {  // negative or not 32 bits
      throw new IllegalArgumentException("invalid timestamp: " + timestamp);
    }
    // Do a binary search to find the timestamp given or the one right before.
    short lo = 0;
    short hi = (short) dp.size();

    while (lo <= hi) {
      index = (short) ((lo + hi) >>> 1);
      long cmp = dp.timestamp(index) - timestamp;

      if (cmp < 0) {
        lo = (short) (index + 1);
      } else if (cmp > 0) {
        hi = (short) (index - 1);
      } else {
        index--;  // 'index' is exactly on the timestamp wanted.
        return;   // So let's go right before that for next().
      }
    }
    // We found the timestamp right before as there was no exact match.
    // We take that position - 1 so the next call to next() returns it.
    index = (short) (lo - 1);
    // If the index we found was not the first or the last point, let's
    // do a small extra sanity check to ensure the position we found makes
    // sense: the timestamp we're at must not be >= what we're looking for.
    if (0 < index && index < dp.size() && dp.timestamp(index) >= timestamp) {
      throw new AssertionError("seeked after the time wanted!"
          + " timestamp=" + timestamp
          + ", index=" + index
          + ", dp.timestamp(index)=" + dp.timestamp(index)
          + ", this=" + this);
    }
  }
852993
public final Position getPositionAlongPath(Position position, double proportion) {

        if (proportion >= 0 && proportion <= 1) {

            // Get bearing degrees for course
            double courseDegrees = this.getBearingDegrees(position);

            // Get distance from position arg and this objects location
            double distanceKm = this.getDistanceToKm(position);

            // Predict the position for a proportion of the course
            // where this object is the start position and the arg
            // is the destination position.
            Position retPosition = this.predict(proportion * distanceKm, courseDegrees);

            return retPosition;
        } else
            throw new RuntimeException("Proportion must be between 0 and 1 inclusive");
    }
358336
def set_position(self, position):
        """"""
        if position > self._duration():
            return
        position_ns = position * _NANOSEC_MULT
        self._manager[ATTR_POSITION] = position
        self._player.seek_simple(_FORMAT_TIME, Gst.SeekFlags.FLUSH, position_ns)
743970
def Seek(self, offset, whence=os.SEEK_SET):
    """"""
    if whence == os.SEEK_SET:
      self.offset = offset
    elif whence == os.SEEK_CUR:
      self.offset += offset
    elif whence == os.SEEK_END:
      self.offset = self.size + offset
    else:
      raise ValueError("Illegal whence value %s" % whence)
22344
def seek(self, offset, whence=0):
        
        self.flush()
        if whence == self.SEEK_SET:
            self._realpos = self._pos = offset
        elif whence == self.SEEK_CUR:
            self._pos += offset
            self._realpos = self._pos
        else:
            self._realpos = self._pos = self._get_size() + offset
        self._rbuffer = bytes()
258285
def go_to_position(self, position):
        

        cursor = self.textCursor()
        cursor.setPosition(position)
        self.setTextCursor(cursor)
        return True
193784
def move_to_limit(self, position):
        
        cmd = 'MOVE', [Float, Integer]
        self._write(cmd, position, 1)
838988
def on_to_position(self, speed, position, brake=True, block=True):
        
        speed = self._speed_native_units(speed)
        self.speed_sp = int(round(speed))
        self.position_sp = position
        self._set_brake(brake)
        self.run_to_abs_pos()

        if block:
            self.wait_until('running', timeout=WAIT_RUNNING_TIMEOUT)
            self.wait_until_not_moving()
843059
def is_touched(self, position):
        
        return position[0] >= self.position[0] and position[0] <= self.position[0]+ self.size[0]
222170
public void position(long p) throws IOException {
        if ((p < 0) || (p > array.length)) {
            throw new IOException("Invalid position: " + p);
        }
        offset = (int)p;
    }
1129796
def seek(self, offset, whence=START):
        """"""
        logger.debug('seeking to offset: %r whence: %r', offset, whence)
        if whence not in WHENCE_CHOICES:
            raise ValueError('invalid whence, expected one of %r' % WHENCE_CHOICES)

        if whence == START:
            new_position = offset
        elif whence == CURRENT:
            new_position = self._current_pos + offset
        else:
            new_position = self._content_length + offset
        new_position = clamp(new_position, 0, self._content_length)
        self._current_pos = new_position
        self._raw_reader.seek(new_position)
        logger.debug('new_position: %r', self._current_pos)

        self._buffer.empty()
        self._eof = self._current_pos == self._content_length
        return self._current_pos
1161783
def position=(new_position)
      raise ArgumentError, "negative position given" if new_position < 0
      raise ArgumentError, "specified position exceeds capacity" if new_position > @capacity

      @mark = nil if @mark && @mark > new_position
      @position = new_position
    end
198891
void setPlayingTrack(int playingTrackPosition) {
        if (playingTrackPosition < 0 || playingTrackPosition >= mSoundCloudPlaylist.getTracks().size()) {
            throw new IllegalArgumentException("No tracks a the position " + playingTrackPosition);
        }
        mCurrentTrackIndex = playingTrackPosition;
    }