Returns uuid of current structure.
963106
private function getCurrentStructureUuid(): ?string
    {
        $request = $this->requestStack->getCurrentRequest();
        if (!$request) {
            return null;
        }

        $structure = $request->get('structure');
        if (!$structure || !$structure instanceof StructureInterface) {
            return null;
        }

        return $structure->getUuid();
    }
849988
def uuid_(val):
    '''
    
    '''
    return six.text_type(
        uuid.uuid5(
            GLOBAL_UUID,
            salt.utils.stringutils.to_str(val)
        )
    )
2899
public UUID getUUID(FastTrackField type)
   {
      String value = getString(type);
      UUID result = null;
      if (value != null && !value.isEmpty() && value.length() >= 36)
      {
         if (value.startsWith("{"))
         {
            value = value.substring(1, value.length() - 1);
         }
         if (value.length() > 16)
         {
            value = value.substring(0, 36);
         }
         result = UUID.fromString(value);
      }
      return result;
   }
1186395
public String getUUID()
    {
    	StringBuilder uuid = new StringBuilder(36);
        int i = (int)System.currentTimeMillis();
        int j = seed.nextInt();
        hexFormat(i,uuid);
        uuid.append(fixedPart);
        hexFormat(j,uuid);        
        return uuid.toString();
    }
1083354
@Id
	@Column(length = 36, nullable = true)
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid2")
	public String getId() {
		return id;
	}
909248
def _check_uuid_fmt(self):
        """"""
        if self.uuid_fmt not in UUIDField.FORMATS:
            raise FieldValueRangeException(
                "Unsupported uuid_fmt ({})".format(self.uuid_fmt))
1299119
def get_module_uuid(plpy, moduleid):
    """"""
    plan = plpy.prepare("SELECT uuid FROM modules WHERE moduleid = $1;",
                        ('text',))
    result = plpy.execute(plan, (moduleid,), 1)
    if result:
        return result[0]['uuid']
363145
def _getNextId(self):
        
        if not self._uuids:
            for _ in range(self.UUID_POOL_GEN_SIZE):
                self._uuids.append(uuid.uuid4().bytes)
        return self._uuids.pop()
100788
def serialise(structure):
    
    return ctypes.cast(
        ctypes.pointer(structure),
        ctypes.POINTER(ctypes.c_char * ctypes.sizeof(structure)),
    ).contents
657917
function uuid() {
  return crypto.randomBytes(4).toString('hex') + '-' +
    crypto.randomBytes(2).toString('hex') + '-' +
    crypto.randomBytes(2).toString('hex').replace(/^./, '1') + '-' +
    crypto.randomBytes(2).toString('hex') + '-' +
    crypto.randomBytes(6).toString('hex')
}
98420
def device_uuid(self):
        """"""
        if self._device:
            return self._device
        return GEN_ID_FORMAT.format(self.src_ip)
534529
public String getUuid() {
    if (StringUtil.isEmpty(this.uuid)) {
      this.uuid = UUID.randomUUID().toString().toLowerCase();
    }
    return this.uuid;
  }
817266
private Chunk chunkUUID() {
    final byte [] bs = MemoryManager.malloc1(_len *16,true);
    int j = 0;
    for( int i = 0; i < _len; ++i ) {
      long lo = 0, hi=0;
      if( _id == null || _id.length == 0 || (j < _id.length && _id[j] == i ) ) {
        if(_missing != null && _missing.get(j)) {
          lo = C16Chunk._LO_NA;
          hi = C16Chunk._HI_NA;
        } else {
          lo = _ms.get(j);
          hi = Double.doubleToRawLongBits(_ds[j]);
        }
        j++;
      }
      UnsafeUtils.set8(bs, 16*i  , lo);
      UnsafeUtils.set8(bs, 16 * i + 8, hi);
    }
    assert j == _sparseLen :"j = " + j + ", _sparselen = " + _sparseLen;
    return new C16Chunk(bs);
  }
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)
389603
def _get_persistent_id(self, o):
        
        if type(o) in self.hash_dedup:
            oid = o.__class__.__name__ + "-" + str(hash(o))
            self._object_cache[oid] = o
            return oid

        if any(isinstance(o,c) for c in self.unsafe_key_baseclasses):
            return None

        try:
            return self._uuid_cache[o]
        except KeyError:
            pass
        except TypeError:
            return None

        #if type(o) in self.uuid_dedup:
        #    return self._get_id(o)
        if o.__class__.__module__.split('.')[0] in self.module_dedup or o.__class__ in self.uuid_dedup:
            oid = o.__class__.__name__.split(".")[-1] + '-' + str(uuid.uuid4())
            self._object_cache[oid] = o
            self._uuid_cache[o] = oid
            return oid

        return None
677356
def uuid(self, version: int = None) -> str:
        
        bits = self.random.getrandbits(128)
        return str(uuid.UUID(int=bits, version=version))
427012
def __uuid(*args):
        """"""

        s = '-'.join(args)

        sha1 = hashlib.sha1(s.encode('utf-8', errors='surrogateescape'))
        uuid_sha1 = sha1.hexdigest()

        return uuid_sha1