=> Launch the Application
558040
def run(argv = ARGV)
      # => Parse CLI Configuration
      cli = Options.new
      cli.parse_options(argv)

      # => Grab the Default Values
      default = Config.options

      # => Parse JSON Config File (If Specified and Exists)
      json_config = Util.parse_json_config(cli.config[:config_file] || Config.config_file)

      # => Merge Configuration (CLI Wins)
      config = [default, json_config, cli.config].compact.reduce(:merge)

      # => Apply Configuration
      Config.setup do |cfg|
        cfg.config_file         = config[:config_file]
        cfg.cache_timeout       = config[:cache_timeout].to_i
        cfg.bind                = config[:bind]
        cfg.port                = config[:port]
        cfg.auth_file           = config[:auth_file]
        cfg.state_file          = config[:state_file]
        cfg.environment         = config[:environment].to_sym.downcase
        cfg.chef_api_endpoint   = config[:chef_api_endpoint]
        cfg.chef_api_client     = config[:chef_api_client]
        cfg.chef_api_client_key = config[:chef_api_client_key]
        cfg.chef_api_admin      = config[:chef_api_admin]
        cfg.chef_api_admin_key  = config[:chef_api_admin_key]
        cfg.rd_node_username    = config[:rd_node_username]
      end

      # => Launch the API
      API.run!
    end
759245
def launch_server():
    
    print(os.path.dirname(os.path.abspath(__file__)))
    cur_dir = os.getcwd()
    path = os.path.dirname(os.path.abspath(__file__))
    run = True
    os.chdir(path)
    os.system('python manage.py runserver --nostatic')
    os.chdir(cur_dir)
1286614
def start(
    context: typing.Optional[typing.Mapping] = None,
    banner: typing.Optional[str] = None,
    shell: typing.Type[Shell] = AutoShell,
    prompt: typing.Optional[str] = None,
    output: typing.Optional[str] = None,
    context_format: str = "full",
    **kwargs: typing.Any,
) -> None:
    
    logger.debug(f"Using shell: {shell!r}")
    if banner is None:
        banner = speak()
    # Default to global config
    context_ = context or _cfg["context"]
    banner_ = banner or _cfg["banner"]
    if isinstance(shell, type) and issubclass(shell, Shell):
        shell_ = shell
    else:
        shell_ = SHELL_MAP.get(shell or _cfg["shell"], _cfg["shell"])
    prompt_ = prompt or _cfg["prompt"]
    output_ = output or _cfg["output"]
    context_format_ = context_format or _cfg["context_format"]
    shell_(
        context=context_,
        banner=banner_,
        prompt=prompt_,
        output=output_,
        context_format=context_format_,
        **kwargs,
    ).start()
163218
def start(self, app):
        
        app.middlewares.insert(0, debugtoolbar_middleware_factory)
        self.global_panels = [Panel(self.app) for Panel in self.cfg.global_panels]
95537
function launchApp(appName, appState, start, debug) {

	if (Array.isArray(start)) {

		// obtain appState
		if (!appState) {
			appState = {
				app: appName,
				created: Date.now(),
				crashCount: 0,
				killMap: {}
			}
		} else for (var aPid in appState.killMap) appState.killMap[aPid]()

		// launch the app
		var args = start.slice() // clone the array
		var command = args.shift() // extract command
		var child = child_process.spawn(command, args, options)
			.on('exit', childExit)
		streamlabeller.logChild(child, appName, write)
		var pid = appState.pid = child.pid
		appState.killMap[pid] = killChild
		var didKill
		var pendingKill
		var killTimer

		// update ui
		appState.lastLaunch = Date.now()
		appState.state = debug ? 'debug' : 'run'
		sendToUi({app: appName, pid: appState.pid, state: appState.state, lastLaunch: appState.lastLaunch})

	} else sendToUi({error: 'Bad launch command', isConfig: true, message: {app: appName}})

	return appState

	function killChild() {
		delete appState.killMap[pid]

		var t
		if (!didKill) {
			didKill = true
			pendingKill = true

			// update ui
			if (appState.pid == pid) {
				appState.state = 'stopping'
				sendToUi({app: appName, state: appState.state})
			}

			// attempt graceful kill (ctrl-Break)
			t = Date.now()
			killTimer = setTimeout(sigResult, graceKillPeriod)
			process.kill(pid, 'SIGINT')
		}

		function sigResult() {
			killTimer = null
			if (pendingKill) { // the process did not die
				//console.log(processName, proc.app, 'Force kill at: ' + (Date.now() - t) / 1e3)
				// now the evil sigterm
				process.kill(pid)
			}
		}
	}

	function childExit(code) {
		delete appState.killMap[pid]
		child.removeListener('exit', childExit)
		pendingKill = false
		if (killTimer) {
			clearTimeout(killTimer)
			killTimer = null
		}
		if (!didKill) appState.crashCount++
		if (appState.pid == pid) {
			appState.pid = 0
			appState.exitCode = code
			appState.lastExit = Date.now()
			appState.state = didKill ? 'stop' : 'crash'
			if (!didKill) appState.lastCrash = appState.lastExit
			sendToUi({app: appName, exit: appState.exitCode, state: appState.state, lastExit: appState.lastExit})
		}
		child = null
	}

}
115273
def main():
    """"""

    # in contrast to argparse, this works at least under Python < 2.7
    import optparse
    from .utils import import_string

    parser = optparse.OptionParser(usage="Usage: %prog [options] app_module:app_object")
    parser.add_option(
        "-b",
        "--bind",
        dest="address",
        help="The hostname:port the app should listen on.",
    )
    parser.add_option(
        "-d",
        "--debug",
        dest="use_debugger",
        action="store_true",
        default=False,
        help="Use Werkzeug's debugger.",
    )
    parser.add_option(
        "-r",
        "--reload",
        dest="use_reloader",
        action="store_true",
        default=False,
        help="Reload Python process if modules change.",
    )
    options, args = parser.parse_args()

    hostname, port = None, None
    if options.address:
        address = options.address.split(":")
        hostname = address[0]
        if len(address) > 1:
            port = address[1]

    if len(args) != 1:
        sys.stdout.write("No application supplied, or too much. See --help\n")
        sys.exit(1)
    app = import_string(args[0])

    run_simple(
        hostname=(hostname or "127.0.0.1"),
        port=int(port or 5000),
        application=app,
        use_reloader=options.use_reloader,
        use_debugger=options.use_debugger,
    )
1294699
public function launching()
    {
        /**
         * registering default commands
         */
        $this->with([self::PROVIDES_SERVICE], function (IBladedManager $manager) {
            $manager->registerCommandNamespace('scope', Scope::class);
            \phpQuery::newDocument();
            $manager->registerCommandNamespace('form', Form::class);
            $manager->registerCommandNamespace('template', Template::class);
        });
    }
267010
def run(entry_point, drivers, loop = None):
    ''' 
    '''
    program = setup(entry_point, drivers)
    dispose = program.run()
    if loop == None:
        loop = asyncio.get_event_loop()

    loop.run_forever()
    dispose()
197008
def main(**kwargs):
    """"""
    options = ApplicationOptions(**kwargs)
    Event.configure(is_logging_enabled=options.event_logging)
    application = Application(options)
    application.run(options.definition)
69088
def run_app(self):
        """"""
        # Update system arguments
        sys.argv[0] = sys.executable
        sys.argv[1] = '{}.py'.format(sys.argv[1])

        # Make sure to exit with the return value from the subprocess call
        self._app_process = subprocess.Popen(sys.argv)
        return self._app_process.wait()
901948
def run(context, port):
    
    global ctx
    ctx = context
    app.run(port=port)
677018
def launch(self, callback_function=None):
        
        self._check_registered()

        self._socket_client.receiver_controller.launch_app(
            self.supporting_app_id, callback_function=callback_function)
1249723
def _execute(self, app_, file_):
        
        app_name = os.path.basename(app_)
        args = [app_]
        args.extend(self.args[app_])
        args.append(file_)
        process = subprocess.Popen(args)

        time.sleep(1)
        status = {True: Status.SUCCESS, False: Status.FAILED}
        crashed = process.poll()
        result = status[crashed is None]
        self.stats_.add(app_name, result)
        if result is Status.SUCCESS:
            # process did not crash, so just terminate it
            process.terminate()
1060845
def _start(self):
        """"""
        assert self._tempdir is not None
        assert self._process is None
        self._process = subprocess.Popen(
            [
                self.paths.slapd,
                '-f', self._slapd_conf,
                '-h', self.uri,
                '-d', str(self.slapd_debug),
            ],
            stdout=sys.stdout,
            stderr=sys.stderr,
        )
        self._poll_slapd(timeout=self.max_server_startup_delay)
447932
def start():
    """"""
    global app
    bottle.run(app, host=conf.WebHost, port=conf.WebPort,
               debug=conf.WebAutoReload, reloader=conf.WebAutoReload,
               quiet=conf.WebQuiet)
210032
def main():
        
        app = QApplication(sys.argv)
        rlbot_icon = QtGui.QIcon(os.path.join(get_rlbot_directory(), 'img', 'rlbot_icon.png'))
        app.setWindowIcon(rlbot_icon)
        window = RLBotQTGui()
        window.show()
        app.exec_()
819965
public final Thread launch() {

		if (state != RUN) {
			onLaunch();
			state = RUN;
			Thread thread = (new Thread(this));
			thread.start();
			return thread;
		} else {
			return null;
		}
	}