Skip to content

Instantly share code, notes, and snippets.

@mdnestor
Last active February 24, 2023 01:02
Embed
What would you like to do?
def seed(x) -> int:
if isinstance(x, int):
return x
s = 0
for c in x:
s = ((31*s + ord(c)) ^ 0x80000000) & 0xFFFFFFFF - 0x80000000
return s
# print(seed("creashaks organzine"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment