Processing the pipeline.
166228
def run(self):
        """"""
        self.logger.info("Running with Python %s", sys.version.replace("\n", ""))
        self.logger.info("Running on platform %s", platform.platform())
        self.logger.info("Current cpu count is %d", multiprocessing.cpu_count())

        configuration = self.load_configuration()
        paths = [os.path.abspath(path) for path in Adapter(self.options).path]
        supported_extension = [
            ext.strip() for entry in configuration for ext in Adapter(entry).extension.split()]

        for path, path_and_filename, extension in Application.walk_files_for(paths, supported_extension):
            entry = Select(*configuration) \
                .where(lambda entry: extension in Adapter(entry).extension.split()) \
                .transform(lambda entry: Adapter(entry)) \
                .build()[0]
            # parsing file with regex to get loc and com values
            # 100 lines of code (total) with 50 lines of comments means: loc=50, com=50
            # the ratio would be then: 1.0
            loc, com = self.analyse(path_and_filename, entry.regex)
            ratio = float(com) / float(loc) if loc > 0 and com < loc else 1.0

            self.results.append({
                'type': entry.type,
                'file': path_and_filename.replace(path + '/', ''),
                'loc': loc,
                'com': com,
                'ratio': "%.2f" % ratio
            })
        # for the table we are mainly interested in ratio below defined threshold
        # (except you want to see all of your code: --show-all)
        ppresults = Select(*self.results).where(
            lambda entry: float(Adapter(entry).ratio) < Adapter(self.options).threshold or
            Adapter(self.options).show_all).build()

        # print out results in table format
        pprint(ppresults, keys=['ratio', 'loc', 'com', 'file', 'type'])

        if Adapter(self.options).average:
            all_ratio = Select(*self.results).transform(lambda entry: float(Adapter(entry).ratio)).build()
            avg_ratio = float(sum(all_ratio)) / float(len(all_ratio)) if len(all_ratio) > 0 else 1.0
            self.logger.info('average ratio is %.2f for %d files', avg_ratio, len(all_ratio))
            return avg_ratio >= Adapter(self.options).threshold

        # providing results (mainly for unittesting)
        return len(Select(*self.results).where(
            lambda entry: float(Adapter(entry).ratio) < Adapter(self.options).threshold).build()) == 0
1280137
public function process()
    {
        parent::process();

        foreach ($this->columns as $column) {
            $column->process();
        }

        foreach ($this->spanning_columns as $column) {
            $column->process();
        }

        foreach ($this->extra_rows as $row) {
            $row->process();
        }

        // this is part of the old selection API
        if ($this->hasColumn('checkbox')) {
            $items = $this->getColumn('checkbox');
            $this->checked_items = $items->getItems();
        }
    }
798601
def _pipeline_step(self, sources, options, personal_dict, filter_index=1, flow_status=flow_control.ALLOW):
        """"""

        for source in sources:
            if source._has_error():
                yield source
            elif not source._is_bytes() and filter_index < len(self.pipeline_steps):
                f = self.pipeline_steps[filter_index]
                if isinstance(f, flow_control.FlowControl):
                    err = ''
                    try:
                        status = f._run(source.category)
                    except Exception as e:
                        err = self.get_error(e)
                        yield filters.SourceText('', source.context, '', '', err)
                    if not err:
                        if filter_index < len(self.pipeline_steps):
                            yield from self._pipeline_step(
                                [source], options, personal_dict, filter_index + 1, status
                            )
                else:
                    if flow_status == flow_control.ALLOW:
                        err = ''
                        try:
                            srcs = f._run(source)
                        except Exception as e:
                            err = self.get_error(e)
                            yield filters.SourceText('', source.context, '', '', err)
                        if not err:
                            yield from self._pipeline_step(
                                srcs, options, personal_dict, filter_index + 1
                            )
                    elif flow_status == flow_control.SKIP:
                        yield from self._pipeline_step(
                            [source], options, personal_dict, filter_index + 1
                        )
                    else:
                        # Halted tasks
                        yield source
            else:
                # Binary content
                yield source
330389
public function process()
    {
        try {
            $this->processAlias();
            $this->processRoute();
            $this->output404();
        } catch (Exception $ex) {
            trigger_error($ex->getMessage());
            $this->response->outputError500();
        }
    }
622287
public function process()
    {
        foreach ($this->jobs as $id => $job) {
            // process the job
            $this->resolveJob($job['job'], json_encode($job['data']))->fire();
            // remove it from the processing queue
            unset($this->jobs[$id]);
        }
    }
661535
public function process()
    {
        $this->initializeStorageNode($this->storageNodeNodePath, $this->storageNodeTitle);
        $this->initializeNodeTemplates();

        $nodeTemplate = new NodeTemplate();
        $this->processBatch($nodeTemplate);
    }
681717
protected function process()
    {

        // add the SKU => entity ID/store view code mapping
        $this->addSkuEntityIdMapping($sku = $this->getValue(ColumnKeys::SKU));
        $this->addSkuStoreViewCodeMapping($sku, $this->getSubject()->getStoreViewCode(StoreViewCodes::ADMIN));

        // clean-up the repositories etc. to free memory
        $this->getProductBunchProcessor()->cleanUp();

        // temporary persist the SKU
        $this->setLastSku($sku);
    }
340782
public function process()
    {
        foreach ($this->exports as $name => $url) {
            $this->addButton(self::BTN_RIGHT_TOP, $name, $url, 'lego-export-' . $name);
        }

        if (count($this->batches())) {
            LegoAssets::js('components/vue/dist/vue.min.js');
            LegoAssets::js('js/batch.js');
        }

        $this->paginator();
    }
610174
def run(self, definition):
        """"""
        self.logger.info("Running with Python %s", sys.version.replace("\n", ""))
        self.logger.info("Running on platform %s", platform.platform())
        self.logger.info("Current cpu count is %d", multiprocessing.cpu_count())
        self.logger.info("Processing pipeline definition '%s'", definition)

        document = self.validate_document(definition)
        if self.options.validate_only:
            self.logger.info("Stopping after validation as requested!")
            return []

        self.provide_temporary_scripts_path()

        versions = VersionsCheck().process(document)
        VersionsReport().process(versions)

        collector = Application.create_and_run_collector(document, self.options)
        matrix = find_matrix(document)
        output = []
        if len(matrix) == 0:
            model = {} if 'model' not in document else document['model']
            pipeline = Pipeline(model=model, options=self.options)
            pipeline.hooks = Hooks(document)
            result = pipeline.process(document['pipeline'])
        else:
            result = self.run_matrix(matrix, document)

        output = result['output']
        self.shutdown(collector, success=result['success'])
        return output
608433
def process_data(lines)  
      data = {}
      lines.each do |line|
        line = line.split
        key = line.first.split('.value').first
        data[key] = line.last
      end
      data
    end
1215509
private function startProcess(): void
    {
        $this->process = proc_open($this->command, static::DESCRIPTOR_SPEC, $this->pipes, $this->cwd);

        foreach ($this->pipes as $pipe) {
            stream_set_blocking($pipe, false);
        }
    }
586315
protected function process()
    {
        $this->result = $this[self::RESPONSE_PROCESSING] != self::TYPE_RAW
            ? DefaultResponseParser::getInstance()->parse($this)
            : $this->request->getResponse();
    }
379158
protected function process()
    {

        // initialize the array for the links
        $artefacts = array();

        // load the link type mappings
        $linkTypes = $this->getLinkTypeMappings();

        // prepare the links for the found link types and merge the found artefacts
        foreach ($linkTypes as $linkTypeCode => $columns) {
            $artefacts = array_merge($artefacts, $this->prepareArtefacts($linkTypeCode, $columns));
        }

        // append the links to the subject
        $this->addArtefacts($artefacts);
    }
1010835
protected function process()
    {

        // clean-up the repositories etc. to free memory
        $this->getCustomerAddressBunchProcessor()->cleanUp();

        // temporary persist the last customer address entity ID
        $this->setLastEntityId($this->getValue(ColumnKeys::ENTITY_ID));
    }
719729
protected function processInstall()
    {
        if (!$this->isError()) {

            $settings = $this->getSubmitted();
            $this->install->connectDb($settings['database']);
            $result = $this->install->process($settings, $this->current_route);

            if ($result['severity'] === 'success') {
                $this->line($result['message']);
            } else {
                $this->error($result['message']);
            }
        }
    }
1365592
def finalize_processes(self):
        # type: (_MultiprocessOffload) -> None
        
        self._term_signal.value = 1
        if self._check_thread is not None:
            self._check_thread.join()
        for proc in self._procs:
            proc.join()
1025284
public function process() : void
    {
        if (isset($this->output)) {
            $this->output->call($this);
        } elseif (!$this->delegated) {
            self::$inout->error("Recipe is missing a call to `output` and did not delegate anything, not very useful probably...\n");
        }
    }