Skip to content

Commit

Permalink
rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jnu committed Aug 31, 2024
1 parent 50cfae4 commit 04479e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crocodsl/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import mmh3

# Maximum value it's possible to represent as a 64-bit double.
MAX_DOUBLE = float(0xFFFFFFFFFFFFFFFF)
# Maximum value it's possible to represent as a 64-bit unsigned int, as a float.
MAX_UINT64_F = float(0xFFFFFFFFFFFFFFFF)


def filter_kwargs(f, kwargs):
Expand Down Expand Up @@ -132,4 +132,4 @@ def hash_id(s: str) -> float:
# uniformly distributed and should divide faster. Technique taken from
# this blog post:
# https://www.rolando.cl/blog/2018/12/how_uniform_is_md5.html
return mmh3.hash64(s, signed=False)[0] / MAX_DOUBLE
return mmh3.hash64(s, signed=False)[0] / MAX_UINT64_F

0 comments on commit 04479e4

Please sign in to comment.