Initialise default command and validate
498263
private void init(Set<String> pCommands, String ... pArgs) {
        quiet = options.containsKey("quiet");
        verbose = options.containsKey("verbose");
        jarFile = lookupJarFile();

        // Special cases first
        extraArgs = checkCommandAndArgs(pCommands, pArgs);
    }
1162910
def handle_initialize(self, data):
        '''
        
        '''
        self.tuner.update_search_space(data)
        send(CommandType.Initialized, '')
        return True
229714
def __init_defaults(self, config):
        """"""

        provider = self.__provider

        if provider == 'sqlite':
            config.setdefault('dbname', ':memory:')
            config.setdefault('create_db',  True)
        elif provider == 'mysql':
            config.setdefault('port', 3306)
            config.setdefault('charset', 'utf8')
        elif provider == 'postgres':
            config.setdefault('port', 5432)
        elif provider == 'oracle':
            config.setdefault('port', 1521)
        else:
            raise ValueError('Unsupported provider "{}"'.format(provider))

        if provider != 'sqlite':
            config.setdefault('host', 'localhost')
            config.setdefault('user', None)
            config.setdefault('password', None)
            config.setdefault('dbname', None)
1336103
def create_default_commands
			command :help do
        syntax 'commander help [command]'
        description 'Display global or [command] help documentation'
        example 'Display global help', 'command help'
        example "Display help for 'foo'", 'command help foo'
        when_called do |args, _options|
          UI.enable_paging
          if args.empty?
            say help_formatter.render
          else
            command = command args.join(' ')
            begin
              require_valid_command command
            rescue InvalidCommandError => e
              abort "#{e}. Use --help for more information"
            end
            say help_formatter.render_command(command)
          end
        end
      end
    end
910988
def validate(self, value=_undefined, name=None):
        
        if self.optional:
            if value is _undefined or value is None:
                if self.default is None:
                    return None
                elif util.is_function(self.default):
                    value = self.default()
                else:
                    value = self.default
        elif value is _undefined:
            if name is not None:
                name_msg = "argument `{}`".format(name)
            else:
                name_msg = "unnamed argument"
            raise TypeError("Missing required value for {}".format(name_msg))

        return self.validator(value)
1327532
def init(name, runtime):
    """"""
    runtime = click.unstyle(runtime)

    stdout.write(
        style.format_command(
            'Initializing',
            '%s %s %s' % (name, style.gray('@'), style.green(runtime))
        )
    )

    config = Config(os.getcwd())
    config.set('runtime', runtime)
    config.save()

    generate.main(['init', name], standalone_mode=False)
    run.main(['python', 'manage.py', 'migrate'])
142857
def init(*, output_dir=FS_DEFAULT_OUTPUT_DIR, dry_run=False, **kwargs):
    
    # Output directory
    global _output_dir
    _output_dir = output_dir

    # Dry run mode
    global _dry_run
    _dry_run = dry_run

    # Type checks
    utils.chkstr(_output_dir, 'output_dir')

    # log the thing
    log.msg("Output directory will be: {output_dir}"
            .format(output_dir=_output_dir))

    # Create output directory if it does not exist
    if not os.path.exists(_output_dir):
        log.msg_warn("Output path '{out_dir}' does not exist, creating it ..."
                     .format(out_dir=_output_dir))
        if not _dry_run:
            # create the actual root output directory
            os.makedirs(_output_dir)
            # set folder permissions to 0770
            os.chmod(_output_dir, stat.S_IRWXU | stat.S_IRWXG)
1355844
def _run_init(
    argv,
    flags_parser,
):
  """"""
  if _run_init.done:
    return flags_parser(argv)
  command_name.make_process_name_useful()
  # Set up absl logging handler.
  logging.use_absl_handler()
  args = _register_and_parse_flags_with_usage(
      argv=argv,
      flags_parser=flags_parser,
  )
  if faulthandler:
    try:
      faulthandler.enable()
    except Exception:  # pylint: disable=broad-except
      # Some tests verify stderr output very closely, so don't print anything.
      # Disabled faulthandler is a low-impact error.
      pass
  _run_init.done = True
  return args
687081
def default_command(command_name = nil)
      if command_name
        if commands.key?(command_name)
          @default_command = commands[command_name] if command_name
          @default_command
        else
          raise ArgumentError, "'#{command_name}' couldn't be found in this command's list of commands."
        end
      else
        @default_command
      end
    end
209214
function validate(cmd, args, info) {
  AbstractCommand.prototype.validate.apply(this, arguments);
  var start
    , end;

  if(args.length !== 1 && args.length !== 3) {
    throw new CommandArgLength(cmd);
  }

  if(args.length > 1) {
    start = parseInt('' + args[1]);
    if(isNaN(start)) throw IntegerRange;
    args[1] = start;
    end = parseInt('' + args[2]);
    if(isNaN(end)) throw IntegerRange;
    args[2] = end;
  }
}
1132448
function validate(cmd, args, info) {
  AbstractCommand.prototype.validate.apply(this, arguments);
  var withscores;
  if(args.length > 3) {
    withscores = ('' + args[3]).toLowerCase();
    if(withscores !== Constants.ZSET.WITHSCORES) {
      throw CommandSyntax;
    }
    args[3] = withscores;
  }
}
473379
def default_settings(params):
    
    def _default_settings(fn, command):
        for k, w in params.items():
            settings.setdefault(k, w)
        return fn(command)
    return decorator(_default_settings)
194133
def init_parsecmdline(argv=[]):
    
    # main argument parser
    parser = argparse.ArgumentParser(prog=PKG_NAME)

    # --version
    parser.add_argument('--version', action='version', version=version)

    # -c, --config <file_name>
    parser.add_argument("-c", "--config",
                        action="store",
                        dest="config_file", default=config.CONF_DEFAULT_FILE,
                        help="specify configuration file to use")

    # --dry-run
    parser.add_argument("-d", "--dry-run",
                        action="store_true",  dest="dry_run", default=False,
                        help="don't actually do anything")

    # --quiet
    parser.add_argument("-q", "--quiet",
                        action="store_true",  dest="log_quiet", default=False,
                        help="quiet output")

    # --ll <level>
    # logging level
    parser.add_argument("--ll", "--log-level",
                        action="store", type=int,
                        dest="log_lvl", default=log.LOG_LVL_DEFAULT,
                        help="set logging level")

    # -l, --log-file
    parser.add_argument("-l", "--log-file",
                        action="store",
                        dest="log_file", default=log.LOG_FILE_DEFAULT,
                        help="set log file")

    # Absorb the options
    options = parser.parse_args(argv)

    # Set whether we are going to perform a dry run
    global _opt
    _opt["dry_run"] = options.dry_run

    # Initiate the log level
    log.init(threshold_lvl=options.log_lvl,
             quiet_stdout=options.log_quiet, log_file=options.log_file)

    #
    # Print the splash
    #
    _splash()

    # Merge configuration with a JSON file
    config_file = os.path.abspath(options.config_file)
    log.msg("Attempting to use configuration file '{config_file}'"
            .format(config_file=config_file))
    try:
        config.set_from_file(config_file)
    except FileNotFoundError:
        raise FileNotFoundError("Configuration file '{config_file}' not found!"
                                .format(config_file=config_file))
307350
function validate(cmd, args, info) {
  AbstractCommand.prototype.validate.apply(this, arguments);
  var offset = 2
    , arg
    , expires;

  // need string args (except for key, value)
  args.forEach(function(a, i, arr) {
    if(i > 1) {
      arr[i] = '' + a;
    }
  })

  if(args.length > 7) {
    throw new CommandArgLength(cmd);
  }else if(args.length > 2) {
    arg = args[offset];
    while(arg !== undefined) {
      arg = arg.toLowerCase();
      args[offset] = arg;
      if(arg !== Constants.EX
        && arg !== Constants.PX
        && arg !== Constants.NX
        && arg !== Constants.XX) {
        throw CommandSyntax;
      }
      if(arg === Constants.EX || arg === Constants.PX) {
        expires = parseInt('' + args[offset + 1]);
        if(isNaN(expires)) {
          throw IntegerRange;
        }
        args[++offset] = expires;
      }
      arg = args[++offset];
    }
  }
}
296666
function(command) {
            var self    = this,
                control = null,
                output  = new mixitup.CommandMultimix(),
                i       = -1;

            self.callActions('beforeUpdateControls', arguments);

            // Sanitise to defaults

            if (command.filter) {
                output.filter = command.filter.selector;
            } else {
                output.filter = self.state.activeFilter.selector;
            }

            if (command.sort) {
                output.sort = self.buildSortString(command.sort);
            } else {
                output.sort = self.buildSortString(self.state.activeSort);
            }

            if (output.filter === self.config.selectors.target) {
                output.filter = 'all';
            }

            if (output.filter === '') {
                output.filter = 'none';
            }

            h.freeze(output);

            for (i = 0; control = self.controls[i]; i++) {
                control.update(output, self.toggleArray);
            }

            self.callActions('afterUpdateControls', arguments);
        }
1210580
function validate(cmd, args, info) {
  AbstractCommand.prototype.validate.apply(this, arguments);
  var op = ('' + args[0]).toLowerCase();
  if(op !== BITOP.AND && op !== BITOP.OR
    && op !== BITOP.XOR && op !== BITOP.NOT) {
    throw CommandSyntax;
  }
  if(op === BITOP.NOT && args.length !== 3) {
    throw BitopNot;
  }
  args[0] = op;
}
425496
function process(){
		if (!conf.configured) that.configure();
		var args = command.args.slice(0);
		for(var i in args){
			var arg = args[i];
			if(conf.regexp.test(arg)){
				var catchWord = RegExp.$2;
				switch(RegExp.$1){
					case '-': 
						processShortKey(catchWord, i, args);
						break;
					case '--':
						processKey(catchWord, i, args);
						break;
				}
			} else {
				addArgument(arg);
			}
		}
		conf.processed = true
	}