Tap ``tab`` key for ``n`` times, with ``interval`` seconds of interval.

        **中文文档**

        以 ``interval`` 中定义的频率按下某个tab键 ``n`` 次。
979922
def tab(self, n=1, interval=0, pre_dl=None, post_dl=None):
        
        self.delay(pre_dl)
        self.k.tap_key(self.k.tab_key, n, interval)
        self.delay(post_dl)
130551
def enter(self, n=1, interval=0, pre_dl=None, post_dl=None):
        
        self.delay(pre_dl)
        self.k.tap_key(self.k.enter_key, n, interval)
        self.delay(post_dl)
42620
function onTimeKeydown(event) {
		const { keyCode, shiftKey } = event;

		// 37: LEFT, 38: UP, 39: RIGHT, 40: DOWN
		if (37 <= keyCode && 40 >= keyCode) {
			event.preventDefault();

			const isLTR = /^(btt|ltr)$/.test(timeDir);
			const offset = 37 === keyCode || 39 === keyCode ? keyCode - 38 : keyCode - 39;

			media.currentTime = Math.max(0, Math.min(duration, currentTime + offset * (isLTR ? 1 : -1) * (shiftKey ? 10 : 1)));

			onTimeChange();
		}
	}
741785
def touch(args):
    
    from time import ctime

    p = OptionParser(touch.__doc__)
    opts, args = p.parse_args(args)

    if len(args) != 1:
        sys.exit(not p.print_help())

    info, = args
    fp = open(info)
    for row in fp:
        path, atime, mtime = row.split()
        atime = float(atime)
        mtime = float(mtime)
        current_atime, current_mtime = get_times(path)

        # Check if the time has changed, with resolution up to 1 sec
        if int(atime) == int(current_atime) and \
           int(mtime) == int(current_mtime):
            continue

        times = [ctime(x) for x in (current_atime, current_mtime, atime, mtime)]
        msg = "{0} : ".format(path)
        msg += "({0}, {1}) => ({2}, {3})".format(*times)
        print(msg, file=sys.stderr)
        os.utime(path, (atime, mtime))
785654
def alt_tab(self, n=1, pre_dl=None, post_dl=None):
        
        self.delay(pre_dl)
        self.k.press_key(self.k.alt_key)
        self.k.tap_key(self.k.tab_key, n=n, interval=0.1)
        self.k.release_key(self.k.alt_key)
        self.delay(post_dl)
158957
def timecode(time_now, interval):
    
    i = time.mktime(time_now.timetuple())
    return int(i / interval)
522854
def count(start=0, step=1, *, interval=0):
    
    agen = from_iterable.raw(itertools.count(start, step))
    return time.spaceout.raw(agen, interval) if interval else agen
1245288
def set_interval(self, start, end, value, compact=False):
        
        # for each interval to render
        for i, (s, e, v) in enumerate(self.iterperiods(start, end)):
            # look at all intervals included in the current interval
            # (always at least 1)
            if i == 0:
                # if the first, set initial value to new value of range
                self.set(s, value, compact)
            else:
                # otherwise, remove intermediate key
                del self[s]

        # finish by setting the end of the interval to the previous value
        self.set(end, v, compact)
198899
def synchronous_command(self, command, tab_key, **params):
		
		self.log.debug("Synchronous_command to tab %s (%s):", tab_key, self._get_cr_tab_meta_for_key(tab_key))
		self.log.debug("	command: '%s'", command)
		self.log.debug("	params:  '%s'", params)
		self.log.debug("	tab_key:  '%s'", tab_key)

		send_id = self.send(command=command, tab_key=tab_key, params=params)
		resp = self.recv(message_id=send_id, tab_key=tab_key)

		self.log.debug("	Response: '%s'", str(resp).encode("ascii", 'ignore').decode("ascii"))

		# self.log.debug("	resolved tab idx %s:", self.tab_id_map[tab_key])
		return resp
129300
def page_down(self, n=1, interval=0, pre_dl=None, post_dl=None):
        
        self.delay(pre_dl)
        self.k.tap_key(self.k.page_down, n, interval)
        self.delay(post_dl)
1101984
function tap(position, element, done) {
                var touches = getTouches(position, 1);
                var gesture = {
                    duration: config.randomizer.integer({ min: 20, max: 700 })
                };

                triggerTouch(touches, element, 'start');

                setTimeout(function() {
                    triggerTouch(touches, element, 'end');
                    done(touches, gesture);
                }, gesture.duration);
            }
25715
def _find_intervals(bundles, duration, step):
    """"""
    segments = []
    for bund in bundles:
        beg, end = bund['times'][0][0], bund['times'][-1][1]

        if end - beg >= duration:
            new_begs = arange(beg, end - duration, step)

            for t in new_begs:
                seg = bund.copy()
                seg['times'] = [(t, t + duration)]
                segments.append(seg)

    return segments
1113785
function countMinutes(redisClient,  keyPrepend, key, callback) {
    var multi = redisClient.multi();
    var currentTimeKey = getMinutesSinceEpoch();
    for (var i = currentTimeKey; i > currentTimeKey-MAX_KEYS; --i ) {
        multi.get(keyPrepend+"m:"+i+":"+key);
    }
    multi.exec(callback);
}
987260
function limiter(interval, penaltyInterval) {

  var queue = [],
    lastTrigger = 0,
    penaltyCounter = 0,
    skipCounter = 0,
    timer;

  function now() {
    return Date.now();
  }

  function since() {
    return now() - lastTrigger;
  }

  function currentInterval() {
    return penaltyCounter > 0 ? penaltyInterval : interval;
  }

  function runNow(fn) {
    penaltyCounter = 0;
    fn();
    // wait to the next interval unless told to skip
    // to the next operation immediately
    if (skipCounter > 0) {
      skipCounter = 0;
    }
    else {
      lastTrigger = now();
    }
  }

  function deque() {
    timer = undefined;
    if (since() >= currentInterval()) {
      runNow(queue.shift());
    }
    schedule();
  }

  function schedule() {
    var delay;
    if (!timer && queue.length) {
      delay = currentInterval() - since();
      if (delay < 0) {
        return deque();
      }
      timer = setTimeout(deque, delay);
    }
  }

  function trigger(fn) {
    if (since() >= currentInterval() && !queue.length) {
      runNow(fn);
    } else {
      queue.push(fn);
      schedule();
    }
  }

  function penalty() {
    penaltyCounter += 1;
  }

  function skip() {
    skipCounter += 1;
  }

  function cancel() {
    if (timer) {
      clearTimeout(timer);
    }
    queue = [];
  }

  penaltyInterval = penaltyInterval || 5 * interval;
  return {
    trigger: trigger,
    penalty: penalty,
    skip: skip,
    cancel: cancel
  };
}
878366
def process_timer_key(self, key, tstamp, stack, pickled=False):
        
        self.timers[key].sort()
        values = {'count': len(self.timers[key]),
                  'low': min(self.timers[key]),
                  'high': max(self.timers[key]),
                  'total': sum(self.timers[key])}
        values['mean'] = values['low']
        nth_percentile = 'upper_%i' % self.pct_threshold
        values[nth_percentile] = values['high']

        if values['count']:
            threshold_idx = int(self.threshold_numerator * values['count']) - 1
            values[nth_percentile] = self.timers[key][threshold_idx]
            values['mean'] = float(values['total']) / float(values['count'])

        for metric in values:
            if pickled:
                stack.append(("%s.%s.%s" % (self.timer_prefix, key, metric),
                              (tstamp, values[metric])))
            else:
                stack.append("%s.%s.%s %s %s\n" % (self.timer_prefix,
                                                   key,
                                                   metric,
                                                   values[metric],
                                                   tstamp))
833951
def msg(self, *args, **kwargs):
        ""
        if self.timestamp is None or self._interval_reached():
            self.callback(*args, **kwargs)
            self.reset()
1203261
def interval(key, start_note, interval):
    
    if not notes.is_valid_note(start_note):
        raise KeyError("The start note '%s' is not a valid note" % start_note)
    notes_in_key = keys.get_notes(key)
    for n in notes_in_key:
        if n[0] == start_note[0]:
            index = notes_in_key.index(n)
    return notes_in_key[(index + interval) % 7]