Execute the main routine.
353534
def main() -> None:
    """""""
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("--outdir", help="output directory", default=os.path.dirname(__file__))
    args = parser.parse_args()

    outdir = pathlib.Path(args.outdir)
    if not outdir.exists():
        raise FileNotFoundError("Output directory is missing: {}".format(outdir))

    for contracts in [0, 1, 5, 10]:
        if contracts == 0:
            pth = outdir / "functions_100_with_no_contract.py"
        elif contracts == 1:
            pth = outdir / "functions_100_with_1_contract.py"
        else:
            pth = outdir / "functions_100_with_{}_contracts.py".format(contracts)

        text = generate_functions(functions=100, contracts=contracts, disabled=False)
        pth.write_text(text)

    for contracts in [1, 5, 10]:
        if contracts == 1:
            pth = outdir / "functions_100_with_1_disabled_contract.py"
        else:
            pth = outdir / "functions_100_with_{}_disabled_contracts.py".format(contracts)

        text = generate_functions(functions=100, contracts=contracts, disabled=True)
        pth.write_text(text)

    for invariants in [0, 1, 5, 10]:
        if invariants == 0:
            pth = outdir / "classes_100_with_no_invariant.py"
        elif invariants == 1:
            pth = outdir / "classes_100_with_1_invariant.py"
        else:
            pth = outdir / "classes_100_with_{}_invariants.py".format(invariants)

        text = generate_classes(classes=100, invariants=invariants, disabled=False)
        pth.write_text(text)

    for invariants in [1, 5, 10]:
        if invariants == 1:
            pth = outdir / "classes_100_with_1_disabled_invariant.py"
        else:
            pth = outdir / "classes_100_with_{}_disabled_invariants.py".format(invariants)

        text = generate_classes(classes=100, invariants=invariants, disabled=True)
        pth.write_text(text)
649620
def _execute(self, args, log=True):
        """"""
        if not self._ready:
            self.open_or_create()
        output = ''
        error = ''
        try:
            proc = subprocess.Popen(args, cwd=self.path, env=self.env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
            output, error = proc.communicate()
            returncode = proc.returncode
            if returncode:
                raise subprocess.CalledProcessError(returncode, proc, (output, error))
            return to_text(output)
        except OSError as e:
            # raise a more meaningful error with the program name
            prog = args[0]
            if prog[0] != os.sep:
                prog = os.path.join(self.path, prog)
            raise OSError('%s: %s' % (prog, six.u(str(e))))
        except subprocess.CalledProcessError as e:
            output, error = e.output
            e.output = output
            raise e
        finally:
            if log:
                try:
                    self._write_to_log(to_text(output))
                    self._write_to_error(to_text(error))
                except NameError:
                    pass
571309
def main():
	
	parser = cli.Cli()
	parser.parse(sys.argv[1:])
	return parser.run()
1219731
public function main()
    {
        $commandLine = $this->prepareCommandLine();
        $this->log("Executing " . $commandLine);
        passthru($commandLine, $returnCode);

        if ($returnCode > 0) {
            throw new BuildException("Composer execution failed");
        }
    }
392743
public function main()
    {
        $this->execute();
        if ($this->newClasses) {
            foreach ($this->newClasses as $classname) {
                $this->log("Added adhoc class " . $classname, Project::MSG_VERBOSE);
            }
        } else {
            $this->log("Adhoc task executed but did not result in any new classes.", Project::MSG_VERBOSE);
        }
    }
643373
public function execute()
    {
        $batch  = $this->getBatch();
        $import = $batch->getVariable('import');

        if (! (isset($import['trackId']) && $import['trackId'])) {
            // Do nothing
            return;
        }

        $tracker     = $this->loader->getTracker();
        $trackEngine = $tracker->getTrackEngine($import['trackId']);
        $trackEngine->updateRoundCount($this->currentUser->getUserLoginId());
        
        // Now cleanup the cache
        $this->cache->clean(\Zend_Cache::CLEANING_MODE_MATCHING_TAG, array('tracks'));
    }
628945
def main(args=None, stdin=sys.stdin, stdout=sys.stdout, print_exception=print_exception):
    
    try:
        # Set up logging.
        logging.basicConfig(level=logging.WARN)

        kind = args is not None and args[1] or sys.argv[1]
        Runner().run(kind, stdin=stdin, stdout=stdout)
    except Exception as exc:
        # Dump encoded data that we will try to fetch using mechanize
        print_exception(exc)
        raise
9317
def main(argv=None):
    '''  '''
    parser = get_parser()

    # Parse arguments and run the function
    global args
    args = parser.parse_args(argv)
    args.func()
60871
def main():
    ""
    logging.captureWarnings(True)
    args = build_parser().parse_args()
    # Configure logging
    args.setup_logging(args)
    # Dispatch into the appropriate subcommand function.
    try:
        return args.func(args)
    except SystemExit:
        raise
    except:
        logging.exception('Problem when running command. Sorry!')
        sys.exit(1)
699680
def execute(self, args):
        """"""
        _run_atstart()
        hook_name = os.path.basename(args[0])
        if hook_name in self._hooks:
            try:
                self._hooks[hook_name]()
            except SystemExit as x:
                if x.code is None or x.code == 0:
                    _run_atexit()
                raise
            _run_atexit()
        else:
            raise UnregisteredHookError(hook_name)
1349850
public function main() {
        $this->stdout->styles('success', array('text' => 'green'));

        $this->hr(1);
        $this->out(sprintf('%s Steps:', $this->name));

        $counter = 1;

        foreach ($this->steps as $method) {
            $this->steps($counter);

            try {
                if (!call_user_func(array($this, $method))) {
                    $this->err('<error>Process aborted!</error>');
                    break;
                }
            } catch (Exception $e) {
                $this->err(sprintf('<error>Unexpected error has occurred; %s</error>', $e->getMessage()));
                break;
            }

            $counter++;
        }
    }
724867
def main():
    """"""
    parser = argparse.ArgumentParser()
    subparsers = parser.add_subparsers()

    appengine.register_commands(subparsers)
    requirements.register_commands(subparsers)
    pylint.register_commands(subparsers)

    args = parser.parse_args()
    args.func(args)
619113
def main():
    """"""
    from docopt import docopt
    args = docopt(__doc__)
    infile = args['INFILE']
    outfile = args['OUTFILE']
    i3extract(infile, outfile)
1173444
def run(self):
        """"""
        with utils.ChangeDir(self.dirname):
            sys.path.insert(0, self.dirname)
            sys.argv[1:] = self.args
            runpy.run_module(self.not_suffixed(self.filename),
                             run_name='__main__',
                             alter_sys=True)
499819
def execute(self, compiled=None, path=None, use_eval=False, allow_show=True):
        """"""
        self.check_runner()
        if compiled is not None:
            if allow_show and self.show:
                print(compiled)
            if path is not None:  # path means header is included, and thus encoding must be removed
                compiled = rem_encoding(compiled)
            self.runner.run(compiled, use_eval=use_eval, path=path, all_errors_exit=(path is not None))
            self.run_mypy(code=self.runner.was_run_code())
995485
def main():
    """"""
    # check logging
    log_level = os.environ.get('LOG_LEVEL', 'INFO')
    logging.basicConfig(level=getattr(logging, log_level),
                        format='%(asctime)s %(name)s[%(levelname)s] %(message)s',
                        datefmt='%Y-%m-%d %H:%M:%S')

    current_path = os.path.abspath('.')
    if current_path not in sys.path:
        sys.path.insert(0, current_path)
    argcomplete.autocomplete(ARG_PARSER)
    args = ARG_PARSER.parse_args()
    args.func(args)
1154087
protected function execute()
    {
        $classes = get_declared_classes();
        eval($this->script);
        $this->newClasses = array_diff(get_declared_classes(), $classes);
    }