Initialize the agent
498588
function load() {
        _load = new $.Deferred();
        Inspector.Page.on("frameNavigated.RemoteAgent", _onFrameNavigated);
        Inspector.Page.on("frameStartedLoading.RemoteAgent", _stopKeepAliveInterval);
        Inspector.DOM.on("attributeModified.RemoteAgent", _onAttributeModified);

        return _load.promise();
    }
640669
private void initialize() {
		this.setCursor(new java.awt.Cursor(java.awt.Cursor.WAIT_CURSOR));
		this.setResizable(false);
		this.setContentPane(getAboutPanel());
		this.pack();
		centerFrame();
	}
1057980
function initialize() {
    if (global.isVinn) {
      tr.isVinn = true;
    } else if (global.process && global.process.versions.node) {
      tr.isNode = true;
    } else {
      tr.isVinn = false;
      tr.isNode = false;
      tr.doc = document;

      tr.isMac = /Mac/.test(navigator.platform);
      tr.isWindows = /Win/.test(navigator.platform);
      tr.isChromeOS = /CrOS/.test(navigator.userAgent);
      tr.isLinux = /Linux/.test(navigator.userAgent);
    }
    tr.isHeadless = tr.isVinn || tr.isNode;
  }
177077
def agent():
  """"""
  agent_module, agent_name = FLAGS.agent.rsplit(".", 1)
  agent_cls = getattr(importlib.import_module(agent_module), agent_name)

  logging.info("Starting agent:")
  with lan_sc2_env.LanSC2Env(
      host=FLAGS.host,
      config_port=FLAGS.config_port,
      race=sc2_env.Race[FLAGS.agent_race],
      step_mul=FLAGS.step_mul,
      agent_interface_format=sc2_env.parse_agent_interface_format(
          feature_screen=FLAGS.feature_screen_size,
          feature_minimap=FLAGS.feature_minimap_size,
          rgb_screen=FLAGS.rgb_screen_size,
          rgb_minimap=FLAGS.rgb_minimap_size,
          action_space=FLAGS.action_space,
          use_feature_units=FLAGS.use_feature_units),
      visualize=FLAGS.render) as env:
    agents = [agent_cls()]
    logging.info("Connected, starting run_loop.")
    try:
      run_loop.run_loop(agents, env)
    except lan_sc2_env.RestartException:
      pass
  logging.info("Done.")
1287496
public void setup() {

        LogActivator.logToFile(logger, this.getName(), Level.ALL);

        // Add the agent to the introspector and obtain the introspector
        // instance.
        introspector = JadeAgentIntrospector.getMyInstance(this);
        logger.fine("Agent " + this.getLocalName()
                + " added to the Intrsopector");

        try {
            this.myMockConfiguration = (MockConfiguration) this.getArguments()[0];
        } catch (Exception e) {
            logger.warning("There was an error reading the BridgeMockAgent configuration.");
            logger.fine("The stack trace: \n" + e.getStackTrace());
            // TODO think about implement this exception or not.
            // throw new BadConfigurationException();
            throw new IllegalArgumentException(
                    "The mock agent didn't receive a configuration"
                            + " object. The first argument have to be a MockConfiguration object");
        }

        // Initialize the believes counts and the mailbox list. 
//        introspector.storeBeliefValue(this, Definitions.RECEIVED_MESSAGE_COUNT, 0);
//        introspector.storeBeliefValue(this, Definitions.SENDED_MESSAGE_COUNT, 0);
        this.mailbox = new ArrayList<ACLMessage>();

        // Attemps to register the aggent.
        boolean register = false;
        for (int i = 0; !register; i++) {
            try {
                AgentRegistration.registerAgent(this,
                        myMockConfiguration.getDFservice(),
                        Definitions.BRIDGE_SERVICE_TYPE);
                // TODO Service_Type could be a custom field of
                // MockCondiguration.
                register = true;
            } catch (FIPAException e) {
                logger.warning("Exception while registering the RespositoryMockAgent");
            }
            if (i >= Definitions.REG_ATTEMPTS) {
                break;
                // TODO check if is necessary to implement this exception.
                // throw new
                // UnableToRegisterException(e.getStackTrace().toString());
            }
        }

        // Adds the behavior that listen for incoming messages.
        addBehaviour(new Listen(this));
    }
835269
public function initializeAction()
    {
        foreach ($this->settings as $key => $value) {
            // Transfer settings to conf
            $this->conf[$key] = $value;

            if (strpos($key, 'Path') !== false) {
                // Let TYPO3 try to process path settings as a path, so we can
                // use EXT: in the paths.
                $processedPath = $GLOBALS['TSFE']->tmpl->getFileName($value);
                if ($processedPath) {
                    $this->conf[$key] = $processedPath;
                }
            }
        }

        $this->query = $this->createQuery();
        $this->query->setQueryFromArguments($this->request->getArguments());
    }
309480
public function initialize(): void
    {
        $this->twig = new Environment($this->getLoader(), $this->resolveConfig());

        $this->getEventManager()->dispatch(ConstructEvent::create($this, $this->twig));

        $this->_ext = self::EXT;

        parent::initialize();
    }
751801
public function init()
	{
		self::$app = $this;

		spl_autoload_register(array($this['loader'], 'load'));

		$this->registerProviders();
		$this->registerAliases();
	}
661151
def __init(self):
        """"""
        res = self._get(url=self._url,
                           param_dict={"f": "json"},
                           securityHandler=self._securityHandler,
                           proxy_url=self._proxy_url,
                           proxy_port=self._proxy_port)
        self._json_dict = res
        self._json_string = json.dumps(self._json_dict)
        for k,v in self._json_dict.items():
            setattr(self, k, v)
1255311
private function init()
    {
        $this->curl = curl_init();
        $this->setUserAgent(self::USER_AGENT);
        $this->setOpt(CURLINFO_HEADER_OUT, true);
        $this->setOpt(CURLOPT_HEADER, false);
        $this->setOpt(CURLOPT_RETURNTRANSFER, true);
        $this->setOpt(CURLOPT_HEADERFUNCTION, array($this, 'addResponseHeaderLine'));
        return $this;
    }
854634
def start(self):
        """"""
        self.agent.submit(self._start())
        self.is_running = True
355036
public function init()
    {
        if ($this->isEnabled()) {
            $this->client = \PHPDaemon\Clients\IRC\Pool::getInstance();
        }
    }
190901
public void init() {
        this.session.getAgenda().getAgendaGroup( "register neighbor" ).setFocus();
        this.session.fireAllRules();
        this.session.getAgenda().getAgendaGroup( "calculate" ).clear();
    }
625322
protected function initialize()
    {
        if ($this->initialized === true) {
            return;
        }
        $this->initialized = true;
        $this->buildFullConfiguration();
        $this->applyPostprocessing();
    }
1095673
public void startAgent (AgentObject agent)
    {
        agent.setLocal(AgentData.class, new AgentData());

        Bureau bureau = _bureaus.get(agent.bureauId);
        if (bureau != null && bureau.ready()) {
            _omgr.registerObject(agent);

            log.info("Bureau ready, sending createAgent", "agent", agent.which());
            BureauSender.createAgent(bureau.clientObj, agent.getOid());
            bureau.agentStates.put(agent, AgentState.STARTED);
            bureau.summarize();
            return;
        }

        if (bureau == null) {
            LauncherEntry launcherEntry = _launchers.get(agent.bureauType);
            if (launcherEntry == null) {
                log.warning("Launcher not found", "agent", agent.which());
                return;
            }

            log.info("Creating new bureau", "bureauId", agent.bureauId, "launcher", launcherEntry);
            bureau = new Bureau();
            bureau.bureauId = agent.bureauId;
            bureau.token = generateToken(bureau.bureauId);
            bureau.launcherEntry = launcherEntry;
            _invoker.postUnit(new LauncherUnit(bureau, _omgr));
            _bureaus.put(agent.bureauId, bureau);
        }

        _omgr.registerObject(agent);
        bureau.agentStates.put(agent, AgentState.PENDING);

        log.info("Bureau not ready, pending agent", "agent", agent.which());
        bureau.summarize();
    }
20685
public function init()
    {
        $this->callee = $this->project->createTask("phing");
        $this->callee->setOwningTarget($this->getOwningTarget());
        $this->callee->setTaskName($this->getTaskName());
        $this->callee->setHaltOnFailure(true);
        $this->callee->setLocation($this->getLocation());
        $this->callee->init();
    }
135504
protected function init()
    {
        $this->addOption('d')
            ->alias('delay')
            ->defaultValue(0)
            ->description('Delay time for failed job to wait next run.');

        $this->addOption('a')
            ->alias('all')
            ->defaultValue(false)
            ->description('Retry all failed jobs.');
    }