Return a mods record for a given uuid
188781
def mods(self, uuid):
        """"""
        picker = lambda x: x.get('mods', {})
        return self._get(('mods', uuid), picker)
864942
def generate_id(self):
        """"""
        if self.use_repeatable_ids:
            self.repeatable_id_counter += 1
            return 'autobaked-{}'.format(self.repeatable_id_counter)
        else:
            return str(uuid4())
526050
def get_mod(cls):

    '''
    '''
    if isinstance(cls, (type, types.FunctionType)):
        ret = cls.__module__
    else:
        ret = cls.__class__.__module__
    return ret
122832
def make_uuid(cls, app_id=None):
        
        try:
            if app_id and isinstance(uuid.UUID(str(app_id), version=4), uuid.UUID):
                return str(app_id)
        except (ValueError, AssertionError):
            pass
        return str(uuid.UUID(int=random.getrandbits(128)))
158867
def get(self, uuid, default=None):
        # type: (UUID, Optional[Path]) -> Optional[Path]
        
        path = self.abs_path(uuid)
        if not path.exists():
            return default
        return path
488448
def _gen_mods(self, action, records, existing_rrsets):
        '''
        
        '''
        return [r.mod(action, existing_rrsets) for r in records]
513750
def infops(self, uuid):
        
        args = {
            'uuid': uuid,
        }
        self._domain_action_chk.check(args)

        return self._client.json('kvm.infops', args)
1126952
def get_instance_for_uuid(self, uuid, project_id):
        
        instance_name = self._inst_info_cache.get((uuid, project_id))
        if instance_name:
            return instance_name
        instances = self._get_instances_for_project(project_id)
        for inst in instances:
            if inst.id.replace('-', '') == uuid:
                LOG.debug('get_instance_for_uuid: name=%s', inst.name)
                instance_name = inst.name
                self._inst_info_cache[(uuid, project_id)] = instance_name
                return instance_name
        return instance_name
240507
def get_service(self, uuid):
        
        if uuid in self.services:
            return self.services[uuid]

        if pp_hex(uuid) in self.services:
            return self.services[pp_hex(uuid)]

        return None
504477
def uuid4():
    """"""
    # Otherwise, get randomness from urandom or the 'random' module.
    try:
        import os
        return UUID(bytes=os.urandom(16), version=4)
    except Exception:
        import random
        bytes = [chr(random.randrange(256)) for i in range(16)]
        return UUID(bytes=bytes, version=4)
212039
function uuids (count, callback) {
    if (typeof count === 'function') {
      callback = count
      count = 1
    }
    return relax({ method: 'GET', path: '_uuids', qs: { count: count } }, callback)
  }
1181587
def get_permitted_objects_uuids(cls, user):
        
        uuids = filter_queryset_for_user(cls.objects.all(), user).values_list('uuid', flat=True)
        key = core_utils.camel_case_to_underscore(cls.__name__) + '_uuid'
        return {key: uuids}
1237074
def uuid5(namespace, name):
    """"""
    from hashlib import sha1
    hash = sha1(namespace.bytes + name).digest()
    return UUID(bytes=hash[:16], version=5)
1291765
def uuid3(namespace, name):
    """"""
    import md5
    hash = md5.md5(namespace.bytes + name).digest()
    return UUID(bytes=hash[:16], version=3)
1240760
def field_uuid(self, attr, options):
        """"""
        options['validators'].append(validators.UUIDValidator(attr.entity))
        return wtf_fields.StringField, options
956331
def log_uuid(self, uuid):
        
        #We only need to try and describe an object once; if it is already in
        #our database, then just move along.
        if uuid not in self.uuids and uuid in uuids:
            self.uuids[uuid] = uuids[uuid].describe()
192097
def handle_to_uuid(handle, services):
    """"""

    for service in services.values():
        for char_uuid, char_def in service['characteristics'].items():
            if char_def['handle'] == handle:
                return char_uuid

    raise ValueError("Handle not found in GATT table")