Format code

This commit is contained in:
Zai 2023-10-28 00:47:36 +05:00
parent af9d8c56df
commit 78ac706ede
3 changed files with 2 additions and 16 deletions

View file

@ -4,10 +4,7 @@ import mmh3
def x64hash128(data, seed=0):
# Compute the hash using MurmurHash3 x64
hash_bytes = mmh3.hash_bytes(data, seed=seed, x64arch=True)
# Convert the 128-bit hash to an unsigned hex string
hash_hex = struct.unpack("<QQ", hash_bytes)
hash_hex_str = "{:016x}{:016x}".format(*hash_hex)