bpo-9216: Nobody expects the geohashing FIPS inquisition (GH-19520)
Automerge-Triggered-By: @tiran
This commit is contained in:
parent
d42e582063
commit
4c0a31fb08
|
@ -12,6 +12,6 @@ def geohash(latitude, longitude, datedow):
|
|||
|
||||
'''
|
||||
# https://xkcd.com/426/
|
||||
h = hashlib.md5(datedow).hexdigest()
|
||||
h = hashlib.md5(datedow, usedforsecurity=False).hexdigest()
|
||||
p, q = [('%f' % float.fromhex('0.' + x)) for x in (h[:16], h[16:32])]
|
||||
print('%d%s %d%s' % (latitude, p[1:], longitude, q[1:]))
|
||||
|
|
Loading…
Reference in New Issue