Recursively finds all names.
354381
def _get_names(node, result):
    """"""
    if isinstance(node, ast.Name):
        return node.id + result
    elif isinstance(node, ast.Subscript):
        return result
    elif isinstance(node, ast.Starred):
        return _get_names(node.value, result)
    else:
        return _get_names(node.value, result + '.' + node.attr)
124162
def get_all(self):
        ''''''
        for name, values in self._map.items():
            for value in values:
                yield (name, value)
1102373
def names(self):
        """"""
        if getattr(self, 'key', None) is None:
            result = []
        else:
            result = [self.key]
        if hasattr(self, 'aliases'):
            result.extend(self.aliases)
        return result
999830
def finddirs(pattern, path='.', exclude=None, recursive=True):
    """"""
    import fnmatch
    import os
    if recursive:
        for root, dirnames, filenames in os.walk(path):
            for pat in _to_list(pattern):
                for dirname in fnmatch.filter(dirnames, pat):
                    dirpath = join(abspath(root), dirname)
                    for excl in _to_list(exclude):
                        if excl and fnmatch.fnmatch(dirpath, excl):
                            break
                    else:
                        yield dirpath
    else:
        for pat in _to_list(pattern):
            for dirname in fnmatch.filter(listdirs(path), pat):
                dirpath = join(abspath(path), dirname)
                for excl in _to_list(exclude):
                    if excl and fnmatch.fnmatch(dirpath, excl):
                        break
                else:
                    yield dirpath
367554
def _get_all_containing(self, containing_contigs, name, exclude=None, max_depth=10):
        ''''''
        contains_name = set()
		
        # failsafe to prevent infinite recursion
        if max_depth < 0:
            return contains_name
		
        if name in containing_contigs:
            for containing_contig in containing_contigs[name]:
                # if we have a contains b and b contains a, then this stops infinite recursion
                if containing_contig==exclude:
                    continue
                contains_name.add(containing_contig)
                new_names = self._get_all_containing(containing_contigs, containing_contig, exclude=name,max_depth=max_depth-1)
                new_names.discard(name)
                contains_name.update(new_names)
        return contains_name
753128
private static void gatherLocalNames(Node n, Set<String> names) {
    if (n.isFunction()) {
      if (NodeUtil.isFunctionDeclaration(n)) {
        names.add(n.getFirstChild().getString());
      }
      // Don't traverse into inner function scopes;
      return;
    } else if (n.isName()) {
      switch (n.getParent().getToken()) {
        case VAR:
        case LET:
        case CONST:
        case CATCH:
          names.add(n.getString());
          break;
        default:
          break;
      }
    }

    for (Node c = n.getFirstChild(); c != null; c = c.getNext()) {
      gatherLocalNames(c, names);
    }
  }
933735
def lookup_name_fast(self, name):
        """"""

        if name in self.__names:
            return self.__names[name]

        count = self.__get_count_cached()
        lo = 0
        hi = count
        while lo < hi:
            mid = (lo + hi) // 2
            if self.__get_name_cached(mid) < name:
                lo = mid + 1
            else:
                hi = mid

        if lo != count and self.__get_name_cached(lo) == name:
            return self.__get_info_cached(lo)
686457
def find_all(name, prefix = nil, partial = false, details = {}, key = nil, locals = [])
      locals = locals.map(&:to_s).sort!.freeze

      cached(key, [name, prefix, partial], details, locals) do
        _find_all(name, prefix, partial, details, key, locals)
      end
    end
677881
def get_names(cs):
    """"""
    records = []
    for c in cs:
        records.extend(c.get('names', []))
    return records
1179395
def get_all_children(self):
        """"""
        all_children = set()
        for parent in self.children:
            all_children.add(parent.item_id)
            all_children |= parent.get_all_children()
        return all_children
163165
def _rec_get_names(args, names=None):
    """"""
    if names is None:
        names = []
    for arg in args:
        if isinstance(arg, node_classes.Tuple):
            _rec_get_names(arg.elts, names)
        else:
            names.append(arg.name)
    return names
109908
def get_all_names(chebi_ids):
    ''''''
    all_names = [get_names(chebi_id) for chebi_id in chebi_ids]
    return [x for sublist in all_names for x in sublist]
892590
def list_names(cls):
        """"""
        ret = dict([(item['id'], item['name'])
                    for item in cls.list({'items_per_page': 500})])
        return ret
1109096
def collection_names(self, callback):
        """"""
        callback = partial(self._collection_names_result, callback)
        self["system.namespaces"].find(_must_use_master=True, callback=callback)
729076
function extractNames(pattern) {
    var names = pattern.match(nameOrSplatParam) || [], i, n;

    for (i = 0, n = names.length; i < n; i++) {
      names[i] = names[i].slice(1);
    }

    return names;
  }
746093
def _join_names(names):
    """"""

    levels = (str(name) for name in names if name != '')
    return '_'.join(levels)
953291
def all_children(self, scan=1):
        """"""
        if scan:
            self.scan()

        # The return list may contain duplicate Nodes, especially in
        # source trees where there are a lot of repeated #includes
        # of a tangle of .h files.  Profiling shows, however, that
        # eliminating the duplicates with a brute-force approach that
        # preserves the order (that is, something like:
        #
        #       u = []
        #       for n in list:
        #           if n not in u:
        #               u.append(n)"
        #
        # takes more cycles than just letting the underlying methods
        # hand back cached values if a Node's information is requested
        # multiple times.  (Other methods of removing duplicates, like
        # using dictionary keys, lose the order, and the only ordered
        # dictionary patterns I found all ended up using "not in"
        # internally anyway...)
        return list(chain.from_iterable([_f for _f in [self.sources, self.depends, self.implicit] if _f]))