Return a unique identifier for the background data
330392
def _compute_bgid(self, bg=None):
        """"""
        if bg is None:
            bg = self._bgdata
        if isinstance(bg, qpimage.QPImage):
            # Single QPImage
            if "identifier" in bg:
                return bg["identifier"]
            else:
                data = [bg.amp, bg.pha]
                for key in sorted(list(bg.meta.keys())):
                    val = bg.meta[key]
                    data.append("{}={}".format(key, val))
                return hash_obj(data)
        elif (isinstance(bg, list) and
              isinstance(bg[0], qpimage.QPImage)):
            # List of QPImage
            data = []
            for bgii in bg:
                data.append(self._compute_bgid(bgii))
            return hash_obj(data)
        elif (isinstance(bg, SeriesData) and
              (len(bg) == 1 or
               len(bg) == len(self))):
            # DataSet
            return bg.identifier
        else:
            raise ValueError("Unknown background data type: {}".format(bg))
864941
def _id(self):
        """"""
        result = ''
        while self.char is not None and (self.char.isalnum() or self.char == '_'):
            result += self.char
            self.advance()

        token = RESERVED_KEYWORDS.get(result, Token(Nature.ID, result))
        return token
741984
function getUniqueIdentifier( root, libs, com ) {
  var id = root.attribs.id || ( com.name + ID++ );
  com.attr.id = id;
}
840071
def _get_id(self, rdata):
        
        if 'id' in rdata:
            if isinstance(rdata['id'], basestring) or \
                    isinstance(rdata['id'], int) or \
                    isinstance(rdata['id'], long) or \
                    isinstance(rdata['id'], float) or \
                    rdata['id'] is None:
                return rdata['id']
            else:
                # invalid type
                raise InvalidRequestError
        else:
            # It's a notification.
            return None
135981
def id(self):
        """"""
        id = ''
        if (self.server_and_prefix is not None and
                self.server_and_prefix != ''):
            id += self.server_and_prefix + '/'
        if (self.identifier is not None):
            id += self.identifier
        return id
391342
def id_maker(obj):
    
    dtfmt = '%Y%m%d-%H%M%S'
    return '%s-%s' % (obj.__class__.__name__, datetime.now().strftime(dtfmt))
389002
def get_unique_name(self, prefix):
        '''
        '''
        ident = sum(t.startswith(prefix) for t, _ in self.layers.items()) + 1
        return '%s_%d' % (prefix, ident)
382862
def unique_key(connection):
    
    while 1:
        key = str(uuid.uuid4().hex)
        if not connection.exists(key):
            break
    return key
1292848
def identify(self):
        
        self.send(nsq.identify({
            # nsqd 0.2.28+
            'client_id': self.client_id,
            'hostname': self.hostname,

            # nsqd 0.2.19+
            'feature_negotiation': True,
            'heartbeat_interval': self.heartbeat_interval,

            # nsqd 0.2.21+
            'output_buffer_size': self.output_buffer_size,
            'output_buffer_timeout': self.output_buffer_timeout,

            # nsqd 0.2.22+
            'tls_v1': self.tls_v1,

            # nsqd 0.2.23+
            'snappy': self.snappy,
            'deflate': self.deflate,
            'deflate_level': self.deflate_level,

            # nsqd nsqd 0.2.25+
            'sample_rate': self.sample_rate,
            'user_agent': self.user_agent,
        }))

        frame, data = self.read_response()

        if frame == nsq.FRAME_TYPE_ERROR:
            raise data

        if data == nsq.OK:
            return

        try:
            data = json.loads(data.decode('utf-8'))

        except ValueError:
            self.close_stream()
            raise errors.NSQException(
                'failed to parse IDENTIFY response JSON from nsqd: '
                '{!r}'.format(data))

        self.max_ready_count = data.get('max_rdy_count', self.max_ready_count)

        if self.tls_v1 and data.get('tls_v1'):
            self.upgrade_to_tls()

        if self.snappy and data.get('snappy'):
            self.upgrade_to_snappy()

        elif self.deflate and data.get('deflate'):
            self.deflate_level = data.get('deflate_level', self.deflate_level)
            self.upgrade_to_defalte()

        if self.auth_secret and data.get('auth_required'):
            self.auth()

        return data
76453
def record_variant_id(record):
    """"""
    if record.ID:
        return record.ID
    else:
        return record.CHROM + ':' + str(record.POS)
624538
def file_identifier(self):
        # type: () -> bytes
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF File Entry not initialized')

        if self.file_ident is None:
            return b'/'

        return self.file_ident.fi
734086
def getID(code_file):
	""""""
	json_path = ghostfolder+'/'+json_file
	if os.path.exists(json_path):
		pass
	else:
		download_file('https://ghostbin.com/languages.json')

	lang = detect_lang(code_file)

	json_data = json.load(file(json_path))#don't think i need this though
	ID = ''
	for  i in range(len(json_data)):
		temp = len(json_data[i]['languages'])
		for j in range(temp):	
			if json_data[i]['languages'][j]['name'].lower() == lang.lower():
				ID = json_data[i]['languages'][j]['id']
				print('Gotten language ID from \'languages.json\': {0}'.format(ID))
				return ID
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
1209928
def _get_id(self):
        """"""
        return ''.join(map(str,
                           filter(is_not_None,
                                  [self.Prefix, self.Name])))
1323710
def get_id(self):
        
        if self.type == 'NAF':
            return self.node.get('id')
        elif self.type == 'KAF':
            return self.node.get('mid')
216088
def _generate_ack_id(self, sid, namespace, callback):
        """"""
        namespace = namespace or '/'
        if sid not in self.callbacks:
            self.callbacks[sid] = {}
        if namespace not in self.callbacks[sid]:
            self.callbacks[sid][namespace] = {0: itertools.count(1)}
        id = six.next(self.callbacks[sid][namespace][0])
        self.callbacks[sid][namespace][id] = callback
        return id
1145802
def sequential_id(k, identifier):
    """"""
    key = _key(k)
    return int(monotonic_zadd(keys=[key], args=[identifier]))