Get keyword args for GoSubDagPlot from self unless they are None.
5075
def get_kws_plt(self):
        """"""
        kws_plt = {}
        for key_plt in self.keys_plt:
            key_val = getattr(self, key_plt, None)
            if key_val is not None:
                kws_plt[key_plt] = key_val
            elif key_plt in self.kws:
                kws_plt[key_plt] = self.kws[key_plt]
        return kws_plt
928484
def to_args(self):
        
        def has_value(name, value):
            """ Test for non-null option values.
            """
            null_values = ("False", "None", "[]", '""', "''", "0")
            if not value or value in null_values:
                return False
            if name in _arg_defaults:
                if str(value) == str(_arg_defaults[name]):
                    return False
            return True

        def filter_opt(name, value):
            """ Filter out preset and null-valued options.
            """
            if name in ("add_preset", "del_preset", "desc", "note"):
                return False
            return has_value(name, value)

        def argify(name, value):
            """ Convert sos option notation to command line arguments.
            """
            # Handle --verbosity specially
            if name.startswith("verbosity"):
                arg = "-" + int(value) * "v"
                return arg

            name = name.replace("_", "-")

            value = ",".join(value) if _is_seq(value) else value

            if value is not True:
                opt = "%s %s" % (name, value)
            else:
                opt = name

            arg = "--" + opt if len(opt) > 1 else "-" + opt
            return arg

        opt_items = sorted(self.dict().items(), key=lambda x: x[0])
        return [argify(n, v) for (n, v) in opt_items if filter_opt(n, v)]
56411
def get_kwargs(**kwargs):
        
        d = dict()
        for k, v in kwargs.iteritems():
            if v is not NOTSET:
                d[k] = v
        return d
1017336
def get_args(cls, dist, header=None):
        
        if header is None:
            header = cls.get_header()
        spec = str(dist.as_requirement())
        for type_ in 'console', 'gui':
            group = type_ + '_scripts'
            for name, ep in dist.get_entry_map(group).items():
                cls._ensure_safe_name(name)
                script_text = cls.template % locals()
                args = cls._get_script_args(type_, name, header, script_text)
                for res in args:
                    yield res
882561
def _goargs(self, ret, go_args):
        """"""
        goids = set()
        go2color = {}
        # Match on "GO ID" or "GO ID and color"
        re_gocolor = re.compile(r'(GO:\d{7})((?:#[0-9a-fA-F]{6})?)')
        for go_arg in go_args:
            mtch = re_gocolor.match(go_arg)
            if mtch:
                goid, color = mtch.groups()
                goids.add(goid)
                if color:
                    go2color[goid] = color
            else:
                print("WARNING: UNRECOGNIZED ARG({})".format(go_arg))
        self._update_ret(ret, goids, go2color)
460013
def get_kws(self):
        """"""
        ret = self.kws['dict'].copy()
        act_set = self.kws['set']
        if 'shorten' in act_set and 'goobj2fncname' not in ret:
            ret['goobj2fncname'] = ShortenText().get_short_plot_name
        return ret
1250009
def __get_arg(cls, kwds, kwd):
    """"""
    alt_kwd = '_' + kwd
    if alt_kwd in kwds:
      return kwds.pop(alt_kwd)
    if kwd in kwds:
      obj = getattr(cls, kwd, None)
      if not isinstance(obj, Property) or isinstance(obj, ModelKey):
        return kwds.pop(kwd)
    return None
242351
def args_as_tuple(self):
        """"""
        result = ("currentdate", )
        result += (
            ":zone",
            self.extra_arguments["zone"].strip('"'),
            self.arguments["match-type"],
        )
        if self.arguments["match-type"] in [":count", ":value"]:
            result += (self.extra_arguments["match-type"].strip('"'), )
        result += (self.arguments["date-part"].strip('"'), )
        value = self.arguments["key-list"]
        if isinstance(value, list):
            # FIXME
            value = "[{}]".format(
                ",".join('"{}"'.format(item) for item in value))
        if value.startswith("["):
            result = result + tuple(tools.to_list(value))
        else:
            result = result + (value.strip('"'),)
        return result
741178
def get_arguments(self, **include):
        
        d = dict(self._kwargs)

        for k in include:
            if not include[k] and k in d:
                d.pop(k)
        return d
52286
def _unknown_args(self, args):
        
        for u in args:
            self.tcex.log.warning(u'Unsupported arg found ({}).'.format(u))
1127939
def get_pltdotstrs(self, **kws): # GrouperUserGos
        """"""
        hdrgos = self.grprobj.get_hdrgos()
        return self._get_pltdotstrs(hdrgos, **kws)
1162150
def get_edgesobj(gosubdag, **kws):
    """"""
    # Keyword args (kws):
    #     1. dst_srcs_list  Used for edges pruned such that only GO terms
    #                       are retained which are between the sets of dst & srcs.
    #     2  traverse_parent & traverse_child
    #                       Used to generate a GoSubDag with all parent terms and/or
    #                       all child terms, without pruning any paths.
    # Call function, get_edgesobj, with:
    #     get_edgesobj(go2obj, dst_srcs_list=...)
    # Or any of:
    #     get_edgesobj(go2obj, go_sources=...)
    #     get_edgesobj(go2obj, go_sources=..., traverse_parent=...,)
    #     get_edgesobj(go2obj, go_sources=..., traverse_child=...,)
    #     get_edgesobj(go2obj, go_sources=..., traverse_parent=..., traverse_child=...,)
    edgeobj = _get_edgesobj(gosubdag, **kws)
    rm_gos = kws.get('rm_gos')
    if rm_gos is not None:
        edgeobj.rm_gos(rm_gos)
    return edgeobj
937318
def get_args():
        

        parser = build_parser()
        args = vars(parser.parse_args())

        # Overwrite the deprecated "-l" option into the link variable
        if args['link_deprecated'] and args['link'] is None:
            args['link'] = args['link_deprecated']
        args.pop('link_deprecated', None)

        # Filter out argument values that weren't supplied
        return {key: val for key, val in args.items() if val is not None}
283326
def find(self, **kwargs):
        

        if len(kwargs) != 1:
            raise ValueError("One and only one keyword argument accepted")

        key = list(kwargs.keys())[0]
        value = list(kwargs.values())[0]
        ret = None
        for row in self.values():
            if row[key] == value:
                ret = row
                break
        return ret
869139
def get_usrgos(self, fin_goids, prt):
        """"""
        ret = self.get_goids(None, fin_goids, prt)
        # If there have been no GO IDs explicitly specified by the user
        if not ret:
            # If the GO-DAG is sufficiently small, print all GO IDs
            if self.max_gos is not None and len(self.go2obj) < self.max_gos:
                main_gos = set(o.id for go, o in self.go2obj.items() if go != o.id)
                go_leafs = set(go for go, o in self.go2obj.items() if not o.children)
                ret = go_leafs.difference(main_gos)
            else:
                raise RuntimeError("GO IDs NEEDED")
        go2obj = self.get_go2obj(ret)
        return get_go2obj_unique(go2obj)
884923
def getArguments(names, local_dict=None, global_dict=None):
    """"""
    call_frame = sys._getframe(2)

    clear_local_dict = False
    if local_dict is None:
        local_dict = call_frame.f_locals
        clear_local_dict = True
    try:
        frame_globals = call_frame.f_globals
        if global_dict is None:
            global_dict = frame_globals

        # If `call_frame` is the top frame of the interpreter we can't clear its 
        # `local_dict`, because it is actually the `global_dict`.
        clear_local_dict = clear_local_dict and not frame_globals is local_dict

        arguments = []
        for name in names:
            try:
                a = local_dict[name]
            except KeyError:
                a = global_dict[name]
            arguments.append(numpy.asarray(a))
    finally:
        # If we generated local_dict via an explicit reference to f_locals,
        # clear the dict to prevent creating extra ref counts in the caller's scope
        # See https://github.com/pydata/numexpr/issues/310
        if clear_local_dict:
            local_dict.clear()

    return arguments
1054250
def get_arguments(self):
        """"""
        num_args = conf.lib.clang_Cursor_getNumArguments(self)
        for i in xrange(0, num_args):
            yield conf.lib.clang_Cursor_getArgument(self, i)