Start the DQL client.
978008
def main():
    
    parse = argparse.ArgumentParser(description=main.__doc__)
    parse.add_argument("-c", "--command", help="Run this command and exit")
    region = os.environ.get("AWS_REGION", "us-west-1")
    parse.add_argument(
        "-r",
        "--region",
        default=region,
        help="AWS region to connect to (default %(default)s)",
    )
    parse.add_argument(
        "-H",
        "--host",
        default=None,
        help="Host to connect to if using a local instance " "(default %(default)s)",
    )
    parse.add_argument(
        "-p",
        "--port",
        default=8000,
        type=int,
        help="Port to connect to " "(default %(default)d)",
    )
    parse.add_argument(
        "--version", action="store_true", help="Print the version and exit"
    )
    args = parse.parse_args()

    if args.version:
        print(__version__)
        return

    logging.config.dictConfig(LOG_CONFIG)
    cli = DQLClient()
    cli.initialize(region=args.region, host=args.host, port=args.port)

    if args.command:
        command = args.command.strip()
        try:
            cli.run_command(command)
            if cli.engine.partial:
                cli.run_command(";")
        except KeyboardInterrupt:
            pass
    else:
        cli.start()
969917
public function start() {
        // Don't load db if we don't want it (redo in the future)
        if($this->config->exists('database')) {
            $this->db = new DB\Connection($this->config);
        }

        $this->router = new Router($this->klein, $this->config);
    }
1062308
public function start() {

        // indicate the library that it should execute queued requests
        $this->_queue = false;

        // if we have to pause between batches of requests, process them sequentially, in batches
        if ($this->pause_interval > 0) $this->_process_paused();

        // if we don't have to pause between batches of requests, process them all at once
        else $this->_process();

    }
867716
public void start() {
    try {
      mServer.start();
      LOG.info("{} started @ {}", mServiceName, mAddress);
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
916954
public void start() {
		if (state.compareAndSet(UNKNOWN, STARTING)){
			log.debug("Starting...");
			if ( (StringUtils.isBlank(startSqlCondition) || isInCondition(startSqlCondition))
					&& (StringUtils.isBlank(startSqlConditionResource) || isInConditionResource(startSqlConditionResource))
					){
				if (StringUtils.isNotBlank(startSQL)){
					executeSQL(startSQL);
				} else if (StringUtils.isNotBlank(startSqlResource)){
					executeSqlResource(startSqlResource);
				}
			}
			state.set(RUNNING);
		}else{
			log.warn("Start request ignored. Current state is: " + stateNames[state.get()]);
		}
	}
165591
protected function startup()
    {
        $this->getProcess()->setTitle('Starting');
        $this->registerSignalHandlers();

        $this->eventDispatcher->dispatch(
            ResqueWorkerEvents::START_UP,
            new WorkerEvent($this)
        );
    }
275353
public function start()
    {
        $__scope = $this->_runHooks($this->_startHooks);
        extract($__scope);
        
        $this->_write($this->_socket, self::READY);
        
        /* Note the naming of the local variables due to shared scope with the user here */
        for (;;) {
            declare (ticks = 1);
            // don't exit on ctrl-c
            pcntl_signal(SIGINT, SIG_IGN, true);
            
            $this->_cancelled = false;
            
            $__input = $this->_transform($this->_read($this->_socket));
            
            if ($__input === null) {
                continue;
            }
            
            $__response = self::DONE;
            
            $this->_ppid = posix_getpid();
            $this->_pid  = pcntl_fork();
            
            if ($this->_pid < 0) {
                throw new \RuntimeException('Failed to fork child labourer');
            } elseif ($this->_pid > 0) {
                // kill the child on ctrl-c
                pcntl_signal(SIGINT, array(
                    $this,
                    'cancelOperation'
                ), true);
                pcntl_waitpid($this->_pid, $__status);
                
                if (!$this->_cancelled && $__status != (self::ABNORMAL_EXIT << 8)) {
                    $__response = self::EXITED;
                } else {
                    $this->_runHooks($this->_failureHooks);
                    $__response = self::FAILED;
                }
            } else {
                // if the user has installed a custom exception handler, install a new
                // one which calls it and then (if the custom handler didn't already exit)
                // exits with the correct status.
                // If not, leave the exception handler unset; we'll display
                // an uncaught exception error and carry on.
                $__oldexh = set_exception_handler(array(
                    $this,
                    'delegateExceptionHandler'
                ));
                if ($__oldexh && !$this->_userExceptionHandler) {
                    $this->_userExceptionHandler = $__oldexh; // save the old handler (once)
                } else {
                    restore_exception_handler();
                }
                
                // undo ctrl-c signal handling ready for user code execution
                pcntl_signal(SIGINT, SIG_DFL, true);
                $__pid = posix_getpid();
                
                $__result = eval($__input);
                
                if (posix_getpid() != $__pid) {
                    // whatever the user entered caused a forked child
                    // (totally valid, but we don't want that child to loop and wait for input)
                    exit(0);
                }
                
                if (preg_match('/\s*return\b/i', $__input)) {
                    fwrite(STDOUT, sprintf("%s\n", $this->_inspector->inspect($__result)));
                }
                $this->_expungeOldWorker();
            }
            
            $this->_write($this->_socket, $__response);
            
            if ($__response == self::EXITED) {
                exit(0);
            }
        }
    }
1060267
def start(port, root_directory, bucket_depth):
    """"""
    application = S3Application(root_directory, bucket_depth)
    http_server = httpserver.HTTPServer(application)
    http_server.listen(port)
    ioloop.IOLoop.current().start()
15701
def start(queue, profile=None, tag='salt/engine/sqs', owner_acct_id=None):
    '''
    
    '''
    if __opts__.get('__role') == 'master':
        fire_master = salt.utils.event.get_master_event(
            __opts__,
            __opts__['sock_dir'],
            listen=False).fire_event
    else:
        fire_master = __salt__['event.send']

    message_format = __opts__.get('sqs.message_format', None)

    sqs = _get_sqs_conn(profile)
    q = None
    while True:
        if not q:
            q = sqs.get_queue(queue, owner_acct_id=owner_acct_id)
            q.set_message_class(boto.sqs.message.RawMessage)

        _process_queue(q, queue, fire_master, tag=tag, owner_acct_id=owner_acct_id, message_format=message_format)
316076
protected function start()
    {
        set_time_limit(0);

        $this->session->delete('user');
        $this->session->delete('install');
        $this->session->set('install.data', $this->data);
    }
792283
public void start() 
		{
		        try 
		        {
		            this.regularBootstrap.bind(new InetSocketAddress(regularConfiguration.getHost(), regularConfiguration.getPort()));
		            if(logger.isInfoEnabled()) {
		            logger.info(regularConfiguration.getName() + " started at " + regularConfiguration.getHost() + " : " + regularConfiguration.getPort());
		            }
		            if(this.securedConfiguration!=null)
		            {
		            	this.securedBootstrap.bind(new InetSocketAddress(securedConfiguration.getHost(), securedConfiguration.getPort()));	
		            	if(logger.isInfoEnabled()) {
		            	logger.info(securedConfiguration.getName() + " uses port : " + securedConfiguration.getPort() + " for TLS clients.");
		            	}
		            }
		        } 
		        catch (ChannelException e) 
		        {
		        	logger.error("Smpp Channel Exception:", e);
		        }
		}
217122
def start(self, on_exit_callback=None):
        
        # TODO: Support params for services by mapping {servicename: {class,
        # params}}?
        for service in self.services.keys():
            self.services[service] = self.services[service]()

        self.server.start(on_exit_callback)
544963
public function clientOnStart()
    {
        if (HTTP::request()->getFile() != 'cart.php')
        {
            return;
        }

        switch (arg('method'))
        {
            case 'addItem':
                $this->addItem(arg('class', 'word'), arg('id', 'word'), arg('count', 'int'),
                    arg('cost', '[^0-9\.]'));
                break;
            case 'changeAmount':
                $this->changeAmount(arg('class', 'word'), arg('id', 'word'), arg('amount', 'int'));
                break;
            case 'clearAll':
                $this->clearAll();
                break;
            case 'removeItem':
                $this->removeItem(arg('class', 'word'), arg('id', 'word'));
                break;
        }

        $html = $this->clientRenderBlock();
        die($html);
    }
355748
public static function startup()
    {
        global $PPHP;

        $sessionSeconds = $PPHP['config']['session']['gc_maxlifetime'] * 60;
        // Start a PHP-handled session and bind it to the current remote IP address as
        // a precaution per https://www.owasp.org/index.php/PHP_Security_Cheat_Sheet
        // We'll go one step further in _magic() and throw in User Agent details.
        ini_set('session.gc_probability', 1);
        ini_set('session.gc_gc_divisor', 1000);
        ini_set('session.gc_maxlifetime', $sessionSeconds);
        session_save_path($PPHP['dir'] . '/var/sessions');
        ini_set('session.cookie_lifetime', 0);  // Session
        ini_set('session.cookie_httponly', true);
        session_start();
        if (isset($_SESSION['magic'])) {
            if ($_SESSION['magic'] !== self::_magic()) {
                self::reset();
            };
        } else {
            self::_init();
        };
    }
854634
def start(self):
        """"""
        self.agent.submit(self._start())
        self.is_running = True
122739
protected function init()
    {
        $this->client = new Client(
            $this->getOption('user_id'),
            $this->getOption('license_key'),
            $this->getOption('locales', ['en'])
        );
    }
1350647
def start(self):
        """"""
        self.clear()
        self.setDefaultPolicy()
        self.acceptIcmp()
        self.acceptInput('lo')