You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It might be worth having a way to hash an EPM so they can be quickly indexed / compared for equality
def get_hash(self) -> str:
import hashlib
from operator import attrgetter
h = hashlib.md5()
for record in sorted(self.records, key=attrgetter("prefix")):
h.update(record.prefix.encode("utf8"))
h.update(record.uri_prefix.encode("utf8"))
for s in itt.chain(sorted(record.prefix_synonyms), sorted(record.uri_prefix_synonyms)):
h.update(s.encode("utf8"))
return h.hexdigest()
The text was updated successfully, but these errors were encountered:
It might be worth having a way to hash an EPM so they can be quickly indexed / compared for equality
The text was updated successfully, but these errors were encountered: