return the unique id for a trainer, determined by the md5 sum
544549
def get_trainer(name):
    '''
    '''
    name = name.lower()
    return int(hashlib.md5(name.encode('utf-8')).hexdigest(), 16) % 10**8
534956
public function getUniqueRequestId()
    {
        $cookies_str = '';
        foreach ($_COOKIE as $key => $val) {
            if (strpos($key, $this->getKey()) !== false) {
                $cookies_str .= $key . json_encode($val);
            }
        }

        return md5($cookies_str . $this->getKey() . json_encode($this->getInput()));
    }
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
1039980
def fuid(path = nil)
      if @uid.nil? && path.nil?
        1
      else
        @uid || Digest::MD5.hexdigest(path).to_i(16) % 10000
      end
    end
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())
993444
def get_by_id(self, id):
        """"""
        return self.user_cls(id=id, password='secret' + str(id))
376075
def unique_id
      # check all_data instead of data, as we have to not reuse deleted key
      ids = Set.new(all_data.map { |e| e[:key] })
      id = 1
      loop do
        return id.to_s unless ids.include?(id.to_s)

        id += 1
      end
    end
941364
protected function calculate_restoreid() {
        // Current epoch time + tempdir + courseid + interactive + mode + userid + target + operation + random bits
        $this->restoreid = md5(time() . '-' . $this->tempdir . '-' . $this->courseid . '-'. $this->interactive . '-' .
                               $this->mode . '-' . $this->userid . '-'. $this->target . '-' . $this->operation . '-' .
                               random_string(20));
    }
968244
protected function generateUniqueId()
    {
        ksort($this->options);

        return md5($this->id . serialize($this->options));
    }
382862
def unique_key(connection):
    
    while 1:
        key = str(uuid.uuid4().hex)
        if not connection.exists(key):
            break
    return key
450685
def make_id(value):
    
    if isinstance(value, six.string_types):
        value = value.encode("utf8", "ignore")
    from hashlib import md5

    val = uuid.UUID(bytes=md5(value).digest(), version=4)

    return base64.urlsafe_b64encode(val.get_bytes())[:-2]
725456
def id(self):
        
        h = hashlib.new('sha512')
        for value in (self.machine.name, self.machine.os, self.user, self.application.name,
                      self.application.path, self.event.report_type, self.event.type,
                      self.event.time.isoformat()):
            h.update(str(value).encode('utf-8'))
        for parameter in sorted(self.parameters, key=lambda k: getattr(k, 'id')):
            h.update(parameter.value.encode('utf-8'))
        return h.hexdigest()
531131
def generate_transaction_id(stmt_line):
    
    return str(abs(hash((stmt_line.date,
                         stmt_line.memo,
                         stmt_line.amount))))
214801
def local_id(self):
        
        return hashlib.sha256(("%s%s" % (
            self.id,
            self.username)).encode()).hexdigest()
1133229
def renew(id, increment = 0)
      json = client.put("/v1/sys/renew/#{id}", JSON.fast_generate(
        increment: increment,
      ))
      return Secret.decode(json)
    end
1243587
def _random_key(self):
        
        hashstr = '%s%s' % (random.random(), self.time_module.time())
        return hashlib.md5(hashstr).hexdigest()
1347467
protected function get_unique_db_instance_id() {
        global $CFG;

        $strkey = $CFG->dbname . ':' . $CFG->prefix;
        $intkey = crc32($strkey);
        // Normalize between 64 bit unsigned int and 32 bit signed ints. Php could return either from crc32.
        if (PHP_INT_SIZE == 8) {
            if ($intkey > 0x7FFFFFFF) {
                $intkey -= 0x100000000;
            }
        }

        return $intkey;
    }