Get all names within the given range.
    Return the list of names on success
    Return {'error': ...} on failure
322897
def get_all_names(offset=None, count=None, include_expired=False, proxy=None, hostport=None):
    
    assert proxy or hostport, 'Need proxy or hostport'
    if proxy is None:
        proxy = connect_hostport(hostport)

    offset = 0 if offset is None else offset

    if count is None:
        # get all names after this offset
        count = get_num_names(proxy=proxy, hostport=hostport)
        if json_is_error(count):
            # error
            return count

        count -= offset

    page_size = 100
    all_names = []
    while len(all_names) < count:
        request_size = page_size
        if count - len(all_names) < request_size:
            request_size = count - len(all_names)

        page = get_all_names_page(offset + len(all_names), request_size, include_expired=include_expired, proxy=proxy, hostport=hostport)
        if json_is_error(page):
            # error
            return page

        if len(page) > request_size:
            # error
            error_str = 'server replied too much data'
            return {'error': error_str, 'http_status': 503}
        elif len(page) == 0:
            # end-of-table
            break

        all_names += page

    return all_names
473402
def getall_by(self, prop, val):
        ''''''
        try:
            val = self.serialize(val)
            return self._meta[prop][val][:]  # return a copy of the list
        except KeyError:
            return []
84984
def names(self):
        
        if not self.children:
            return set([self.name])
        ret = set()
        for child in self.children:
            for name in child.names:
                ret.add(name)
        return ret
506242
def get_names_with_value_hash( self, value_hash ):
        
        cur = self.db.cursor()
        names = namedb_get_names_with_value_hash( cur, value_hash, self.lastblock )
        return names
300575
def get_all(self):
        
        result = cache.lrange(self.key, 0, -1)
        return (json.loads(item.decode('utf-8')) for item in result if
                item) if self.serialize else result
1034051
def get_sea_names():
    '''
    
    '''
    global _SEA_NAMES
    if _SEA_NAMES is None:
        buf = {}
        with open(resource_filename('compliance_checker', 'data/seanames.csv'), 'r') as f:
            reader = csv.reader(f)
            for code, sea_name in reader:
                buf[sea_name] = code
        _SEA_NAMES = buf
    return _SEA_NAMES
912960
def ranges(name=nil, tags=Selectable::Tags.new)
      return @ranges if name.nil?
      @ranges.select do |range| 
        ret = name.to_s == range.name.to_s &&
        (tags.nil? || range.tags >= tags)
        ret
      end
    end
827882
def _get_names(names, types):
    
    if types == "":
        try:
            names, types = names.split(":")
        except:
            pass
    return names.split(","), types
254270
def get_via_name_list(src, name_parts):
    
    if len(name_parts) > 1:
        for part in name_parts[:-1]:
            if part not in src:
                return None
            src = src[part]
    return src.get(name_parts[-1])
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]
597985
def _collection_names_result(self, callback, results, error=None):
        """"""
        names = [r['name'] for r in results if r['name'].count('.') == 1]
        assert error == None, repr(error)
        strip = len(self._pool._dbname) + 1
        callback([name[strip:] for name in names])
585176
def _load_names(self) -> List[str]:
        
        names = []
        for path in self._get_files():
            for name in self._get_names(path):
                names.append(self._normalize_name(name))
        return names
1297417
def get_range(self, start=None, stop=None):
		
		return self.from_iterable(self.ranges(start, stop))
368676
def _get_surnames(self):
        
        names = self._read_name_file('surnames.json')
        names = self._compute_weights(names)

        return names
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;
  }
1280266
def get_names():
    """"""
    res = list(cmaps.keys())
    res = sorted(res, key=lambda s: s.lower())
    return res
939610
def rpc_get_all_names_cumulative( self, offset, count, **con_info ):
        
        if not check_offset(offset):
            return {'error': 'invalid offset', 'http_status': 400}

        if not check_count(count, 100):
            return {'error': 'invalid count', 'http_status': 400}

        db = get_db_state(self.working_dir)
        all_names = db.get_all_names( offset=offset, count=count, include_expired=True )
        db.close()

        return self.success_response( {'names': all_names} )