https://github.com/python/cpython/blob/main/Lib/antigravity.py Skip to content Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Issues - + Integrations - + GitHub Sponsors - + Customer stories- * Team * Enterprise * Explore + Explore GitHub - Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Education - [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} python / cpython * Sponsor Sponsor python/cpython * Notifications * Star 39.6k * Fork 19.8k * Code * Pull requests 1.4k * Actions * Security * Insights More * Code * Pull requests * Actions * Security * Insights Permalink main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags cpython/Lib/antigravity.py / Jump to Code definitions [ ] geohash Function Code navigation index up-to-date Go to file * Go to file T * Go to line L * Go to definition R * * Copy path * Copy permalink @hroncok hroncok bpo-9216: Nobody expects the geohashing FIPS inquisition ( GH-19520) ... Latest commit 4c0a31f Apr 14, 2020 History Automerge-Triggered-By: @tiran 5 contributors Users who have contributed to this file 17 lines (12 sloc) 500 Bytes Raw Blame * Open with Desktop * View raw * View blame import webbrowser import hashlib webbrowser.open("https://xkcd.com/353/") def geohash(latitude, longitude, datedow): '''Compute geohash() using the Munroe algorithm. >>> geohash(37.421542, -122.085589, b'2005-05-26-10458.68') 37.857713 -122.544543 ''' # https://xkcd.com/426/ 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:])) * Copy lines * Copy permalink * View git blame [ ] Go * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.