Get the number of names that exist.
967273
def get_num_names( self, include_expired=False ):
        
        cur = self.db.cursor()
        return namedb_get_num_names( cur, self.lastblock, include_expired=include_expired )
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)
510820
def lookup_name(self, name):
        """"""

        try:
            info = self._get_by_name(self._source, name)
        except NotImplementedError:
            pass
        else:
            if info:
                return info
            return

        info = self.lookup_name_fast(name)
        if info:
            return info
        return self.lookup_name_slow(name)
561676
def countIndex(self):
		""""""
		self.data = self.index.count(self.searchString, self.category, self.math, self.game, self.searchFiles, self.extension)
663464
def _name_lookup(names):
    """
    mapper = dict(zip(range(len(names)), names))

    def lookup(val):
        return mapper.get(val, 'Unknown')
    return lookup
63490
def unique(enumeration):
    """"""
    duplicates = []
    for name, member in enumeration.__members__.items():
        if name != member.name:
            duplicates.append((name, member.name))
    if duplicates:
        duplicate_names = ', '.join(
                ["%s -> %s" % (alias, name) for (alias, name) in duplicates]
                )
        raise ValueError('duplicate names found in %r: %s' %
                (enumeration, duplicate_names)
                )
    return enumeration
590455
def get_num_commenters(self, item):
        """"""

        commenters = [comment['user']['login'] for comment in item['comments_data']]
        return len(set(commenters))
290901
def get_ids(cs):
    """"""
    records = []
    for c in cs:
        records.append({k: c[k] for k in c if k in {'names', 'labels'}})
    return records
572984
def size_from_name(size, sizes):

    """"""

    by_name = [s for s in sizes if s.name == size]
    if len(by_name) > 1:
        raise Exception('more than one image named %s exists' % size)
    return by_name[0]
848143
def get_num_names_in_namespace( self, namespace_id ):
        
        cur = self.db.cursor()
        return namedb_get_num_names_in_namespace( cur, namespace_id, self.lastblock )
17403
def numberofnetworks(self):
        """"""
        sels1 = selectiontools.Selections()
        sels2 = selectiontools.Selections()
        complete = selectiontools.Selection('complete',
                                            self.nodes, self.elements)
        for node in self.endnodes:
            sel = complete.copy(node.name).select_upstream(node)
            sels1 += sel
            sels2 += sel.copy(node.name)
        for sel1 in sels1:
            for sel2 in sels2:
                if sel1.name != sel2.name:
                    sel1 -= sel2
        for name in list(sels1.names):
            if not sels1[name].elements:
                del sels1[name]
        return sels1
518789
function getSameColumnCount(currentColumn, prevColumn) {
    var index = 0;
    var len = Math.min(currentColumn.length, prevColumn.length);

    for (; index < len; index += 1) {
        if (currentColumn[index].name !== prevColumn[index].name) {
            break;
        }
    }

    return index;
}
130214
def names(expr: AST) -> Set[str]:
    """"""
    nodes = [node for node in ast.walk(expr) if isinstance(node, ast.Name)]
    loaded = {node.id for node in nodes if isinstance(node.ctx, ast.Load)}
    stored = {node.id for node in nodes if isinstance(node.ctx, ast.Store)}
    return loaded - stored
443626
def names(self, with_namespace=False):
        '''
        '''
        N = self.count()
        names = self.name.split(settings.splittingnames)[:N]
        n = 0
        while len(names) < N:
            n += 1
            names.append('unnamed%s' % n)
        if with_namespace and self.namespace:
            n = self.namespace
            s = settings.field_separator
            return [n + s + f for f in names]
        else:
            return names
1169575
def list_names():
    
    names = get_all_names()
    # This is 375 right now. Probably won't ever change, but I'm not sure.
    nameslen = len(names)
    print('\nListing {} names:\n'.format(nameslen))
    # Using 3 columns of names, still alphabetically sorted from the top down.
    # Longest name so far: lightgoldenrodyellow (20 chars)
    namewidth = 20
    # namewidth * columns == 60, colorwidth * columns == 18, final == 78.
    swatch = ' ' * 9

    third = nameslen // 3
    lastthird = third * 2
    cols = (
        names[0: third],
        names[third: lastthird],
        names[lastthird:],
    )
    # Exactly enough spaces to fill in a blank item (+2 for ': ').
    # This may not ever be used, unless another 'known name' is added.
    blankitem = ' ' * (namewidth + len(swatch) + 2)

    for i in range(third):
        nameset = []
        for colset in cols:
            try:
                nameset.append(colset[i])
            except IndexError:
                nameset.append(None)
                continue
        line = C('').join(
            C(': ').join(
                C(name.rjust(namewidth)),
                C(swatch, back=name),
            ) if name else blankitem
            for name in nameset
        )
        print(line)

    return 0
1270558
def count(self):
        """"""
        if self.request["Select"] == "COUNT":
            while not self.exhausted:
                next(self, None)
        return self._count
580704
def names(cls):
        """"""
        if not cls._files:
            for f in os.listdir(cls._image_path):
                if(not f.startswith('.') and
                   os.path.isfile(os.path.join(cls._image_path, f))):
                    cls._files.append(os.path.splitext(f)[0])

        return cls._files