Process layout.json names/display to get all permutations of args.
553676
def permutations(self):
        """"""
        if 'sqlite3' not in sys.modules:
            print('The sqlite3 module needs to be build-in to Python for this feature.')
            sys.exit(1)

        self.db_create_table(self.input_table, self.install_json_params().keys())
        self.db_insert_record(self.input_table, self.install_json_params().keys())
        self.gen_permutations()
        self.print_permutations()
833897
def parse_args(args=None):
    """"""
    from argparse import ArgumentParser

    if args is None:
        args = sys.argv

    parser = ArgumentParser(description='Rename template project with'
                            'hyphen-separated <new name> (path names and in '
                            'files).')
    parser.add_argument('new_name', help='New project name (e.g., '
                        ' `my-new-project`)')

    args = parser.parse_args()
    return args
543734
def render_all_layouts(layouts, payload, info)
      _renderer.layouts = layouts
      self.output = _renderer.place_in_layouts(output, payload, info)
    ensure
      @_renderer = nil # this will allow the modifications above to disappear
    end
311745
function getArgs(){

    var params, args = [], wasFlag, posIndex;
    if(!hasWindow && hasProcess){
        params = process.argv.slice(2);

        if(!params.length) return [];

        if((posIndex = params.indexOf('--')) !== -1){
            return params.slice(posIndex + 1);
        }

        for(var i=0; i<params.length; i++){

            if(isFlag(params[i])){
                wasFlag = params[i];
                if(hasEqual(params[i])){
                    if(i+1 < params.length - 1 && !isFlag(params[i+1])){
                        i++;
                        args.push(toJSValue(params[i]));
                        wasFlag = false;
                    }
                }
            }else{

                if(!wasFlag){
                    args.push(toJSValue(params[i]));
                }
                wasFlag = false;
            }
        }

        return args;
    }else if(hasWindow){
        return window.location.pathname.split('/');
    }

    return [];
}
1163716
def process_all_json_files(build_dir):
    """"""
    html_files = []
    for root, _, files in os.walk(build_dir):
        for filename in fnmatch.filter(files, '*.fjson'):
            if filename in ['search.fjson', 'genindex.fjson',
                            'py-modindex.fjson']:
                continue
            html_files.append(os.path.join(root, filename))
    page_list = []
    for filename in html_files:
        try:
            result = process_file(filename)
            if result:
                page_list.append(result)
        # we're unsure which exceptions can be raised
        except:  # noqa
            pass
    return page_list
910317
def _CollectArguments(function, args, kwargs):
  """"""
  all_args = dict(kwargs)
  arg_names = inspect.getargspec(function)[0]
  for position, arg in enumerate(args):
    if position < len(arg_names):
      all_args[arg_names[position]] = arg
  return all_args
1356807
def get_context_arguments(self):
        """"""
        cargs = {}
        for context in self.__context_stack:
            cargs.update(context.context_arguments)
        return cargs
794803
def do_layout(self, *args):
        """"""
        if self.size == [1, 1]:
            return
        for i in range(0, len(self.decks)):
            self.layout_deck(i)
814853
def get_base_layout(figs):
	
	layout={}
	for fig in figs:
		if not isinstance(fig,dict):
			fig=fig.to_dict()
		for k,v in list(fig['layout'].items()):
			layout[k]=v
	return layout
432600
function getLayoutName(file, options) {
  const defaultLayout = options.defaultLayout;
  const prop = options.layoutProp || 'layout';
  const name = file[prop];
  if (typeof name === 'undefined' || name === true || name === defaultLayout) {
    return defaultLayout;
  }
  if (!name || ['false', 'null', 'nil', 'none', 'undefined'].includes(name.toLowerCase())) {
    return false;
  }
  return name;
}
856234
def template_args(subparsers):
    """"""
    template_parser = subparsers.add_parser('template')
    template_parser.add_argument('template',
                                 help='Template source',
                                 nargs='?')
    template_parser.add_argument('destination',
                                 help='Path to write rendered template',
                                 nargs='?')
    template_parser.add_argument('vault_paths',
                                 help='Full path(s) to secret',
                                 nargs='*')
    template_parser.add_argument('--builtin-list',
                                 dest='builtin_list',
                                 help='Display a list of builtin templates',
                                 action='store_true',
                                 default=False)
    template_parser.add_argument('--builtin-info',
                                 dest='builtin_info',
                                 help='Display information on a '
                                 'particular builtin template')
    vars_args(template_parser)
    mapping_args(template_parser)
    base_args(template_parser)
1057601
def _map_arg_names(source, mapping):
        """"""
        return {cartopy_name: source[cf_name] for cartopy_name, cf_name in mapping
                if cf_name in source}
68268
def process_arguments(args):
    """"""
    if args.sentryconfig:
        print('Parsing DSN from %s' % args.sentryconfig)
        os.environ['SENTRY_DSN'] = parse_sentry_configuration(args.sentryconfig)

    if args.sentrydsn:
        print('Using the DSN %s' % args.sentrydsn)
        os.environ['SENTRY_DSN'] = args.sentrydsn

    if args.nginxerrorpath:
        print('Using the Nginx error log path %s' % args.nginxerrorpath)
        os.environ['NGINX_ERROR_PATH'] = args.nginxerrorpath

    from ..conf import settings  # noqa; pylint: disable=unused-variable

    if args.daemonize:
        print('Running process in background')
        from ..daemonize import create_daemon
        create_daemon()
444649
def parse_args(args=None):
    """"""
    from argparse import ArgumentParser

    if args is None:
        args = sys.argv[1:]

    parser = ArgumentParser(description='Demonstrate drawing SVG on Clutter '
                            'stage')
    parser.add_argument('svg_path')
    parser.add_argument('shape', nargs='?', default=None)

    args = parser.parse_args(args)
    return args
1346608
def get_args():
    """"""
    description = "wal - Generate colorschemes on the fly"
    arg = argparse.ArgumentParser(description=description)

    arg.add_argument("-a", metavar="\"alpha\"",
                     help="Set terminal background transparency. \
                           *Only works in URxvt*")

    arg.add_argument("-b", metavar="background",
                     help="Custom background color to use.")

    arg.add_argument("--backend", metavar="backend",
                     help="Which color backend to use. \
                           Use 'wal --backend' to list backends.",
                     const="list_backends", type=str, nargs="?")

    arg.add_argument("--theme", "-f", metavar="/path/to/file or theme_name",
                     help="Which colorscheme file to use. \
                           Use 'wal --theme' to list builtin themes.",
                     const="list_themes", nargs="?")

    arg.add_argument("--iterative", action="store_true",
                     help="When pywal is given a directory as input and this "
                          "flag is used: Go through the images in order "
                          "instead of shuffled.")

    arg.add_argument("--saturate", metavar="0.0-1.0",
                     help="Set the color saturation.")

    arg.add_argument("--preview", action="store_true",
                     help="Print the current color palette.")

    arg.add_argument("--vte", action="store_true",
                     help="Fix text-artifacts printed in VTE terminals.")

    arg.add_argument("-c", action="store_true",
                     help="Delete all cached colorschemes.")

    arg.add_argument("-i", metavar="\"/path/to/img.jpg\"",
                     help="Which image or directory to use.")

    arg.add_argument("-l", action="store_true",
                     help="Generate a light colorscheme.")

    arg.add_argument("-n", action="store_true",
                     help="Skip setting the wallpaper.")

    arg.add_argument("-o", metavar="\"script_name\"", action="append",
                     help="External script to run after \"wal\".")

    arg.add_argument("-q", action="store_true",
                     help="Quiet mode, don\'t print anything.")

    arg.add_argument("-r", action="store_true",
                     help="'wal -r' is deprecated: Use \
                           (cat ~/.cache/wal/sequences &) instead.")

    arg.add_argument("-R", action="store_true",
                     help="Restore previous colorscheme.")

    arg.add_argument("-s", action="store_true",
                     help="Skip changing colors in terminals.")

    arg.add_argument("-t", action="store_true",
                     help="Skip changing colors in tty.")

    arg.add_argument("-v", action="store_true",
                     help="Print \"wal\" version.")

    arg.add_argument("-e", action="store_true",
                     help="Skip reloading gtk/xrdb/i3/sway/polybar")

    return arg
390735
def get_args_and_values(parser, an_action):
    """"""
    args = inspect.getargspec(an_action.__class__.__init__).args
    kwargs = dict(
        (an_attr, getattr(an_action, an_attr))
        for an_attr in args
        if (
            an_attr not in ('self', 'required')
            and getattr(an_action, an_attr) is not None
        )
    )
    action_name = find_action_name_by_value(
        parser._optionals._registries,
        an_action
    )
    if 'required' in kwargs:
        del kwargs['required']
    kwargs['action'] = action_name
    if 'option_strings' in kwargs:
        args = tuple(kwargs['option_strings'])
        del kwargs['option_strings']
    else:
        args = ()
    return args, kwargs
805527
def get_dict_of_all_args(self):
        
        dictionary = {}
        for arg in [arg for arg in self.request.arguments if arg not in self.settings.get("reserved_query_string_params", [])]:
            val =  self.get_argument(arg, default=None)
            if val:
                dictionary[arg] = val
        return dictionary