r"""Skip over the next *n* rows.

        :param float timeout: Optional timeout value in seconds.

        :return: A number of rows actually skipped over (<= *n*).
326998
async def forward(self, n, *, timeout=None) -> int:
        
        """
        self._check_ready()
        if n <= 0:
            raise exceptions.InterfaceError('n must be greater than zero')

        protocol = self._connection._protocol
        status = await protocol.query('MOVE FORWARD {:d} {}'.format(
            n, self._portal_name), timeout)

        advanced = int(status.split()[1])
        if advanced < n:
            self._exhausted = True

        return advanced
137214
def poll(self, timeout=None):
        
        next_usb_timeout = self.__context.getNextTimeout()
        if timeout is None or timeout < 0:
            usb_timeout = next_usb_timeout
        elif next_usb_timeout:
            usb_timeout = min(next_usb_timeout, timeout)
        else:
            usb_timeout = timeout
        event_list = self.__poller.poll(usb_timeout)
        if event_list:
            fd_set = self.__fd_set
            result = [(x, y) for x, y in event_list if x not in fd_set]
            if len(result) != len(event_list):
                self.__context.handleEventsTimeout()
        else:
            result = event_list
            self.__context.handleEventsTimeout()
        return result
721114
public void skip(int length) {
        int newcount = count + length;
        if (newcount > buf.length) {
            buf = Arrays.copyOf(buf, oversize(newcount));
        }
        count = newcount;
    }
1254252
public long skip(long n) throws IOException 
    {
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"skip", "skip");
        }
        
        if ( total >= limit )
        {
            if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
                logger.logp(Level.FINE, CLASS_NAME,"skip", "Total over limit: 0");
            } 
            return 0;
        }
        long remaining = n;
        while ( remaining > 0 )
        {
            int avail = count - pos;
            if ( avail <= 0 )
            {
                fill();
                avail = count - pos;
                if ( avail <= 0 )
                {
                    if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
                        logger.logp(Level.FINE, CLASS_NAME,"skip", "skip avail < 0: "+(n - remaining));
                    } 
                    return n - remaining;
                }
            }
            if ( remaining < avail )
            {
                avail = (int)remaining;
            }
            remaining -= avail;
            pos += avail;
            total += avail;
        }
        return n;
    }
1072755
public void skip(long n) throws IOException {
		if (capacity == 0) {
			// aligned
			while (n != 0) {
				n -= istream.skip(n);
			}
		} else {
			// not aligned, grrr
			for (int i = 0; i < n; n++) {
				readBits(8);
			}
		}
	}
109041
def __get_new_timeout(self, timeout):
        
        try:
            timeout_multiplier = float(self.timeout_multiplier)
            if timeout_multiplier <= 0.5:
                timeout_multiplier = 0.5
            timeout = int(math.ceil(timeout_multiplier * timeout))
            return timeout
        except Exception:
            # Wrong data type for timeout_multiplier (expecting int or float)
            return timeout
1095026
def run(self, timeout = 0):
        
        ptimeout = float(
            timeout.microseconds/1000000+timeout.seconds if timeout
            else (self.resolution if timeout is None else 0)
        )
        if self.tokens:
            events = self.kcontrol(None, self.default_size, ptimeout)
            len_events = len(events)-1
            for nr, ev in enumerate(events):
                fd = ev.ident
                act = self.shadow.pop(fd)

                if ev.flags & KQ_EV_ERROR:
                    self.kcontrol((kevent(fd, act.flags, KQ_EV_DELETE),), 0)
                    self.handle_error_event(act, 'System error %s.'%ev.data)
                else:
                    if nr == len_events:
                        ret = self.yield_event(act)
                        if not ret:
                            ev.flags = KQ_EV_ADD | KQ_EV_ONESHOT
                            self.kcontrol((ev,), 0)
                            self.shadow[fd] = act
                        return ret
                    else:
                        if not self.handle_event(act):
                            ev.flags = KQ_EV_ADD | KQ_EV_ONESHOT
                            self.kcontrol((ev,), 0)
                            self.shadow[fd] = act
        else:
            sleep(timeout)
731767
def timeout(seconds):
    
    def _timeout_error(signal, frame):
        raise TimeoutError("Operation did not finish within \
        {} seconds".format(seconds))

    def timeout_decorator(func):

        @wraps(func)
        def timeout_wrapper(*args, **kwargs):
            signal.signal(signal.SIGALRM, _timeout_error)
            signal.alarm(seconds)
            try:
                return func(*args, **kwargs)
            finally:
                signal.alarm(0)

        return timeout_wrapper

    return timeout_decorator
873967
def skipping_window(sequence, target, n=3):
    
    start, stop = 0, n
    seq = list(sequence)
    while stop <= len(seq):
        subseq = seq[start:stop]
        if target in subseq:
            yield tuple(seq[start:stop])
        start += 1
        stop += 1
        # Fast forwarding the start.
        # Find the next window which contains the target.
        try:
            # `seq.index(target, start) - (n-1)` would be the next
            # window where the constraint is met.
            start = max(seq.index(target, start) - (n-1), start)
            stop = start + n
        except ValueError:
            break
338562
def abort(self, count=2, timeout=60):
        '''
        
        '''
        for counter in xrange(0, count):
            self.putc(CAN, timeout)
1366850
def _skip_frame(self):
        """"""
        size = self.read_size()
        for i in range(size+1):
            line = self._f.readline()
            if len(line) == 0:
                raise StopIteration
1171965
def head(self, n=None, **kwargs):
        
        if n is None:
            n = options.display.max_rows
        return self._handle_delay_call('execute', self, head=n, **kwargs)
1186067
def skip(self, chars=spaceCharactersBytes):
        """"""
        p = self.position               # use property for the error-checking
        while p < len(self):
            c = self[p:p + 1]
            if c not in chars:
                self._position = p
                return c
            p += 1
        self._position = p
        return None
1231425
def timeout(self, timeout=None):
        
        if timeout is None:
            return self.__timeout
        if 0 < float(timeout) < 3600:
            self.__timeout = float(timeout)
            return self.__timeout
        else:
            return None
903645
public static boolean discard(Source source, int timeout, TimeUnit timeUnit) {
    try {
      return skipAll(source, timeout, timeUnit);
    } catch (IOException e) {
      return false;
    }
  }
290277
def bpopright(self, timeout=0):
        
        ret = self.database.blpop(self.key, timeout)
        if ret is not None:
            return ret[1]
1318505
public static boolean skipAll(Source source, int duration, TimeUnit timeUnit) throws IOException {
    long now = System.nanoTime();
    long originalDuration = source.timeout().hasDeadline()
        ? source.timeout().deadlineNanoTime() - now
        : Long.MAX_VALUE;
    source.timeout().deadlineNanoTime(now + Math.min(originalDuration, timeUnit.toNanos(duration)));
    try {
      Buffer skipBuffer = new Buffer();
      while (source.read(skipBuffer, 8192) != -1) {
        skipBuffer.clear();
      }
      return true; // Success! The source has been exhausted.
    } catch (InterruptedIOException e) {
      return false; // We ran out of time before exhausting the source.
    } finally {
      if (originalDuration == Long.MAX_VALUE) {
        source.timeout().clearDeadline();
      } else {
        source.timeout().deadlineNanoTime(now + originalDuration);
      }
    }
  }