Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb1614a7

Browse files
committed
Another hidden treasure.
1 parent67d7fb5 commitb1614a7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

‎Lib/antigravity.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11

22
importwebbrowser
3+
importhashlib
34

45
webbrowser.open("http://xkcd.com/353/")
6+
7+
defgeohash(latitude,longitude,datedow):
8+
'''Compute geohash() using the Munroe algorithm.
9+
10+
>>> geohash(37.421542, -122.085589, b'2005-05-26-10458.68')
11+
37.857713 -122.544543
12+
13+
'''
14+
# http://xkcd.com/426/
15+
h=hashlib.md5(datedow).hexdigest()
16+
p,q= [('%f'%float.fromhex('0.'+x))forxin (h[:16],h[16:32])]
17+
print('%d%s %d%s'% (latitude,p[1:],longitude,q[1:]))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp