Equivalent of "main", but non-static.
491244
public void run(InetSocketAddress address, boolean useTls) throws Exception {
    // important to enable HTTP/2 in ActorSystem's config

    Config conf = ConfigFactory.parseString("akka.http.server.preview.enable-http2 = on")
        .withFallback(ConfigFactory.defaultApplication());

    system = ActorSystem.create("AsyncServer", conf);

    Materializer mat = ActorMaterializer.create(system);

    benchmarkService = new BenchmarkServiceImpl(mat);

    if (useTls) {
      Http.get(system).bindAndHandleAsync(
        BenchmarkServiceHandlerFactory.create(benchmarkService, mat, system),
        ConnectWithHttps.toHostHttps(address.getHostName(), address.getPort()).withCustomHttpsContext(Utils.serverHttpContext()),
        mat)
        .thenAccept(binding -> {
          System.out.println("gRPC server bound to: https://" + address);
        });
    } else {
      Http.get(system).bindAndHandleAsync(
        BenchmarkServiceHandlerFactory.create(benchmarkService, mat, system),
        ConnectHttp.toHost(address.getHostName(), address.getPort(), UseHttp2.always()),
        mat
        ).thenAccept(binding -> {
        System.out.println("gRPC server bound to: http://" + address);
      });
    }
  }
95444
def main(argv=None, input_stream=stdin, output_stream=stdout,
         error_stream=stderr):
    """"""
    args = _parse_args(argv)
    args_dict = args.__dict__.copy()
    inline_str = args_dict.pop('inline')
    modules = args_dict.pop('modules')

    func = get_inline_func(inline_str, modules, **args_dict)

    return cbox.main(
        func=func, argv=[], input_stream=input_stream,
        output_stream=output_stream, error_stream=error_stream, exit=False,
    )
974217
def main(argv):
    """"""
    del argv  # Unused
    flags.mark_flag_as_required('load_file')

    run_game(
        load_file=FLAGS.load_file,
        selfplay_dir=FLAGS.selfplay_dir,
        holdout_dir=FLAGS.holdout_dir,
        holdout_pct=FLAGS.holdout_pct,
        sgf_dir=FLAGS.sgf_dir)
715647
def main():
    """'"""
    app = apikit.APIFlask(name="Hello",
                           version="0.0.1",
                           repository="http://example.repo",
                           description="Hello World App")

    # pylint: disable=unused-variable
    @app.route("/")
    def hello_world():
        """The main route."""
        return "Hello, World!"

    app.run()
896011
def main():
    """"""
    logging.basicConfig(format=LOGGING_FORMAT)

    parser = argparse.ArgumentParser(description='Example with non-optional arguments')

    add_debug(parser)
    add_app(parser)
    add_env(parser)
    add_region(parser)
    add_properties(parser)

    args = parser.parse_args()

    logging.getLogger(__package__.split('.')[0]).setLevel(args.debug)

    elb = SpinnakerELB(app=args.app, env=args.env, region=args.region, prop_path=args.properties)
    elb.create_elb()
440399
def main():
    """"""
    options = docopt(__doc__, version=__version__)
    if options['segment']:
        segment(
            options['<file>'],
            options['--output'],
            options['--target-duration'],
            options['--mpegts'],
        )
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
913087
def current(config):
    """"""
    with open(config, 'r'):
        main.current(yaml.load(open(config)))
1374052
def main(argv=None):
    """"""
    #
    # `simpl server`
    #
    logging.basicConfig(level=logging.INFO)
    server_func = functools.partial(server.main, argv=argv)
    server_parser = server.attach_parser(default_subparser())
    server_parser.set_defaults(_func=server_func)

    # the following code shouldn't need to change when
    # we add a new subcommand.
    args = default_parser().parse_args(argv)
    args._func()
619113
def main():
    """"""
    from docopt import docopt
    args = docopt(__doc__)
    infile = args['INFILE']
    outfile = args['OUTFILE']
    i3extract(infile, outfile)
1374002
def main(opts):
    """"""
    term = Terminal()
    style = Style()

    # if the terminal supports colors, use a Style instance with some
    # standout colors (magenta, cyan).
    if term.number_of_colors:
        style = Style(attr_major=term.magenta,
                      attr_minor=term.bright_cyan,
                      alignment=opts['--alignment'])
    style.name_len = term.width - 15

    screen = Screen(term, style, wide=opts['--wide'])
    pager = Pager(term, screen, opts['character_factory'])

    with term.location(), term.cbreak(), \
            term.fullscreen(), term.hidden_cursor():
        pager.run(writer=echo, reader=term.inkey)
    return 0
825510
def main(argv=None, apply_config=True):
    """"""
    if argv is None:
        argv = sys.argv

    try:
        # Exit on broken pipe.
        signal.signal(signal.SIGPIPE, signal.SIG_DFL)
    except AttributeError:  # pragma: no cover
        # SIGPIPE is not available on Windows.
        pass

    try:
        args = parse_args(argv[1:], apply_config=apply_config)

        if args.list_fixes:
            for code, description in sorted(supported_fixes()):
                print('{code} - {description}'.format(
                    code=code, description=description))
            return 0

        if args.files == ['-']:
            assert not args.in_place

            encoding = sys.stdin.encoding or get_encoding()

            # LineEndingWrapper is unnecessary here due to the symmetry between
            # standard in and standard out.
            wrap_output(sys.stdout, encoding=encoding).write(
                fix_code(sys.stdin.read(), args, encoding=encoding))
        else:
            if args.in_place or args.diff:
                args.files = list(set(args.files))
            else:
                assert len(args.files) == 1
                assert not args.recursive

            fix_multiple_files(args.files, args, sys.stdout)
    except KeyboardInterrupt:
        return 1
1033427
function toggle(main, alt) {
		var mw = core.base();
		mw.main = main;
		mw.alt = (alt || function () {

		});
		mw.active = mw.main;
		mw.enabled = true;
		mw.swap = function () {
			mw.active = (mw.active !== mw.main ? mw.main : mw.alt);
		};
		mw.writeln = function (line) {
			if (!mw.enabled) {
				return;
			}
			if (mw.enabled) {
				mw.active.writeln(line);
			}
		};
		mw.toString = function () {
			return '<miniwrite-toggle>';
		};
		return mw;
	}
1228992
def main(args=sys.argv[1:]):
    
    args = parse_args(args)
    if args.verbose:
        logging.basicConfig(level=logging.DEBUG)
    elif args.quiet:
        logging.basicConfig(level=logging.ERROR)
    else:
        logging.basicConfig(level=logging.INFO)
    app = Grole()
    serve_static(app, '', args.directory, not args.noindex)
    app.run(args.address, args.port)
619769
def real_main(release_url=None,
              tests_json_path=None,
              upload_build_id=None,
              upload_release_name=None):
    """"""
    coordinator = workers.get_coordinator()
    fetch_worker.register(coordinator)
    coordinator.start()

    data = open(FLAGS.tests_json_path).read()
    tests = load_tests(data)

    item = DiffMyImages(
        release_url,
        tests,
        upload_build_id,
        upload_release_name,
        heartbeat=workers.PrintWorkflow)
    item.root = True

    coordinator.input_queue.put(item)
    coordinator.wait_one()
    coordinator.stop()
    coordinator.join()
1127411
def main(ctx, verbose, quiet):
    
    verbosity = verbose - quiet
    configure_logging(verbosity)
    ctx.obj = {}
    ctx.obj['verbosity'] = verbosity
1222075
def main():
    """"""
    org = Organization(name='junk org').create()
    pprint(org.get_values())  # e.g. {'name': 'junk org', …}
    org.delete()