Executes the Statik site generator using the given parameters.
330573
def generate(input_path, output_path=None, in_memory=False, safe_mode=False, error_context=None):
    
    project = StatikProject(input_path, safe_mode=safe_mode, error_context=error_context)
    return project.generate(output_path=output_path, in_memory=in_memory)
108976
@Override
    public void run(SiteProcedureConnection siteConnection)
    {
        LatencyWatchdog.pet();

        waitOnDurabilityBackpressureFuture();
        if (HOST_DEBUG_ENABLED) {
            hostLog.debug("STARTING: " + this);
        }
        final VoltTrace.TraceEventBatch traceLog = VoltTrace.log(VoltTrace.Category.SPI);
        if (traceLog != null) {
            traceLog.add(() -> VoltTrace.beginDuration("runsptask",
                                                       "txnId", TxnEgo.txnIdToString(getTxnId()),
                                                       "partition", Integer.toString(siteConnection.getCorrespondingPartitionId())));
        }

        if (!m_txnState.isReadOnly()) {
            m_txnState.setBeginUndoToken(siteConnection.getLatestUndoToken());
        }

        // cast up here .. ugly.
        SpTransactionState txnState = (SpTransactionState)m_txnState;

        InitiateResponseMessage response;
        int originalTimeout = siteConnection.getBatchTimeout();
        int individualTimeout = m_txnState.getInvocation().getBatchTimeout();
        try {
            // run the procedure with a specific individual timeout
            if (BatchTimeoutOverrideType.isUserSetTimeout(individualTimeout) ) {
                siteConnection.setBatchTimeout(individualTimeout);
            }
            response = processInitiateTask(txnState.m_initiationMsg, siteConnection);
        } finally {
            // reset the deployment timeout value back to its original value
            if (BatchTimeoutOverrideType.isUserSetTimeout(individualTimeout) ) {
                siteConnection.setBatchTimeout(originalTimeout);
            }
        }

        if (!response.shouldCommit()) {
            m_txnState.setNeedsRollback(true);
        }
        completeInitiateTask(siteConnection);
        response.m_sourceHSId = m_initiator.getHSId();
        if (txnState.m_initiationMsg != null && !(txnState.m_initiationMsg.isForReplica())) {
            response.setExecutedOnPreviousLeader(true);
        }
        m_initiator.deliver(response);
        if (EXEC_TRACE_ENABLED) {
            execLog.l7dlog( Level.TRACE, LogKeys.org_voltdb_ExecutionSite_SendingCompletedWUToDtxn.name(), null);
        }
        if (HOST_DEBUG_ENABLED) {
            hostLog.debug("COMPLETE: " + this);
        }
        if (traceLog != null) {
            traceLog.add(VoltTrace::endDuration);
        }

        logToDR(siteConnection.getDRGateway(), txnState);
    }
667300
def execute(self, conn, site_name= "", transaction = False):
        
        sql = self.sql
        if site_name == "":
            result = self.dbi.processData(sql, conn=conn, transaction=transaction)
        else:
            sql += "WHERE S.SITE_NAME = :site_name" 
            binds = { "site_name" : site_name }
            result = self.dbi.processData(sql, binds, conn, transaction)
        return self.formatDict(result)
384246
public function execute()
	{
		$sitecodes = (array) $this->{$this->fieldSite};
		$controllers = (array) $this->{$this->fieldController};
		$tsconfig = $this->{$this->fieldTSconfig};

		$conf = Base::parseTS( $tsconfig );
		Scheduler\Base::execute( $conf, $controllers, $sitecodes );

		return true;
	}
1226624
def execute(self):  # pylint: disable=no-self-use
        """"""
        if os.path.isfile('runway.yml'):
            print('Runway config already present')
            sys.exit(1)
        with open('runway.yml', 'w') as stream:
            stream.write("""---
deployments:
  - modules:
      - nameofmyfirstmodulefolder
      - nameofmysecondmodulefolder
      # - etc...
    regions:
      - us-east-1
""")
        print('runway.yml generated')
        print('See additional getting started information at '
              'https://docs.onica.com/projects/runway/en/latest/how_to_use.html')
506488
public void run() throws Exception {
        if (ranges == null) {
            throw new ModelsIllegalargumentException("No ranges have been defined for the parameter space.", this);
        }

        createSwarm();
        double[] previous = null;
        while( iterationStep <= maxIterations ) {
            updateSwarm();

            if (printStep()) {
                System.out.println(prefix + " - ITER: " + iterationStep + " global best: " + globalBest + " - for positions: "
                        + Arrays.toString(globalBestLocations));
            }

            if (function.hasConverged(globalBest, globalBestLocations, previous)) {
                break;
            }
            previous = globalBestLocations.clone();
        }
    }
1010332
private void executeBuildPlugins() {
        try {
            Enumeration<URL> dmpPlugins = Thread.currentThread().getContextClassLoader().getResources(DMP_PLUGIN_DESCRIPTOR);
            while (dmpPlugins.hasMoreElements()) {

                URL dmpPlugin = dmpPlugins.nextElement();
                File outputDir = getAndEnsureOutputDirectory();
                processDmpPluginDescription(dmpPlugin, outputDir);
            }
        } catch (IOException e) {
            log.error("Cannot load dmp-plugins from %s", DMP_PLUGIN_DESCRIPTOR);
        }
    }
1328802
def do_execute(self):
        
        generator = datagen.DataGenerator.make_copy(self.resolve_option("setup"))
        generator.dataset_format = generator.define_data_format()
        if bool(self.resolve_option("incremental")) and generator.single_mode_flag:
            for i in range(generator.num_examples_act):
                self._output.append(Token(generator.generate_example()))
        else:
            data = generator.generate_examples()
            self._output.append(Token(data))
        return None
171936
public function run()
    {
        $writer = $this->app->make(SitemapWriter::class);
        if (method_exists($this, 'canIncludePageInSitemap')) {
            // Add support for deprecated custom canIncludePageInSitemap
            $pageListGenerator = $this->app->make(DeprecatedPageListGenerator::class);
            $pageListGenerator->setDeprecatedChecker(function ($page, $instances) {
                return $this->canIncludePageInSitemap($page, $instances);
            });
            $writer->getSitemapGenerator()->setPageListGenerator($pageListGenerator);
        }
        $generator = $writer->getSitemapGenerator();
        if ($generator->getSiteCanonicalUrl() === '') {
            $request = $this->app->make(Request::class);
            if (!$request->getHost()) {
                throw new UserMessageException(t('Canonical URL is not set and there is no HTTP request to retrieve the site URL from.'));
            }
            $generator->setCustomSiteCanonicalUrl($request->getSchemeAndHttpHost());
        }
        $numPages = 0;
        $writer->generate(function (SitemapElement $data) use (&$numPages) {
            if ($data instanceof SitemapPage) {
                ++$numPages;
            }
        });
        $sitemapUrl = $writer->getSitemapUrl();
        if ($sitemapUrl === '') {
            $openLink = '';
        } else {
            $openLink = sprintf('<a href="%s" target="_blank">', h($sitemapUrl));
        }

        return t2(
            /*i18n: %2$s and %3$s contains HTML markup, %1$d is the number of pages */
            'The %2$ssitemap%3$s has been generated (%1$d page)',
            'The %2$ssitemap%3$s has been generated (%1$d pages)',
            $numPages,
            $openLink,
            $openLink === '' ? '' : '</a>'
        );
    }
996926
def Execute(self, *params, **kw):
        """"""
        fp = self.__expandparamstodict(params, kw)
        return self._get_subfolder('execute/', GPExecutionResult, fp)
1295183
public function execute(): void
    {
        $this->generator->setNamespace($this->getNamespace());
        $this->parseWsdl();
        $this->generateStructures();
        $this->generateRequests();
        $this->generateResponses();
        $this->generateMethods();
        $this->generateService();
        $this->generateClient();
        $this->generateClassMap();
        ;
    }
437625
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $siteBuilder = new SiteBuilder(
            $this->filesystem,
            $this->viewFactory,
            $input->getOption('env'),
            $input->getOption('force')
        );

        $siteBuilder->build();

        $output->writeln("<info>Site was generated successfully.</info>");
    }
829269
def run(generate_pks, show_pks, host, port, uri):
    """"""
    app.config['SQLALCHEMY_DATABASE_URI'] = uri
    app.config['SANDMAN_GENERATE_PKS'] = generate_pks
    app.config['SANDMAN_SHOW_PKS'] = show_pks
    app.config['SERVER_HOST'] = host
    app.config['SERVER_PORT'] = port
    activate(name='sandmanctl')
    app.run(host=host, port=int(port), debug=True)
90508
public static void main(String[] args) throws Exception {
		
		if(!parseParameters(args)) {
			return;
		}
	
		// set up execution environment
		ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
		
		// get input data
		DataSet<Point> points = getPointDataSet(env);
		DataSet<Centroid> centroids = getCentroidDataSet(env);
		
		// set number of bulk iterations for KMeans algorithm
		IterativeDataSet<Centroid> loop = centroids.iterate(numIterations);
		
		DataSet<Centroid> newCentroids = points
			// compute closest centroid for each point
			.map(new SelectNearestCenter()).withBroadcastSet(loop, "centroids")
			// count and sum point coordinates for each centroid
			.map(new CountAppender())
			.groupBy(0).reduce(new CentroidAccumulator())
			// compute new centroids from point counts and coordinate sums
			.map(new CentroidAverager());
		
		// feed new centroids back into next iteration
		DataSet<Centroid> finalCentroids = loop.closeWith(newCentroids);
		
		DataSet<Tuple2<Integer, Point>> clusteredPoints = points
				// assign points to final clusters
				.map(new SelectNearestCenter()).withBroadcastSet(finalCentroids, "centroids");
		
		// emit result
		if(fileOutput) {
			clusteredPoints.writeAsCsv(outputPath, "\n", " ");
		} else {
			clusteredPoints.print();
		}

		// execute program
		env.execute("KMeans Example");
		
	}
1250932
def execute(self, *args, **kwargs):
        '''
        
        '''
        run_modules = []
        orig_arguments = self.arguments

        if args or kwargs:
            self._set_arguments(list(args), kwargs)

        # Run all modules
        for module in self.list():
            obj = self.run(module)

        # Add all loaded modules that marked themselves as enabled to the
        # run_modules list
        for (module, obj) in iterator(self.executed_modules):
            # Report the results if the module is enabled and if it is a
            # primary module or if it reported any results/errors
            if obj.enabled and (obj.PRIMARY or obj.results or obj.errors):
                run_modules.append(obj)

        self.arguments = orig_arguments

        return run_modules
604851
def execute(self, parameters: dict = None):
        """"""
        try:
            parameters = {} if parameters is None else parameters
            return eval(self._compiled_code, parameters, {})
        except:
            info = exc_info()
            error = CompilationError('Error occurred in expression execution', self.code)
            error.add_cause(info[1])
            raise error from info[1]
779002
public static void main(String[] args) throws Exception {

		final ParameterTool params = ParameterTool.fromArgs(args);

		final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();

		env.getConfig().setGlobalJobParameters(params);

		// get input data
		DataSet<Tuple2<String, String>> documents = getDocumentsDataSet(env, params);
		DataSet<Tuple3<Integer, String, Integer>> ranks = getRanksDataSet(env, params);
		DataSet<Tuple2<String, String>> visits = getVisitsDataSet(env, params);

		// Retain documents with keywords
		DataSet<Tuple1<String>> filterDocs = documents
				.filter(new FilterDocByKeyWords())
				.project(0);

		// Filter ranks by minimum rank
		DataSet<Tuple3<Integer, String, Integer>> filterRanks = ranks
				.filter(new FilterByRank());

		// Filter visits by visit date
		DataSet<Tuple1<String>> filterVisits = visits
				.filter(new FilterVisitsByDate())
				.project(0);

		// Join the filtered documents and ranks, i.e., get all URLs with min rank and keywords
		DataSet<Tuple3<Integer, String, Integer>> joinDocsRanks =
				filterDocs.join(filterRanks)
							.where(0).equalTo(1)
							.projectSecond(0, 1, 2);

		// Anti-join urls with visits, i.e., retain all URLs which have NOT been visited in a certain time
		DataSet<Tuple3<Integer, String, Integer>> result =
				joinDocsRanks.coGroup(filterVisits)
								.where(1).equalTo(0)
								.with(new AntiJoinVisits());

		// emit result
		if (params.has("output")) {
			result.writeAsCsv(params.get("output"), "\n", "|");
			// execute program
			env.execute("WebLogAnalysis Example");
		} else {
			System.out.println("Printing result to stdout. Use --output to specify output path.");
			result.print();
		}
	}