Runs the Generator using parsed options.
174836
def run(input_file, options):
    """"""

    options.logger = log
    generator.Generator(input_file, **options.__dict__).execute()
494909
def execute(self):
        
        self.prepare_models()
        self.prepare_worker()
        if self.options.print_options:
            self.print_options()
        self.run()
1251478
def run(main=None, argv=None):
    """"""

    # Define help flags.
    _define_help_flags()

    # Parse known flags.
    argv = flags.FLAGS(_sys.argv if argv is None else argv, known_only=True)

    main = main or _sys.modules['__main__'].main

    # Call the main function, passing through any arguments
    # to the final program.
    _sys.exit(main(argv))
968294
def set_generator(self):
        """"""
        try:
            self.generator = self.soup.find('generator').string
        except AttributeError:
            self.generator = None
120695
function runGenerator (makeGenerator) {
  return function (thisArg, args) {
    var generator = makeGenerator.apply(thisArg, args)

    function handle (result, gen) {
      var value = result.value

      if (value != null) {
        if (value.constructor.name === 'GeneratorFunctionPrototype') {
          value = handle(value.next(), value)
        } else if (value.constructor.name === 'GeneratorFunction') {
          value = runGenerator(value)(thisArg, args)
        }
      }

      if (result.done) {
        return Promise.resolve(value)
      }

      return Promise.resolve(value).then(function (res) {
        return handle(gen.next(res), gen)
      }, function (err){
        return handle(gen.throw(err), gen)
      })
    }

    try {
      return handle(generator.next(), generator)
    } catch (ex) {
      return Promise.reject(ex)
    }
  }
}
1085408
def run():
    
    # setup the main parser and sub parsers
    parser = ArgumentParser(prog="law", description="The law command line tool.")
    sub_parsers = parser.add_subparsers(help="subcommands", dest="command")

    # add main arguments
    parser.add_argument("--version", "-V", action="version", version=law.__version__)

    # setup all progs
    mods = {}
    for prog in progs:
        mods[prog] = import_module("law.cli." + prog)
        mods[prog].setup_parser(sub_parsers)

    # parse args and dispatch execution
    if len(sys.argv) >= 2 and sys.argv[1] in forward_progs:
        args = parser.parse_args(sys.argv[1:3])
    else:
        args = parser.parse_args()

    if args.command:
        mods[args.command].execute(args)
    else:
        parser.print_help()
371905
def run
      scripts.each do |script|
        rules = config.rules_for_path(script.path)
        script.root_pair.each_subpair do |node_pair|
          rules.each do |rule|
            if rule.match?(identifier: self.rule)
              if rule.patterns.any? {|pattern| test_pair(node_pair, pattern) }
                yield script, rule, node_pair
              end
            end
          end
        end
      end
    end
1039229
def run(self, **run_params):
        """"""
        self.use_default_run_params()
        self.set_run_params(**run_params)
        if self.print_run_params:
            print("Run Params:", self.run_params)
        self.results = self._backend.backend_run()
1014944
def run(self):
        ''''''
        for tpl in self.templates:
            for provider in tpl.providers:
                provider.provide()
671348
def run(self):
        
        error = None
        # run 'pre_run', 'logging', 'dependencies' and 'run'
        try:  # serve as a central place for error logging
            self._logging(self.parsed_args)
            if 'deps_only' not in self.parsed_args:
                self._run_path_run('pre', self.parsed_args)
            self._run_path_dependencies(self.parsed_args)
            if 'deps_only' not in self.parsed_args:
                self._run_path_run('', self.parsed_args)
        except exceptions.ExecutionException as e:
            error = self._log_if_not_logged(e)
            if isinstance(e, exceptions.YamlError):  # if there's a yaml error, just shut down
                raise e

        # in any case, run post_run
        try:  # serve as a central place for error logging
            self._run_path_run('post', self.parsed_args)
        except exceptions.ExecutionException as e:
            error = self._log_if_not_logged(e)

        # exitfuncs are run all regardless of exceptions; if there is an exception in one
        #  of them, this function will raise it at the end
        try:
            utils.run_exitfuncs()
        except exceptions.ExecutionException as e:
            error = self._log_if_not_logged(e)

        if error:
            raise error
539905
def run(self):
        
        # The "or" part is for Python 2.6
        while not (self.finished.wait(self.interval)
                   or self.finished.is_set()):
            self.function(*self.args, **self.kwargs)
1332882
def run(args):
    
    (opts, args) = PARSER.parse_args(args) if args else PARSER.parse_args()
    if not len(args):
        PARSER.print_usage()
        sys.exit(1)

    outfilename = args[0] + ".html"
    if len(args) > 1:
        outfilename = args[1]

    report = parser.Junit(args[0])
    html = report.html()

    with open(outfilename, "wb") as outfile:
        outfile.write(html.encode('utf-8'))
102029
def run_from_argv(self, prog, subcommand, global_options, argv):
        
        self.prog_name = prog
        parser = self.create_parser(prog, subcommand)
        options, args = parser.parse_args(argv)
        self.global_options = global_options
        self.options = options
        self.args = args
        self.execute(args, options, global_options)
696203
def _get_generator(parser, extract, keep, check_maf):
    """"""
    if extract is not None:
        parser = Extractor(parser, names=extract)

    for data in parser.iter_genotypes():
        data.genotypes = data.genotypes[keep]

        # Checking the MAF, if required
        if check_maf:
            data.code_minor()

        yield data
911959
def run(self, accept_unrecognized_args=False):
        

        self.__parse_args(accept_unrecognized_args)
        self.__parse_config()
        self.__process_username_password()
        self.__finish_initializing()

        exit_status = 0

        try:
            yield self
        except ExitedCleanly:
            pass
        except (Exception, KeyboardInterrupt) as e:
            # Run any method a library or caller might have registered.
            for base in type(e).mro():
                if base in self.exceptions:
                    self.exceptions[base](e)
                    break
            else:
                self.log.exception(e)

            exit_status = os.EX_SOFTWARE
        finally:
            logging.shutdown()

        sys.exit(exit_status)
596532
def run config={}, &block
      @config.update(config).update(load_config)
      # @config = (config.empty?) ? load_config : config
      log "Starting #{name} in the foreground.."
      trap('TERM') { handle_exit }
      trap('INT')  { handle_exit }
      yield(self) if block_given?
      (respond_to?(:__start!)) ? __start! : perform(@config)
      # If this process doesn't loop or otherwise breaks out of 
      # the loop we still want to clean up after ourselves
      handle_exit
    end
183034
def runner(Options, buffering=True):
    
    def run(argv=None):
        if not buffering:
            sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
            sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', 0)

        if argv is None:
            argv = sys.argv
        o = Options()
        try:
            o.parseOptions(argv[1:])
        except usage.UsageError, e:
            if hasattr(o, 'subOptions'):
                print str(o.subOptions)
            else:
                print str(o)
            print str(e)
            return 1

        return 0

    return run