This helper function initializes a tool with the given args.
504638
def tool_builder(component, key, tool_map, *args):
    """"""
    # pylint: disable=protected-access
    tool_name = component.get(key)
    if tool_name:
        tool_fn = tool_map.get(tool_name)
        if tool_fn:
            return tool_fn[0](*args)
        raise Exception("Unknown {} '{}' for {}".format(key, tool_name, component.name))
    raise MissingToolKey(key, component)
869168
def initialize(self):
    

    # Retrieve the necessary extra arguments that were handled automatically
    autoArgs = {name: getattr(self, name) for name in self._poolerArgNames}
    autoArgs["inputDimensions"] = [self._inputWidth]
    autoArgs["columnDimensions"] = [self._columnCount]
    autoArgs["potentialRadius"] = self._inputWidth
    autoArgs["historyLength"] = self._historyLength
    autoArgs["minHistory"] = self._minHistory

    # Allocate the pooler
    self._pooler = self._poolerClass(**autoArgs)
938915
public void initImpl()
  {
    if (_level == null) {
      return;
    }
    
    if (_names.size() == 0) {
      _names.add("");
    }
    
    for (String name : _names) {
      _logger = Logger.getLogger(name);
    
      if (_level != null) {
        _logger.setLevel(_level);
      }

      if (_useParentHandlers != null) {
        _logger.setUseParentHandlers(_useParentHandlers.booleanValue());
      }
    
      for (Handler handler : _handlerList) {
        _logger.addHandler(handler);
      }
    
      if (_filter != null) {
        _logger.setFilter(_filter);
      }
    }
  }
550601
protected static final Injector init(final String commandName, final String[] args) {
        String usage = commandName + USAGE_PARAMS;
        Switch about = new Switch("a", "about", "display about message");
        Switch help = new Switch("h", "help", "display help message");
        final StringArgument namespace = new StringArgument("s", "namespace", "namespace", true);
        final FileArgument glstringFile = new FileArgument("g", "glstrings", "glstring input file", false);
        final FileArgument identifierFile = new FileArgument("i", "identifiers", "identifier output file", false);
        final StringArgument client = new StringArgument("c", "client", "client implementation, json or xml, default json", false);

        ArgumentList arguments = new ArgumentList(about, help, namespace, glstringFile, identifierFile, client);
        CommandLine commandLine = new CommandLine(args);
        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);
            }
        }
        catch (CommandLineParseException e) {
            if (about.wasFound()) {
                About.about(System.out);
                System.exit(0);
            }
            if (help.wasFound()) {
                Usage.usage(usage, null, commandLine, arguments, System.out);
                System.exit(0);
            }
            Usage.usage(usage, e, commandLine, arguments, System.err);
            System.exit(-1);
        }

        return Guice.createInjector(new CacheGlClientModule(), new AbstractModule() {
            @Override
            protected void configure() {
                bind(String.class).annotatedWith(Namespace.class).toInstance(namespace.getValue());

                if (glstringFile.wasFound()) {
                    bind(File.class).annotatedWith(GlstringFile.class).toInstance(glstringFile.getValue());
                }
                else {
                    bind(File.class).annotatedWith(GlstringFile.class).toProvider(Providers.of((File) null));
                }

                if (identifierFile.wasFound()) {
                    bind(File.class).annotatedWith(IdentifierFile.class).toInstance(identifierFile.getValue());
                }
                else {
                    bind(File.class).annotatedWith(IdentifierFile.class).toProvider(Providers.of((File) null));
                }

                bind(HttpClient.class).to(RestAssuredHttpClient.class);

                if ("xml".equals(client.getValue("json"))) {
                    bind(GlClient.class).to(XmlGlClient.class);
                }
                else {
                    bind(GlClient.class).to(JsonGlClient.class);
                }
            }
        });
    }
316003
private static void init(){
		String junittest = System.getProperty("JUNITTEST");
		if (junittest!=null && (junittest.equalsIgnoreCase("true")))
			return;
		StartBuiltInProducers.startbuiltin();
		//ensure plugins are loaded.
		PluginRepository.getInstance();
		//ensure accumulators are initialized.
		AccumulatorRepository.getInstance();
		//ensure thresholds are initialized.
		ThresholdRepository.getInstance();
	}
463764
public static synchronized void init(String[] args, String... extraArgs) {
		AppStarter.startUp(args, extraArgs);

		status = AppStatus.INITIALIZING;

		// no implicit classpath scanning here
		boot();
	}
313654
function initHandlers(options, handlerClass) {
    var optHandlers = Array.isArray(options[handlerClass]) ?
          options[handlerClass] : [options[handlerClass]],
      handlers = [];
    optHandlers.forEach(function(handler) {
      if (typeof handler === 'function') {
        handlers.push(handler);
      } else if (typeof handler === 'string' && builtinHandler[handlerClass][handler]) {
        handlers.push(builtinHandler[handlerClass][handler]);
      }
    });
    return handlers;
  }
767096
def init_args(cls):
    
    # This looks insanely goofy, but seems to literally be the
    # only thing that actually works.  Your obvious ways to
    # accomplish this task do not apply here.
    try:
        # Assume it's a factory function, static method, or other callable
        argspec = getargspec(cls)
    except TypeError:
        # assume it's a class
        argspec = getargspec(cls.__init__)
    args = argspec.args

    # Note:  There is a special place in hell for people who don't
    #        call the first method argument 'self'.
    if args[0] == 'self':
        args.remove('self')

    return args
952259
def init():
    
    try:
        config = get_config()
        print(config.dir)
        alembic_command.init(config, config.dir, 'project')
    except CommandError as e:
        click.echo(red(str(e)))
212888
function init() {
  // Retrieve any arguments passed in via the command line
  args = cliConfig.getArguments();

  // Supply usage info if help argument was passed
  if (args.help) {
    console.log(cliConfig.getUsage());
    process.exit(0);
  }

  getClientAuth(function(data) {
    parseClientAuth(data, function(err, data) {
      if (err) {
        console.error(err.message);
        process.exit(0);
      }
      writeEdgerc(data, function(err) {
        if (err) {
          if (err.errno == -13) {
            console.error("Unable to access " + err.path + ". Please make sure you " +
              "have permission to access this file or perhaps try running the " +
              "command as sudo.");
            process.exit(0);
          }
        }
        console.log("The section '" + args.section + "' has been succesfully added to " + args.path + "\n");
      });
    });
  });
}
778844
def set_from_args(options)
      assign(options)
    rescue ConfigError => e
      alert_logger.warn format(
        'Failed to configure from arguments: %s',
        e.message
      )
    end
685761
function initAppHandlers (cfg = {}) {
	_.each(handlers, (handler, name) => App[name] = _.partial(handler, _, (_.isFunction(cfg[name])) ? cfg[name] : _.noop));
}
1241392
def init(parser = None):
    

    global p,subparsers
    if parser is None:
        p = argparse.ArgumentParser()
    else:
        p = parser

    arg = p.add_argument

    subparsers = p.add_subparsers()
1037375
private LaunchArguments createLaunchArguments(String[] args, Map<String, String> initProps) {
        List<String> cmdArgs = processBatchFileArgs(new ArrayList<String>(Arrays.asList(args)));
        return new LaunchArguments(cmdArgs, initProps, isClient());
    }
899672
def do_setup(self, arg, arguments):
        
        if arguments["init"]:
            Console.ok("Initialize cmd3.yaml file")

            from cmd3.yaml_setup import create_cmd3_yaml_file
            force = arguments["--force"]
            create_cmd3_yaml_file(force=force)
386980
def init_argparser_optional_advice(
            self, argparser, default=[], help=(
                'a comma separated list of packages to retrieve optional '
                'advice from; the provided packages should have registered '
                'the appropriate entry points for setting up the advices for '
                'the toolchain; refer to documentation for the specified '
                'packages for details'
            )):
        

        argparser.add_argument(
            '--optional-advice', default=default, required=False,
            dest=ADVICE_PACKAGES, action=StoreRequirementList,
            metavar='<advice>[,<advice>[...]]',
            help=help
        )
75143
private static void initHandlers() {
		Log.info("Initializing Handlers...");
		for (Handler handler : conf.getHandlers()) {
			try {
				if (!configContext.getHandlers().contains(handler)) {
					Map<String, String> handlerproperties = new HashMap<>();
					handlerproperties.putAll(configContext.getProperties());
					handler.setProperties(handlerproperties);
					handler.init();
					configContext.addHandler(handler);
				}
				Log.info(handler.getClass().getName() + " Initialized.");
			} catch (InitializationException e) {
				Log.error("There is a problem in the hander: ", handler.getClass().getName(),
						ErrorGuide.getGuide(ErrorGuide.HANDLER_ERROR));
				terminate();
				throw new InitializationException(INIT_FAILED, e);
			}
		}
	}