perform a single run
774676
function task(callback) {
	// spawn phantomas process
	var child = phantomas(url, options, function(err, data, results) {
		callback(
			null, // pass null even in case of an error to continue async.series processing (issue #380)
			[err, results]
		);
	});

	child.on('progress', function(progress, inc) {
		if (bar) {
			bar.tick(inc);
		}
	});

	// pipe --verbose messages to stderr
	child.stderr.pipe(process.stderr);
}
1025060
def do_run(self, arg):
        '''  '''
        if not self.arm.is_connected():
            print(self.style.error('Error: ', 'Arm is not connected.'))
            return

        # Load the script.
        try:
            with open(arg) as f:
                lines = [line.strip() for line in f.readlines()]
        except IOError:
            print(self.style.error('Error: ',
                                   'Could not load file \'{}\'.'.format(arg)))
            return

        for line in lines:
            if self.wrapper:
                line = self.wrapper.wrap_input(line)
            self.arm.write(line)
            res = self.arm.read()
            if self.wrapper:
                res = self.wrapper.wrap_output(res)
            print(res)
782824
def run(self, conn, tmp, module_name, module_args, inject):
        '''  '''

        # shell and command module are the same
        if module_name == 'shell':
            module_name = 'command'
            module_args += " #USE_SHELL"

        (module_path, is_new_style, shebang) = self.runner._copy_module(conn, tmp, module_name, module_args, inject)
        self.runner._low_level_exec_command(conn, "chmod a+rx %s" % module_path, tmp)

        return self.runner._execute_module(conn, tmp, 'async_wrapper', module_args,
           async_module=module_path,
           async_jid=self.runner.generated_jid,
           async_limit=self.runner.background,
           inject=inject
        )
15363
def _run(self, *args: Any, **kwargs: Any) -> None:
        
        try:
            self._body(*args, **kwargs)
            if _logger is not None:
                _log(INFO, "Process", self.local.name, "die-finish")
        except Interrupt:
            if _logger is not None:
                _log(INFO, "Process", self.local.name, "die-interrupt")
574031
def run(self):
        """"""
        self.busy = True

        for i in range(9):
            self.counter += 1
            time.sleep(0.5)
            pass
        self.counter += 1
        
        self.busy = False
        return
494614
def run(command, show=True, *args, **kwargs):
    
    if show:
        print_command(command)
    with hide("running"):
        return _run(command, *args, **kwargs)
1039229
def run(self, **run_params):
        """"""
        self.use_default_run_params()
        self.set_run_params(**run_params)
        if self.print_run_params:
            print("Run Params:", self.run_params)
        self.results = self._backend.backend_run()
616360
def run(self):
        
        self._connect()
        super(irc.bot.SingleServerIRCBot, self).start()
713840
def run_once(function, state={}, errors={}):
    """"""
    @six.wraps(function)
    def _wrapper(*args, **kwargs):
        if function in errors:
            # Deliberate use of LBYL.
            six.reraise(*errors[function])

        try:
            return state[function]
        except KeyError:
            try:
                state[function] = result = function(*args, **kwargs)
                return result
            except Exception:
                errors[function] = sys.exc_info()
                raise
    return _wrapper
1056530
def run(self):
        '''
        
        '''
        self.utils = salt.loader.utils(self.opts, proxy=self.proxy)
        if salt.utils.platform.is_windows():
            # Calculate function references since they can't be pickled.
            if self.opts['__role'] == 'master':
                self.runners = salt.loader.runner(self.opts, utils=self.utils)
            else:
                self.runners = []
            self.funcs = salt.loader.minion_mods(self.opts, utils=self.utils, proxy=self.proxy)

        self.engine = salt.loader.engines(self.opts,
                                          self.funcs,
                                          self.runners,
                                          self.utils,
                                          proxy=self.proxy)
        kwargs = self.config or {}
        try:
            self.engine[self.fun](**kwargs)
        except Exception as exc:
            log.critical(
                'Engine \'%s\' could not be started!',
                self.fun.split('.')[0], exc_info=True
            )
1045281
def run(self):
        '''
        
        '''
        if self.opts['chunked']:
            ret = self.run_chunked()
        else:
            ret = self.run_oldstyle()

        salt.output.display_output(
                ret,
                self.opts.get('output', 'nested'),
                self.opts)
895073
def _run_cnvkit_single(data, background=None):
    
    if not background:
        background = []
    ckouts = _run_cnvkit_shared([data], background)
    if not ckouts:
        return [data]
    else:
        assert len(ckouts) == 1
        return _associate_cnvkit_out(ckouts, [data])
783407
def _run(self):
        
        while self.running:
            try:
                result = self.client_api.call('GetFeed', type_name=self.type_name, search=self.search,
                                              from_version=self._version, results_limit=self.results_limit)
                self._version = result['toVersion']
                self.listener.on_data(result['data'])
            except api.MyGeotabException as exception:
                if self.listener.on_error(exception) is False:
                    break
            if not self.running:
                break
            sleep(self.interval)
        self.running = False
614321
def __run(self):
    """"""
    sys.settrace(self.globaltrace)
    self.__run_backup()
    self.run = self.__run_backup
222557
def run_once(event)
      unless StripeWebhooks::PerformedCallback.exists?(stripe_event_id: event.id, label: label)
        run(event)
        StripeWebhooks::PerformedCallback.create(stripe_event_id: event.id, label: label)
      end
    end
1204443
def _run(self):
        ''''''
        stop = self._stop_evt
        connected = self._connected_evt
        tws = self._tws

        fd = tws.fd()
        pollfd = [fd]

        while not stop.is_set():
            while (not connected.is_set() or not tws.isConnected()) and not stop.is_set():
                connected.clear()
                backoff = 0
                retries = 0

                while not connected.is_set() and not stop.is_set():
                    if tws.reconnect_auto and not tws.reconnect():
                        if backoff < self.MAX_BACKOFF:
                            retries += 1
                            backoff = min(2**(retries + 1), self.MAX_BACKOFF)
                        connected.wait(backoff / 1000.)
                    else:
                        connected.wait(1)
                fd = tws.fd()
                pollfd = [fd]

            if fd > 0:
                try:
                    evtin, _evtout, evterr = select.select(pollfd, [], pollfd, 1)
                except select.error:
                    connected.clear()
                    continue
                else:
                    if fd in evtin:
                        try:
                            if not tws.checkMessages():
                                tws.eDisconnect(stop_polling=False)
                                continue
                        except (SystemExit, SystemError, KeyboardInterrupt):
                            break
                        except:
                            try:
                                self._wrapper.pyError(*sys.exc_info())
                            except:
                                print_exc()
                    elif fd in evterr:
                        connected.clear()
                        continue
656436
def run_once_on_threshold(callback, mv_lower, mv_upper, mv_reset=10, interval=0.01)
      AIN::run_once_on_threshold(callback, @pin, mv_lower, mv_upper, mv_reset, interval)
    end