Kaydet (Commit) 83df50ea authored tarafından 觉's avatar Kaydeden (comit) Benjamin Peterson

Change the xkcd link in comment over https. (GH-5452)

üst 19003841
...@@ -11,7 +11,7 @@ def geohash(latitude, longitude, datedow): ...@@ -11,7 +11,7 @@ def geohash(latitude, longitude, datedow):
37.857713 -122.544543 37.857713 -122.544543
''' '''
# http://xkcd.com/426/ # https://xkcd.com/426/
h = hashlib.md5(datedow).hexdigest() h = hashlib.md5(datedow).hexdigest()
p, q = [('%f' % float.fromhex('0.' + x)) for x in (h[:16], h[16:32])] 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:])) print('%d%s %d%s' % (latitude, p[1:], longitude, q[1:]))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment