Use the pci.ids file to translate the ids to names.
512495
private function _fetchPciNames()
    {
        for ($v = false, $file = @fopen($this->_pci_file, 'r'); $file != false && $contents = fgets($file);) {
            if (preg_match('/^(\S{4})\s+([^$]+)$/', $contents, $vend_match) == 1) {
                $v = $vend_match;
            } elseif (preg_match('/^\s+(\S{4})\s+([^$]+)$/', $contents, $dev_match) == 1) {
                if ($v && isset($this->_pci_entries[strtolower($v[1])][strtolower($dev_match[1])])) {
                    $this->_pci_devices[$v[1]][$dev_match[1]] = array('vendor' => rtrim($v[2]), 'device' => rtrim($dev_match[2]));
                }
            }
        }
        $file && @fclose($file);
    }
601617
def modify_filename_id(filename):
    """"""
    split_filename = os.path.splitext(filename)
    id_num_re = re.compile('(\(\d\))')
    id_num = re.findall(id_num_re, split_filename[-2])
    if id_num:
        new_id_num = int(id_num[-1].lstrip('(').rstrip(')')) + 1

        # Reconstruct filename with incremented id and its extension
        filename = ''.join((re.sub(id_num_re, '({0})'.format(new_id_num),
                                   split_filename[-2]), split_filename[-1]))
    else:
        split_filename = os.path.splitext(filename)

        # Reconstruct filename with new id and its extension
        filename = ''.join(('{0} (2)'.format(split_filename[-2]),
                            split_filename[-1]))
    return filename
296419
def _generate_identifier_name(self, columns, prefix="", max_size=30):
        
        hash = ""
        for column in columns:
            hash += "%x" % binascii.crc32(encode(str(column)))

        return (prefix + "_" + hash)[:max_size]
1033713
public function idsToNames()
    {
        $names = $this->ifDescriptions();
        $ids   = $this->ifVlanIds();

        $ids   = array_intersect_key( $ids, $names );
        $names = array_intersect_key( $names, $ids );

        return( array_combine( $ids, $names ) );
    }
442081
def set_identifiers(self, data):
        
        for id_info in self._details.identifiers:
            var_name = id_info['var_name']
            self._data[var_name] = data.get(var_name)

        # FIXME: This needs to likely kick off invalidating/rebuilding
        #        relations.
        #        For now, just remove them all. This is potentially inefficient
        #        but is nicely lazy if we don't need them & prevents stale data
        #        for the moment.
        self._relations = {}
537762
def _initialize_tensor_name_to_ids(self):
    
    tensor_name_to_ids = {}
    for i, operation in enumerate(self._operations):
      for j, tensor in enumerate(operation.outputs):
        tensor_name_to_ids[tensor.name] = (i, j)
    return tensor_name_to_ids
787684
def name(self, id):
        
        data = self.bytes(id, 'N')
        if not data:
            print("%x has no name" % id)
            return
        if data[:1] == b'\x00':
            nameid, = struct.unpack_from(">" + self.fmt, data, 1)
            nameblob = self.blob(self.nodebase, 'S', nameid * 256, nameid * 256 + 32)
            return nameblob.rstrip(b"\x00").decode('utf-8')
        return data.rstrip(b"\x00").decode('utf-8')
127403
def _init_itemid2name(self):
        """"""
        if not hasattr(self.args, 'id2sym'):
            return None
        fin_id2sym = self.args.id2sym
        if fin_id2sym is not None and os.path.exists(fin_id2sym):
            id2sym = {}
            cmpl = re.compile(r'^\s*(\S+)[\s,;]+(\S+)')
            with open(fin_id2sym) as ifstrm:
                for line in ifstrm:
                    mtch = cmpl.search(line)
                    if mtch:
                        id2sym[mtch.group(1)] = mtch.group(2)
            return id2sym
579917
protected function normalizeNames()
	{
        if (! $this->validFile($this->imagePath())) {
			$this->image = $this->default();
		}

		if ($this->hasOptions()) {
			$this->createThumbnail();
		}
	}
954555
function changeId(content, filePath, name, idSep) {
    if (idSep === void 0) { idSep = '_'; }
    var idReg = /svgicon(\w+)/g;
    content = content.replace(idReg, function (match, elId) {
        return "svgicon" + idSep + filePath.replace(/[\\\/]/g, idSep) + name + idSep + elId;
    });
    return content;
}
864884
def makeref2namesdct(name2refdct):
    """"""
    ref2namesdct = {}
    for key, values in name2refdct.items():
        for value in values:
            ref2namesdct.setdefault(value, set()).add(key)
    return ref2namesdct
193559
private static String changeIDs(String text, Map<String, String> mapIds) {
    String result = text;
    for (String key : mapIds.keySet()) {
      result = result.replace(key, mapIds.get(key));
    }
    return result;
  }
23229
protected function pci()
    {
        if ((!$results = Parser::lspci(false)) && (!$results = $this->pciconf())) {
            foreach ($this->readdmesg() as $line) {
                if (preg_match($this->_PCIRegExp1, $line, $ar_buf)) {
                    $dev = new HWDevice();
                    $dev->setName($ar_buf[1].": ".$ar_buf[2]);
                    $results[] = $dev;
                } elseif (preg_match($this->_PCIRegExp2, $line, $ar_buf)) {
                    $dev = new HWDevice();
                    $dev->setName($ar_buf[1].": ".$ar_buf[2]);
                    $results[] = $dev;
                }
            }
        }
        foreach ($results as $dev) {
            $this->sys->setPciDevices($dev);
        }
    }
672304
def _names(lexer):
    """"""
    first = _expect_token(lexer, {NameToken}).value
    rest = _zom_name(lexer)
    rnames = (first, ) + rest
    return rnames[::-1]
899734
def update_identity(self):
        """"""

        fr = self.record

        d = fr.unpacked_contents

        d['identity'] = self._dataset.identity.ident_dict
        d['names'] = self._dataset.identity.names_dict

        fr.update_contents(msgpack.packb(d), 'application/msgpack')
378288
def _update_names(self):
        """"""

        d = dict(
            table=self.table_name,
            time=self.time,
            space=self.space,
            grain=self.grain,
            variant=self.variant,
            segment=self.segment
        )

        assert self.dataset

        name = PartialPartitionName(**d).promote(self.dataset.identity.name)

        self.name = str(name.name)
        self.vname = str(name.vname)
        self.cache_key = name.cache_key
        self.fqname = str(self.identity.fqname)
719605
def normalize_ids(ids)
      ids.collect(&:to_s).map do |what|
        if what =~ /^[0-9]+$/
          next what.to_i
        else
          next expand_named_query(what)
        end
      end.flatten
    end