Generate flags for console.
340162
function flags(o, pre='', z='') {
  for(var k in o) {
    if(o[k]==null || k==='stdio') continue;
    if(Array.isArray(o[k])) z += ` --${pre}${k} "${o[k].join()}"`;
    else if(typeof o[k]==='object') z = flags(o[k], `${pre}${k}_`, z);
    else if(typeof o[k]==='boolean') z += o[k]? ` --${pre}${k}`:'';
    else z += ` --${pre}${k} ${JSON.stringify(o[k])}`;
  }
  return z;
}
598498
def setFlag(self, flag, state=True):
        
        if state:
            self.__flags |= flag
        else:
            self.__flags &= ~flag
25071
def __flags(self):
        
        flags = []
        if self._capture:
            flags.append("-capture")
        if self._spy:
            flags.append("-spy")
        if self._dbpath:
            flags += ["-db-path", self._dbpath]
            flags += ["-db", "boltdb"]
        else:
            flags += ["-db", "memory"]
        if self._synthesize:
            assert(self._middleware)
            flags += ["-synthesize"]
        if self._simulation:
            flags += ["-import", self._simulation]
        if self._proxyPort:
            flags += ["-pp", str(self._proxyPort)]
        if self._adminPort:
            flags += ["-ap", str(self._adminPort)]
        if self._modify:
            flags += ["-modify"]
        if self._verbose:
            flags += ["-v"]
        if self._dev:
            flags += ["-dev"]
        if self._metrics:
            flags += ["-metrics"]
        if self._auth:
            flags += ["-auth"]
        if self._middleware:
            flags += ["-middleware", self._middleware]
        if self._cert:
            flags += ["-cert", self._cert]
        if self._certName:
            flags += ["-cert-name", self._certName]
        if self._certOrg:
            flags += ["-cert-org", self._certOrg]
        if self._destination:
            flags += ["-destination", self._destination]
        if self._key:
            flags += ["-key", self._key]
        if self._dest:
            for i in range(len(self._dest)):
                flags += ["-dest", self._dest[i]]
        if self._generateCACert:
            flags += ["-generate-ca-cert"]
        if not self._tlsVerification:
            flags += ["-tls-verification", "false"]

        logging.debug("flags:" + str(flags))
        return flags
1180168
function coreFlags() {
  console.log('Core flags:');
  console.log();
  flags.forEach(function(flag) {
    console.log('  ' + flag);
  });
}
714539
def cmdline(argv, flags):
    """"""
    rules = dict([(flag, {'flags': ["--%s" % flag]}) for flag in flags])
    return parse(argv, rules)
525701
def render(self, flags: Flags) -> Text:
        
        return random.choice(self.best_for_flags(flags)).value
1175684
def get_compiler_flags():
    """"""
    compiler = get_default_fcompiler()
    if compiler == 'absoft':
        flags = ['-m64', '-O3', '-YEXT_NAMES=LCS', '-YEXT_SFX=_',
                 '-fpic', '-speed_math=10']
    elif compiler == 'gnu95':
        flags = ['-m64', '-fPIC', '-O3', '-ffast-math']
    elif compiler == 'intel':
        flags = ['-m64', '-fpp', '-free', '-O3', '-Tf']
    elif compiler == 'g95':
        flags = ['-O3', '-fno-second-underscore']
    elif compiler == 'pg':
        flags = ['-fast']
    else:
        flags = ['-m64', '-O3']
    return flags
1205480
function generateHelp(flags) {
  var max = 0;
  for (var group in flags) {
    for (var i = 0; i < flags[group].length; i++) {
      var n = 2; // '  '
      if (flags[group][i].longFlag) {
        n += 2; // '--'
        n += flags[group][i].longFlag.length;
      }
      if (flags[group][i].longFlag && flags[group][i].shortFlag) {
        n += 2; // ', '
      }
      if (flags[group][i].shortFlag) {
        n += 1; // '-'
        n += flags[group][i].shortFlag.length;
      }

      if (n > max) {
        max = n;
      }
    }
  }

  console.log('node-async-testing');
  console.log('');

  for (var group in flags) {
    console.log(group+':');
    for (var i = 0; i < flags[group].length; i++) {
      var s = '  ';
      if (flags[group][i].longFlag) {
        s += '--' + flags[group][i].longFlag;
      }
      if (flags[group][i].longFlag && flags[group][i].shortFlag) {
        s += ', ';
      }
      if (flags[group][i].shortFlag) {
        for(var j = s.length+flags[group][i].shortFlag.length; j < max; j++) {
          s += ' ';
        }
        s += '-' + flags[group][i].shortFlag;
      }
      if (flags[group][i].takesValue) {
        s += ' <'+flags[group][i].takesValue+'>';
      }
      console.log(
        s +
        ': ' +
        flags[group][i].description +
        (flags[group][i].options ? ' ('+flags[group][i].options.join(', ')+')' : '')
        );
    }
    console.log('');
  }
  console.log('Any other arguments are interpreted as files to run');
}
313926
def Flags(*params)
      if params.size==1 && params.first.kind_of?(Flags)
        params.first
      else
        Flags.new(*params)
      end
    end
108434
def flags(flags):
        
        names = sorted(
            descr for key, descr in OpCodeDebug.STREAM_CONSTANT.items() if key & flags
        )
        return ", ".join(names)
964716
def flags(self, index):
        """"""
        column = index.column()

        if index.isValid():
            if column in [C.COL_START, C.COL_END]:
#                return Qt.ItemFlags(Qt.ItemIsEnabled | Qt.ItemIsSelectable)
                return Qt.ItemFlags(Qt.ItemIsEnabled)
            else:
                return Qt.ItemFlags(Qt.ItemIsEnabled | Qt.ItemIsSelectable)
#                return Qt.ItemFlags(Qt.ItemIsEnabled)
        else:
            return Qt.ItemFlags(Qt.ItemIsEnabled)
502858
def __RenderModuleFlags(self, module, flags, output_lines, prefix=''):
    """"""
    if not isinstance(module, str):
      module = module.__name__
    output_lines.append('\n%s%s:' % (prefix, module))
    self.__RenderFlagList(flags, output_lines, prefix + '  ')
872996
def __RenderOurModuleFlags(self, module, output_lines, prefix=''):
    """"""
    flags = self._GetFlagsDefinedByModule(module)
    if flags:
      self.__RenderModuleFlags(module, flags, output_lines, prefix)
287898
def args_from_interpreter_flags():
    
    flag_opt_map = {
        'debug': 'd',
        'dont_write_bytecode': 'B',
        'no_user_site': 's',
        'no_site': 'S',
        'ignore_environment': 'E',
        'verbose': 'v',
        'bytes_warning': 'b',
        'quiet': 'q',
        'optimize': 'O',
    }
    args = []
    for flag, opt in flag_opt_map.items():
        v = getattr(sys.flags, flag, 0)
        if v > 0:
            args.append('-' + opt * v)
    for opt in sys.warnoptions:
        args.append('-W' + opt)
    return args
800992
def flags(cmd, data):
    
    if cmd.lower() == 'a':  # a: (rx ry x-axis-rotation large-arc-flag sweep-flag x y)+
        indices = range(len(data))
        return [index for index in indices if (index % 7) in [3, 4]]

    return []
702060
def console_vline(
    con: tcod.console.Console,
    x: int,
    y: int,
    l: int,
    flag: int = BKGND_DEFAULT,
) -> None:
    
    lib.TCOD_console_vline(_console(con), x, y, l, flag)
91682
def _define_absl_flags(self, absl_flags):
    """"""
    key_flags = set(absl_flags.get_key_flags_for_module(sys.argv[0]))
    for name in absl_flags:
      if name in _BUILT_IN_FLAGS:
        # Do not inherit built-in flags.
        continue
      flag_instance = absl_flags[name]
      # Each flags with short_name appears in FLAGS twice, so only define
      # when the dictionary key is equal to the regular name.
      if name == flag_instance.name:
        # Suppress the flag in the help short message if it's not a main
        # module's key flag.
        suppress = flag_instance not in key_flags
        self._define_absl_flag(flag_instance, suppress)