def hash(self): m = hashlib.sha1() m.update(util.prepare_for_hash(self.__class__.__name__)) m.update(util.prepare_for_hash(str(self.k))) m.update( util.prepare_for_hash(str(util.standardize(self.domain_shape)))) return m.hexdigest()
def hash(self): m = hashlib.sha1() m.update(util.prepare_for_hash(self.__class__.__name__)) m.update(util.prepare_for_hash(numpy.array(self._hist))) m.update( util.prepare_for_hash(numpy.array(self._reduce_to_domain_shape))) m.update(util.prepare_for_hash(self._dist_str)) return m.hexdigest()
def hash(self): """ Uniqueness of this hash relies on subclasses writing init parameters as instance variables """ m = hashlib.sha1() m.update(util.prepare_for_hash(self.__class__.__name__)) m.update(util.prepare_for_hash(str(util.standardize(sorted(self.init_params.items()))))) return m.hexdigest()
def hash(self): m = hashlib.sha1() m.update(util.prepare_for_hash(self.short_name)) for key, value in util.prepare_for_hash(self.init_params).items(): m.update(key.encode('utf-8')) m.update(repr(value).encode('utf-8')) return m.hexdigest()
def hash(self): m = hashlib.sha1() m.update(util.prepare_for_hash(self.__class__.__name__)) for w in self.workloads: m.update(util.prepare_for_hash(w.hash)) return m.hexdigest()