Start some items if conditions are met.
970928
def _start(self, items):
        
        # TODO: Filter by a custom date field, for scheduled downloads starting at a certain time, or after a given delay

        # TODO: Don't start anything more if download BW is used >= config threshold in %

        # Check if anything more is ready to start downloading
        startable = [i for i in items if self.config.startable.match(i)]
        if not startable:
            self.LOG.debug("Checked %d item(s), none startable according to [ %s ]",
                           len(items), self.config.startable)
            return

        # Check intermission delay
        now = time.time()
        if now < self.last_start:
            # compensate for summer time and other oddities
            self.last_start = now
        delayed = int(self.last_start + self.config.intermission - now)
        if delayed > 0:
            self.LOG.debug("Delaying start of {:d} item(s),"
                           " due to {:d}s intermission with {:d}s left"
                           .format(len(startable), self.config.intermission, delayed))
            return

        # TODO: sort by priority, then loaded time

        # Stick to "start_at_once" parameter, unless "downloading_min" is violated
        downloading = [i for i in items if self.config.downloading.match(i)]
        start_now = max(self.config.start_at_once, self.config.downloading_min - len(downloading))
        start_now = min(start_now, len(startable))

        #down_traffic = sum(i.down for i in downloading)
        ##self.LOG.info("%d downloading, down %d" % (len(downloading), down_traffic))

        # Start eligible items
        for idx, item in enumerate(startable):
            # Check if we reached 'start_now' in this run
            if idx >= start_now:
                self.LOG.debug("Only starting %d item(s) in this run, %d more could be downloading" % (
                    start_now, len(startable)-idx,))
                break

            # TODO: Prevent start of more torrents that can fit on the drive (taking "off" files into account)
            # (restarts items that were stopped due to the "low_diskspace" schedule, and also avoids triggering it at all)

            # Only check the other conditions when we have `downloading_min` covered
            if len(downloading) < self.config.downloading_min:
                self.LOG.debug("Catching up from %d to a minimum of %d downloading item(s)" % (
                    len(downloading), self.config.downloading_min))
            else:
                # Limit to the given maximum of downloading items
                if len(downloading) >= self.config.downloading_max:
                    self.LOG.debug("Already downloading %d item(s) out of %d max, %d more could be downloading" % (
                        len(downloading), self.config.downloading_max, len(startable)-idx,))
                    break

            # If we made it here, start it!
            self.last_start = now
            downloading.append(item)
            self.LOG.info("%s '%s' [%s, #%s]" % (
                "WOULD start" if self.config.dry_run else "Starting",
                fmt.to_utf8(item.name), item.alias, item.hash))
            if not self.config.dry_run:
                item.start()
                if not self.config.quiet:
                    self.proxy.log(xmlrpc.NOHASH, "%s: Started '%s' {%s}" % (
                        self.__class__.__name__, fmt.to_utf8(item.name), item.alias,
                    ))
411542
def start(self, value: typing.Union[float, typing.Tuple[float, float]]) -> None:
        """"""
        ...
1127144
def queries_start_with(queries, prefixes):
    """"""
    for query in sqlparse.split(queries):
        if query and query_starts_with(query, prefixes) is True:
            return True
    return False
302433
def start(self):
        """"""
        assert self._thread is None, 'thread already started'

        # configure thread
        self._thread = Thread(target=self._start_io_loop)
        self._thread.daemon = True

        # begin thread and block until ready
        self._thread.start()
        self._ready.wait()
1235538
def _set_condition(self, condition):
        """"""
        assert isinstance(condition, CodeExpression.TYPES)
        self.condition = condition
1070136
def _start(self):
        """"""

        # TODO : make an update method instead

        last_call = 42
        while self._focus:
            sleep(1 / 100)

            mouse = pygame.mouse.get_pos()
            last_value = self.get()
            self.value_px = mouse[0]

            # we do not need to do anything when it the same value
            if self.get() == last_value:
                continue

            if last_call + self.interval / 1000 < time():
                last_call = time()
                self.func(self.get())
432060
def start(self):
        """"""
        self.loop.create_task(self._read_line())
        self.loop.create_task(self._greeting())
499872
def _add_new_items(self, config, seen):
        ''''''
        for (key, value) in self.items():
            if key not in seen:
                self._set_value(config, key, value)
854634
def start(self):
        """"""
        self.agent.submit(self._start())
        self.is_running = True
814364
def start(self):
        """"""
        old_start_count = self.__start_count
        self.__start_count += 1
        if old_start_count == 0:
            self.data_channel_start_event.fire()
1052389
def start(self):
        """"""
        LOG.info('Listing options...')
        with indicator.Spinner(**self.indicator_options):
            objects_list = self._list_contents()
            if not objects_list:
                return

        if isinstance(objects_list[0], dict):
            filter_dlo = self.job_args.get('filter_dlo')
            if filter_dlo:
                dynamic_hash = hashlib.sha256(
                    self.job_args.get('container')
                )
                dynamic_hash = dynamic_hash.hexdigest()
                objects_list = [
                    i for i in objects_list
                    if dynamic_hash not in i.get('name')
                ]
            string_filter = self.job_args.get('filter')
            if string_filter:
                objects_list = [
                    i for i in objects_list
                    if string_filter in i.get('name')
                ]
            self.print_horiz_table(objects_list)
        else:
            self.print_virt_table(objects_list[0].headers)
1065511
def start(self):
		""""""
		if self._send_greenlet is None:
			self._send_greenlet = gevent.spawn(self._send_loop)
1261709
def p_start(self, p):
        ''''''
        p[0] = ast.Program(headers=p[1], definitions=p[2])
872839
protected function onInit()
    {
        foreach ($this->params as $key => $value) {
            $columnList = explode(",", $value);
            foreach ($columnList as $k => $v) {
                $columnList[$k] = trim($v);
            }
            $this->params[$key] = $columnList;
        }
    }
346982
def start(self, block=True):
        """"""
        if self._state == INIT:
            if not any(self.on_message.receivers_for(blinker.ANY)):
                raise RuntimeError('no receivers connected to on_message')

            self.logger.debug('starting %s...', self.name)
            self._state = RUNNING
            self.query_nsqd()

            if self.lookupds:
                self.query_lookupd()
                self._killables.add(self._workers.spawn(self._poll_lookupd))

            self._killables.add(self._workers.spawn(self._poll_ready))

        else:
            self.logger.warn('%s already started', self.name)

        if block:
            self.join()
328478
def Start(self):
    """"""
    if not self.started:
      self.started = True
      for _ in range(self.min_threads):
        self._AddWorker()
855971
function Collection (items) {
		this.items = new ok.Items();
		this.start();
		if (items) {
			this.add(items);
		}
		this.init();
	}