This is the entry point method.
11957
public void onModuleLoad() {
		DockPanel dock = new DockPanel();
		dock.addStyleName("mainBackground");
		dock.setWidth("700px");
		dock.setHeight("300px");
		dock.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		dock.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);

		dock.add(createHeader(), DockPanel.NORTH);

		// Time Picker Examples
		dock.add(createTimePicker(), DockPanel.WEST);
		// Time Picker Small Examples
		dock.add(createSmallTimePicker(), DockPanel.WEST);
		// iOSButton Examples
		dock.add(createIOSButton(), DockPanel.WEST);
		// DatePicker Examples
		dock.add(createDatePicker(), DockPanel.WEST);

		RootPanel.get().add(dock);
	}
991778
public void start()
  {
    Thread thread = Thread.currentThread();
    ClassLoader oldLoader = thread.getContextClassLoader();

    try {
      thread.setContextClassLoader(_classLoader);

      if (! _lifecycle.toStarting())
        return;

      _startTime = CurrentTime.currentTime();

      if (! CurrentTime.isTest()) {
        log.info("");

        log.info(Version.getFullVersion());

        log.info("");

        log.info(System.getProperty("os.name")
                 + " " + System.getProperty("os.version")
                 + " " + System.getProperty("os.arch"));

        log.info(System.getProperty("java.runtime.name")
                 + " " + System.getProperty("java.runtime.version")
                 + ", " + System.getProperty("file.encoding")
                 + ", " + System.getProperty("user.language"));

        log.info(System.getProperty("java.vm.name")
                 + " " + System.getProperty("java.vm.version")
                 + ", " + System.getProperty("sun.arch.data.model")
                 + ", " + System.getProperty("java.vm.info")
                 + ", " + System.getProperty("java.vm.vendor"));

        log.info("");

        log.info("user.name  = " + System.getProperty("user.name"));
      }

      startSystems();

      _lifecycle.toActive();

      for (AfterServerStartListener listener : _afterStartListeners) {
        listener.afterStart();
      }
    } finally {
      if (! _lifecycle.isActive())
        _lifecycle.toError();

      thread.setContextClassLoader(oldLoader);
    }
  }
5515
public function main()
    {
        LibraryLoader::includeAll();

        $this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
        $this->doc->backPath = $GLOBALS['BACK_PATH'];

        if ($GLOBALS['BE_USER']->user['admin']) {
            $this->doc->bodyTagAdditions = 'id="doc3"';

            $this->addAdditionalHeaderData();

            $this->cleanOutputBuffers();
            $this->outputService->output(
                $this->doc->startPage($this->translate('title')) .
                $this->doc->header(\PHPUnit_Runner_Version::getVersionString())
            );

            $this->renderRunTests();

            $this->outputService->output(
                $this->doc->section(
                    $this->translate('shortcuts.title'),
                    '<p>' . $this->translate('shortcuts.text') . '</p>
                    <p>' . $this->translate('shortcuts.browser_dependency') . '</p>
                    <ul>
                    <li>' . $this->translate('shortcuts.browser_safari_ie') . '</li>
                    <li>' . $this->translate('shortcuts.browser_firefox') . '</li>
                    </ul>'
                )
            );
        } else {
            $this->outputService->output(
                $this->doc->startPage($this->translate('title')) .
                $this->doc->header($this->translate('title')) .
                $this->translate('admin_rights_needed')
            );
        }

        $this->outputService->output($this->doc->endPage());
    }
488178
def start(self):
        
        component = Component(self.config, self.handlers)
        component.run()
875562
def entry_point(self, entry_point):
        
        if len(entry_point.split(',')) == 1:
            self._params.update(
                href=self._resource.get(entry_point))
            return self
        else:
            self._params.update(
                filter_context=entry_point)
            return self
901400
public function main()
    {
        $tool = $this->getToolPath($this->format);
        if (count($this->filterChains)) {
            $this->fileUtils = new FileUtils();
        }

        if ($this->file != '') {
            $file = $this->file;
            $targetFile = $this->getTargetFile($file, $this->destination);
            $this->render($tool, $file, $targetFile);

            return;
        }

        if (!count($this->filesets)) {
            throw new BuildException(
                '"file" attribute or "fileset" subtag required'
            );
        }

        // process filesets
        $mapper = null;
        if ($this->mapperElement !== null) {
            $mapper = $this->mapperElement->getImplementation();
        }

        $project = $this->getProject();
        foreach ($this->filesets as $fs) {
            $ds = $fs->getDirectoryScanner($project);
            $fromDir = $fs->getDir($project);
            $srcFiles = $ds->getIncludedFiles();

            foreach ($srcFiles as $src) {
                $file = new PhingFile($fromDir, $src);
                if ($mapper !== null) {
                    $results = $mapper->main($file);
                    if ($results === null) {
                        throw new BuildException(
                            sprintf(
                                'No filename mapper found for "%s"',
                                $file
                            )
                        );
                    }
                    $targetFile = reset($results);
                } else {
                    $targetFile = $this->getTargetFile($file, $this->destination);
                }
                $this->render($tool, $file, $targetFile);
            }
        }
    }
1375034
public function main()
    {
        if ($this->remove) {
            if ($this->name === null || $this->name === "") {
                throw new BuildException("The 'name' attribute is required with 'unset'.");
            }
            $this->removeProperty($this->name);
            return;
        }
        if ($this->file === null) {
            // check for the required name attribute
            if ($this->name === null || $this->name === '') {
                throw new BuildException("The 'name' attribute is required.");
            }

            // adjust the property value if necessary -- is this necessary?
            // Doesn't Ant do this automatically?
            $this->value = $this->getProject()->replaceProperties($this->value);

            // set the property
            $this->forceProperty($this->name, $this->value);
        } else {
            if (!$this->file->exists()) {
                throw new BuildException($this->file->getAbsolutePath() . " does not exists.");
            }
            $this->loadFile($this->file);
        }
    }
1054929
public void start()
    {
        if (!state.compareAndSet(State.LATENT, State.STARTING)) {
            throw new IllegalStateException("System already starting");
        }
        for (LifeCycleListener listener : listeners) {
            listener.startingLifeCycle();
        }

        for (Object obj : managedInstances) {
            LifeCycleMethods methods = methodsMap.get(obj.getClass());
            if (!methods.hasFor(PreDestroy.class)) {
                managedInstances.remove(obj);   // remove reference to instances that aren't needed anymore
            }
        }

        state.set(State.STARTED);
        for (LifeCycleListener listener : listeners) {
            listener.startedLifeCycle();
        }
    }
905604
def start():
    
    pool = gevent.threadpool.ThreadPool(len(ENTRYPOINTS))
    for entrypoint, callback, args, kwargs in ENTRYPOINTS:
        cname = callback.__name__
        #1. Retrieve the class which owns the callback
        for name, klass in inspect.getmembers(sys.modules[callback.__module__], inspect.isclass):
            if hasattr(klass, cname):
                service_name = name.lower()
                break
        #2.Start the entrypoint
        callback = getattr(klass(), cname)
        kwargs.update({'service':service_name, 'callback':callback, 'callback_name': cname})
        LOGGER.info('Start service %s[%s].', service_name.capitalize(), cname)
        obj = entrypoint(*args, **kwargs)
        pool.spawn(obj.start, *args, **kwargs)
    pool.join()
    return True
580756
public function main()
    {
        // check to make sure task received all correct params
        $this->validate();

        $generatorConfig = $this->getGeneratorConfig();
        $totalNbFiles = 0;

        $dataModels = $this->getDataModels();
        $this->log('Generating PHP files...');

        foreach ($dataModels as $dataModel) {
            $this->log("Datamodel: " . $dataModel->getName(), Project::MSG_VERBOSE);

            foreach ($dataModel->getDatabases() as $database) {

                if ($this->getGeneratorConfig()->getBuildProperty('disableIdentifierQuoting')) {
                    $database->getPlatform()->setIdentifierQuoting(false);
                }

                $this->log(" - Database: " . $database->getName(), Project::MSG_VERBOSE);

                foreach ($database->getTables() as $table) {

                    if (!$table->isForReferenceOnly()) {

                        $nbWrittenFiles = 0;

                        $this->log("  + Table: " . $table->getName(), Project::MSG_VERBOSE);

                        // -----------------------------------------------------------------------------------------
                        // Create Peer, Object, and TableMap classes
                        // -----------------------------------------------------------------------------------------

                        // these files are always created / overwrite any existing files
                        foreach (array('peer', 'object', 'tablemap', 'query') as $target) {
                            $builder = $generatorConfig->getConfiguredBuilder($table, $target);
                            $nbWrittenFiles += $this->build($builder);
                        }

                        // -----------------------------------------------------------------------------------------
                        // Create [empty] stub Peer and Object classes if they don't exist
                        // -----------------------------------------------------------------------------------------

                        // these classes are only generated if they don't already exist
                        foreach (array('peerstub', 'objectstub', 'querystub') as $target) {
                            $builder = $generatorConfig->getConfiguredBuilder($table, $target);
                            $nbWrittenFiles += $this->build($builder, $overwrite = false);
                        }

                        // -----------------------------------------------------------------------------------------
                        // Create [empty] stub child Object classes if they don't exist
                        // -----------------------------------------------------------------------------------------

                        // If table has enumerated children (uses inheritance) then create the empty child stub classes if they don't already exist.
                        if ($col = $table->getChildrenColumn()) {
                            if ($col->isEnumeratedClasses()) {
                                foreach ($col->getChildren() as $child) {
                                    foreach (array('queryinheritance') as $target) {
                                        if (!$child->getAncestor()) {
                                            continue;
                                        }
                                        $builder = $generatorConfig->getConfiguredBuilder($table, $target);
                                        $builder->setChild($child);
                                        $nbWrittenFiles += $this->build($builder, $overwrite = true);
                                    }
                                    foreach (array('objectmultiextend', 'queryinheritancestub') as $target) {
                                        $builder = $generatorConfig->getConfiguredBuilder($table, $target);
                                        $builder->setChild($child);
                                        $nbWrittenFiles += $this->build($builder, $overwrite = false);
                                    }
                                } // foreach
                            } // if col->is enumerated
                        } // if tbl->getChildrenCol


                        // -----------------------------------------------------------------------------------------
                        // Create [empty] Interface if it doesn't exist
                        // -----------------------------------------------------------------------------------------

                        // Create [empty] interface if it does not already exist
                        if ($table->getInterface()) {
                            $builder = $generatorConfig->getConfiguredBuilder($table, 'interface');
                            $nbWrittenFiles += $this->build($builder, $overwrite = false);
                        }

                        // -----------------------------------------------------------------------------------------
                        // Create tree Node classes
                        // -----------------------------------------------------------------------------------------

                        if ($table->treeMode()) {
                            switch ($table->treeMode()) {
                                case 'NestedSet':
                                    foreach (array('nestedsetpeer', 'nestedset') as $target) {
                                        $builder = $generatorConfig->getConfiguredBuilder($table, $target);
                                        $nbWrittenFiles += $this->build($builder);
                                    }
                                    break;

                                case 'MaterializedPath':
                                    foreach (array('nodepeer', 'node') as $target) {
                                        $builder = $generatorConfig->getConfiguredBuilder($table, $target);
                                        $nbWrittenFiles += $this->build($builder);
                                    }

                                    foreach (array('nodepeerstub', 'nodestub') as $target) {
                                        $builder = $generatorConfig->getConfiguredBuilder($table, $target);
                                        $nbWrittenFiles += $this->build($builder, $overwrite = false);
                                    }
                                    break;

                                case 'AdjacencyList':
                                    // No implementation for this yet.
                                default:
                                    break;
                            }
                        } // if Table->treeMode()

                        // ----------------------------------
                        // Create classes added by behaviors
                        // ----------------------------------
                        if ($table->hasAdditionalBuilders()) {
                            foreach ($table->getAdditionalBuilders() as $builderClass) {
                                $builder = new $builderClass($table);
                                $builder->setGeneratorConfig($generatorConfig);
                                $nbWrittenFiles += $this->build($builder, isset($builder->overwrite) ? $builder->overwrite : true);
                            }
                        }

                        $totalNbFiles += $nbWrittenFiles;
                        if ($nbWrittenFiles == 0) {
                            $this->log("\t\t(no change)", Project::MSG_VERBOSE);
                        }
                    } // if !$table->isForReferenceOnly()

                } // foreach table

            } // foreach database

        } // foreach dataModel
        if ($totalNbFiles) {
            $this->log(sprintf("Object model generation complete - %d files written", $totalNbFiles));
        } else {
            $this->log("Object model generation complete - All files already up to date");
        }
    }
1343891
def main_callback(self, *args, **kwargs):
        
        if not self.callback:
            raise NotImplementedError('Entrypoints must declare `callback`')
        if not self.settings:
            raise NotImplementedError('Entrypoints must declare `settings`')

        self.callback.im_self.db = None

        #1. Start all the middlewares
        with self.debug(*args, **kwargs):
            with self.database():
                #2. `Real` callback
                result = self.callback(*args, **kwargs)#pylint: disable=not-callable
        return result
507634
def main(cls):
        
        chain = cls.create()
        args = chain._run_argparser(sys.argv[1:])
        chain._run_chain(sys.stdout, args.dry_run)
        chain._finalize(args.dry_run)
131306
public function main()
    {
        $this->validate();
        $this->datetimeTaskStart = new \DateTimeImmutable();

        if ($this->describeMainStack()) {
            $this->updateStacks();
        } else {
            $this->creationStacks();
        }

        while (!$this->stackIsReady()) {
            sleep(3);
            if (empty($this->events)) {
                $this->log("Waiting for stack provisioning...");
            }
        }

        $stacks = $this->describeMainStack($e);

        if (null === $stacks) {
            throw $e;
        }

        $outputLog = '';

        if ($stacks[0]['Outputs']) {
            foreach ($stacks[0]['Outputs'] as $row) {
                $outputLog .= PHP_EOL . $row['OutputKey'] . ': ' . $row['OutputValue'];
                if ($output = $this->getOutput($row['OutputKey'])) {
                    /** @var StackOutput $output */
                    $this->project->setProperty($output->getProperty(), $row['OutputValue']);
                }
            }
        }

        $this->log($outputLog);
    }
877759
def entry_point() -> None:
    """"""

    # make sure the path contains the current working directory
    sys.path.insert(0, os.getcwd())

    parser = get_cxflow_arg_parser(True)

    # parse CLI arguments
    known_args, unknown_args = parser.parse_known_args()

    # show help if no subcommand was specified.
    if not hasattr(known_args, 'subcommand'):
        parser.print_help()
        quit(1)

    # set up global logger
    logger = logging.getLogger('')
    logger.setLevel(logging.DEBUG if known_args.verbose else logging.INFO)
    logger.handlers = []  # remove default handlers

    # set up STDERR handler
    stderr_handler = logging.StreamHandler(sys.stderr)
    stderr_handler.setFormatter(logging.Formatter(CXF_LOG_FORMAT, datefmt=CXF_LOG_DATE_FORMAT))
    logger.addHandler(stderr_handler)

    if known_args.subcommand == 'train':
        train(config_path=known_args.config_file, cl_arguments=unknown_args, output_root=known_args.output_root)

    elif known_args.subcommand == 'resume':
        resume(config_path=known_args.config_path, restore_from=known_args.restore_from, cl_arguments=unknown_args,
               output_root=known_args.output_root)

    elif known_args.subcommand == 'predict':
        logging.warning('Predict command is deprecated and will be removed, use ``cxflow eval predict ...`` instead')
        predict(config_path=known_args.config_path, restore_from=known_args.restore_from, cl_arguments=unknown_args,
                output_root=known_args.output_root)

    elif known_args.subcommand == 'eval':
        evaluate(model_path=known_args.model_path, stream_name=known_args.stream_name,
                 config_path=known_args.config, cl_arguments=unknown_args, output_root=known_args.output_root)

    elif known_args.subcommand == 'dataset':
        invoke_dataset_method(config_path=known_args.config_file, method_name=known_args.method,
                              cl_arguments=unknown_args, output_root=known_args.output_root)

    elif known_args.subcommand == 'gridsearch':
        grid_search(script=known_args.script, params=known_args.params, dry_run=known_args.dry_run)

    elif known_args.subcommand == 'ls':
        list_train_dirs(known_args.dir, known_args.recursive, known_args.all, known_args.long, known_args.verbose)

    elif known_args.subcommand == 'prune':
        prune_train_dirs(known_args.dir, known_args.epochs, known_args.subdirs)
1237588
public function main()
    {
        $this->validate();

        $cloudFormation = $this->getService();

        $stackProperties = [
            'StackName' => $this->getName(),
        ];

        $killed = false;
        $counter = 0;

        while (!$killed && $counter <= $this->getTimeOut()) {
            try {
                $cloudFormation->describeStacks($stackProperties);
            } catch (\Exception $e) {
                $killed = true;
            }

            sleep(1);

            $counter++;
        }
    }
846744
public function main()
    {
        $this->validateAttributes();

        if ($this->action == 'w') {
            $this->write();
        } elseif ($this->action == 'r') {
            $this->read();
        }
    }
42426
@PostConstruct
    public void start() {
        threadFactory = Executors.defaultThreadFactory();
        disruptor = new Disruptor<>(Registration.FACTORY,
                ringSize,
                threadFactory,
                ProducerType.MULTI,
                new BlockingWaitStrategy());
        disruptor.handleEventsWith(new ContainerEventHandler());
        ringBuffer = disruptor.start();
    }