The main function of the module.

    :param argString: the options.

    :type argString: list
979371
def main(argString=None):
    
    # Getting and checking the options
    args = parseArgs(argString)
    checkArgs(args)

    merge_related_samples(args.ibs_related, args.out, args.no_status)
404150
def main(self):
        

        for m in self.methods:

            if m.name in ['Main', 'main']:
                return m

        if len(self.methods):
            return self.methods[0]

        return None
1051701
def main(self, configuration):
    
    _custom_func_arguments = {"conf"}
    filename = os.path.basename(os.path.abspath(sys.argv[0]))

    default_arg_list = [item for item in configuration.get("default") if len(item.strip()) != 0]
    if len(default_arg_list) == 0:
      sys.stdout.write(self.generate_help(filename=filename))
      return

    command_name = default_arg_list.pop(0)
    if command_name not in self._modules.keys():
      sys.stdout.write(self.generate_help(filename=filename))
      return

    command = self._modules[command_name]
    entry_point = command["entry_point"]
    class_path = command["classpath"]
    metainfo = command["metainfo"]
    """:type metainfo ModuleMetaInfo"""

    try:
      args = metainfo.parse_default_arguments(default_arg_list)
      args.update(metainfo.parse_arguments(configuration))

      f_args = entry_point.__code__.co_varnames[:entry_point.__code__.co_argcount]

      if len(f_args) - len(set(f_args) & _custom_func_arguments) != len(set(args.keys()) & set(f_args)):
        raise ArgumentException("Function \"{}\" from module {} doesn't implement all arguments in the signature".format(
          entry_point.__name__, class_path
        ))

      if "conf" in f_args:
        args["conf"] = configuration

      entry_point(**args)
    except ArgumentException as e:
      sys.stdout.write("Application arguments exception: {}\n".format(str(e)))
      return
115273
def main():
    """"""

    # in contrast to argparse, this works at least under Python < 2.7
    import optparse
    from .utils import import_string

    parser = optparse.OptionParser(usage="Usage: %prog [options] app_module:app_object")
    parser.add_option(
        "-b",
        "--bind",
        dest="address",
        help="The hostname:port the app should listen on.",
    )
    parser.add_option(
        "-d",
        "--debug",
        dest="use_debugger",
        action="store_true",
        default=False,
        help="Use Werkzeug's debugger.",
    )
    parser.add_option(
        "-r",
        "--reload",
        dest="use_reloader",
        action="store_true",
        default=False,
        help="Reload Python process if modules change.",
    )
    options, args = parser.parse_args()

    hostname, port = None, None
    if options.address:
        address = options.address.split(":")
        hostname = address[0]
        if len(address) > 1:
            port = address[1]

    if len(args) != 1:
        sys.stdout.write("No application supplied, or too much. See --help\n")
        sys.exit(1)
    app = import_string(args[0])

    run_simple(
        hostname=(hostname or "127.0.0.1"),
        port=int(port or 5000),
        application=app,
        use_reloader=options.use_reloader,
        use_debugger=options.use_debugger,
    )
570500
def main():
    cmd = sys.argv
    cmd.pop(0)
    
    parser = argparse.ArgumentParser()
    parser.add_argument(
        '-s',
        '--src',
        help='source folder to watch',
        default='.',
        dest='src',
        metavar='folder'
    )
    parser.add_argument(
        '-d',
        '--dest',
        help='source folder to watch',
        default=None,
        dest='dest',
        metavar='folder'
    )
    args = parser.parse_args()
    print 'Initializing...'
    config.source_dir = os.path.abspath(args.src)
    if args.dest != None:
        config.dest_dir = os.path.abspath(args.dest)
    init_sources(config.source_dir)
    if cmd:
        c = cmd[0]
        commands = globals()
        if c in commands:
            commands[c]()
951733
def main(args):
    

    parser = argparse.ArgumentParser(usage="python -m premailer [options]")

    parser.add_argument(
        "-f",
        "--file",
        nargs="?",
        type=argparse.FileType("r"),
        help="Specifies the input file.  The default is stdin.",
        default=sys.stdin,
        dest="infile",
    )

    parser.add_argument(
        "-o",
        "--output",
        nargs="?",
        type=argparse.FileType("w"),
        help="Specifies the output file.  The default is stdout.",
        default=sys.stdout,
        dest="outfile",
    )

    parser.add_argument("--base-url", default=None, type=str, dest="base_url")

    parser.add_argument(
        "--remove-internal-links",
        default=True,
        help="Remove links that start with a '#' like anchors.",
        dest="preserve_internal_links",
    )

    parser.add_argument(
        "--exclude-pseudoclasses",
        default=False,
        help="Pseudo classes like p:last-child', p:first-child, etc",
        action="store_true",
        dest="exclude_pseudoclasses",
    )

    parser.add_argument(
        "--preserve-style-tags",
        default=False,
        help="Do not delete <style></style> tags from the html document.",
        action="store_true",
        dest="keep_style_tags",
    )

    parser.add_argument(
        "--remove-star-selectors",
        default=True,
        help="All wildcard selectors like '* {color: black}' will be removed.",
        action="store_false",
        dest="include_star_selectors",
    )

    parser.add_argument(
        "--remove-classes",
        default=False,
        help="Remove all class attributes from all elements",
        action="store_true",
        dest="remove_classes",
    )

    parser.add_argument(
        "--capitalize-float-margin",
        default=False,
        help="Capitalize float and margin properties for outlook.com compat.",
        action="store_true",
        dest="capitalize_float_margin",
    )

    parser.add_argument(
        "--strip-important",
        default=False,
        help="Remove '!important' for all css declarations.",
        action="store_true",
        dest="strip_important",
    )

    parser.add_argument(
        "--method",
        default="html",
        dest="method",
        help="The type of html to output. 'html' for HTML, 'xml' for XHTML.",
    )

    parser.add_argument(
        "--base-path",
        default=None,
        dest="base_path",
        help="The base path for all external stylsheets.",
    )

    parser.add_argument(
        "--external-style",
        action="append",
        dest="external_styles",
        help="The path to an external stylesheet to be loaded.",
    )

    parser.add_argument(
        "--css-text",
        action="append",
        dest="css_text",
        help="CSS text to be applied to the html.",
    )

    parser.add_argument(
        "--disable-basic-attributes",
        dest="disable_basic_attributes",
        help="Disable provided basic attributes (comma separated)",
        default=[],
    )

    parser.add_argument(
        "--disable-validation",
        default=False,
        action="store_true",
        dest="disable_validation",
        help="Disable CSSParser validation of attributes and values",
    )

    parser.add_argument(
        "--pretty",
        default=False,
        action="store_true",
        help="Pretty-print the outputted HTML.",
    )

    parser.add_argument(
        "--encoding", default="utf-8", help="Output encoding. The default is utf-8"
    )

    options = parser.parse_args(args)

    if options.disable_basic_attributes:
        options.disable_basic_attributes = options.disable_basic_attributes.split()

    html = options.infile.read()
    if hasattr(html, "decode"):  # Forgive me: Python 2 compatability
        html = html.decode("utf-8")

    p = Premailer(
        html=html,
        base_url=options.base_url,
        preserve_internal_links=options.preserve_internal_links,
        exclude_pseudoclasses=options.exclude_pseudoclasses,
        keep_style_tags=options.keep_style_tags,
        include_star_selectors=options.include_star_selectors,
        remove_classes=options.remove_classes,
        strip_important=options.strip_important,
        external_styles=options.external_styles,
        css_text=options.css_text,
        method=options.method,
        base_path=options.base_path,
        disable_basic_attributes=options.disable_basic_attributes,
        disable_validation=options.disable_validation,
    )
    options.outfile.write(
        p.transform(encoding=options.encoding, pretty_print=options.pretty)
    )
    return 0
1197106
def main():
    
    parser = dsargparse.ArgumentParser(main=main)
    subparsers = parser.add_subparsers()

    greeting_cmd = subparsers.add_parser(greeting)
    greeting_cmd.add_argument("title")
    greeting_cmd.add_argument("name")

    goodbye_cmd = subparsers.add_parser(goodbye)
    goodbye_cmd.add_argument("name")

    return parser.parse_and_run()
1033196
def run_args(args):
    
    return main(filename      = args.get('MDFILE')
               ,theme         = args.get('-t', 'random')
               ,cols          = args.get('-c')
               ,from_txt      = args.get('-f')
               ,c_theme       = args.get('-T')
               ,c_no_guess    = args.get('-x')
               ,do_html       = args.get('-H')
               ,no_colors     = args.get('-A')
               ,display_links = args.get('-L'))
838780
def main(args):
    

    args = _parse_args(args)

    # sort out logging output and level
    level = util.log_level_from_vebosity(args.verbosity)
    root = logging.getLogger()
    root.setLevel(level)
    handler = logging.StreamHandler(sys.stdout)
    handler.setLevel(level)
    handler.setFormatter(logging.Formatter('%(levelname)s %(message)s'))
    root.addHandler(handler)

    logger.debug(args)

    expression = ' '.join(args.expression)
    try:
        print(Parser().parse(expression))
    except (LexingError, ParsingError) as e:
        util.print_error(e)
        return 1

    return 0
132263
public static void main(final String[] args) {
        Switch about = new Switch("a", "about", "display about message");
        Switch help = new Switch("h", "help", "display help message");
        FileArgument inputHmlFile = new FileArgument("i", "input-hml-file", "input HML file, default stdin", false);
        FileArgument outputFile = new FileArgument("o", "output-file", "output allele assignment file, default stdout", false);

        ArgumentList arguments = new ArgumentList(about, help, inputHmlFile, outputFile);
        CommandLine commandLine = new CommandLine(args);

        ExtractExpectedHaploids extractExpectedHaploids = null;
        try
        {
            CommandLineParser.parse(commandLine, arguments);
            if (about.wasFound()) {
                About.about(System.out);
                System.exit(0);
            }
            if (help.wasFound()) {
                Usage.usage(USAGE, null, commandLine, arguments, System.out);
                System.exit(0);
            }
            extractExpectedHaploids = new ExtractExpectedHaploids(inputHmlFile.getValue(), outputFile.getValue());
        }
        catch (CommandLineParseException | IllegalArgumentException e) {
            Usage.usage(USAGE, e, commandLine, arguments, System.err);
            System.exit(-1);
        }
        try {
            System.exit(extractExpectedHaploids.call());
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
519174
def main():
    
    parser = argparse.ArgumentParser()
    parser.add_argument("-H", "--host", help="Web server Host address to bind to",
                        default="0.0.0.0", action="store", required=False)
    parser.add_argument("-p", "--port", help="Web server Port to bind to",
                        default=8080, action="store", required=False)
    args = parser.parse_args()

    logging.basicConfig()
    run(host=args.host, port=args.port, reloader=True, server=SERVER)
220687
def main():
    
    if len(argv) < 2:
        print 'Usage: '
        print '         Get A String              %s CFG_fileA FST_fileB' % argv[0]
        return

    alphabet = createalphabet()

    cfgtopda = CfgPDA(alphabet)
    print '* Parsing Grammar:',
    mma = cfgtopda.yyparse(argv[1])
    print 'OK'

    flex_a = Flexparser(alphabet)
    print '* Parsing Regex:',
    mmb = flex_a.yyparse(argv[2])
    print mmb
    print 'OK'
    print '* Minimize Automaton:',
    mmb.minimize()
    print 'OK'
    print mmb
    print '* Diff:',
    ops = PdaDiff(mma, mmb, alphabet)
    mmc = ops.diff()
    print 'OK'
    print '* Get String:',
    print ops.get_string()
408658
def main(*args):
    
    if not args:
        args = sys.argv[1:]
    logging.basicConfig(level=logging.INFO, stream=sys.stdout,
                        format='%(message)s')
    for gt in args:
        load_grammar(gt, save=True, force=True)
    return True
291090
def main(argv=None):
    
    # Get command line arguments, validate them, and normalize them
    opts = cmdparse.parse_args(argv)
    assert validate_opts.validate(opts)
    opts = normalize_opts.normalize(opts)

    if opts.verbose:
        # Update client: print input and output directories
        messages.print_input_output(opts)

    file_paths = fileparse.get_file_list(opts)
    assert validate_files.validate(file_paths, opts)

    if opts.verbose and opts.is_dir:
        # Update client: print files that will be parsed
        messages.print_files(opts, file_paths)

    # For now, only using default GitHub Markdown for parsing
    # Collect tag/anchor combinations
    collector = make_github_markdown_collector(opts)
    anchors, duplicate_tags = collector.collect(file_paths)
    assert validate_anchors.validate(anchors, duplicate_tags, opts)

    # Write files using previously found AnchorHub tags and generated anchors
    writer = make_github_markdown_writer(opts)
    counter = writer.write(file_paths, anchors, opts)

    if opts.verbose:
        if opts.is_dir:
            # Update client: print files that had modifications
            messages.print_modified_files(opts, anchors)
        # Print summary statistics
        messages.print_summary_stats(counter)
249327
def main_func(args=None):
    
    # we have to initialize a gui even if we dont need one right now.
    # as soon as you call maya.standalone.initialize(), a QApplication
    # with type Tty is created. This is the type for conosle apps.
    # Because i have not found a way to replace that, we just init the gui.
    guimain.init_gui()

    main.init()
    launcher = Launcher()
    parsed, unknown = launcher.parse_args(args)
    parsed.func(parsed, unknown)
1347136
def main(arguments=None):   # suppress(unused-function)
    """"""
    result = _parse_arguments(arguments)
    linter_funcs = _ordered(linter_functions_from_filters,
                            result.whitelist,
                            result.blacklist)
    global_options = vars(result)
    tool_options = tool_options_from_global(global_options, len(result.files))
    any_would_run = _any_would_run(_run_lint_on_file_exceptions,
                                   result.files,
                                   result.stamp_file_path,
                                   result.log_technical_terms_to,
                                   linter_funcs,
                                   tool_options,
                                   result.fix_what_you_can)

    if any_would_run:
        for linter_function in linter_funcs.values():
            if linter_function.before_all:
                linter_function.before_all(global_options, tool_options)

        use_multiprocessing = _should_use_multiprocessing(len(result.files))
    else:
        use_multiprocessing = False

    if use_multiprocessing:
        mapper = parmap.map
    else:
        # suppress(E731)
        mapper = lambda f, i, *a: [f(*((x, ) + a)) for x in i]

    errors = list(itertools.chain(*mapper(_run_lint_on_file_stamped,
                                          result.files,
                                          result.stamp_file_path,
                                          result.log_technical_terms_to,
                                          linter_funcs,
                                          tool_options,
                                          result.fix_what_you_can)))

    for error in sorted(errors):
        _report_lint_error(error.failure, os.path.relpath(error.absolute_path))

    if any_would_run:
        for linter_funcs in linter_funcs.values():
            if linter_funcs.after_all:
                linter_funcs.after_all(global_options, tool_options)

    return len(errors)
1293026
def main(pargs):
    
    input_file = sys.argv[1]
    fp = ParseFileLineByLine(input_file)
    for i in fp:
        print(i)