Let's run "python -m antigravity" in python

Let's run "python -m antigravity" in python

$ python -m antigravity

You may import it.

import antigravity

What will happen?

hai

# antigravity.py

import webbrowser
import hashlib

webbrowser.open("http://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

    '''
    # http://xkcd.com/426/
    h = hashlib.md5(datedow).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:]))

Recommended Posts

Let's run "python -m antigravity" in python
Let's use def in python
Run automatic jobs in python
Let's run Excel with Python
Run shell commands in python
Run Python unittests in parallel
Let's find pi in Python
Run shell command / python in R
Let's try Fizz Buzz in Python
Let's see using input in python
Run unittests in Python (for beginners)
Run a simple algorithm in Python
Run AzureKinect in Python on Christmas Eve.
Run the Python interpreter in a script
Let's make a combination calculation in Python
Make cron-like jobs run regularly in Python
Let's run a Bash script in Java
Run Python in C ++ on Visual Studio 2017
Quadtree in Python --2
Python in optimization
CURL in python
Metaprogramming in Python
Python 3.3 in Anaconda
Geocoding in python
SendKeys in Python
Meta-analysis in Python
Unittest in python
Epoch in Python
Discord in Python
Sudoku in Python
DCI in Python
quicksort in python
nCr in python
N-Gram in Python
Programming in python
Plink in Python
Constant in python
Lifegame in Python.
FizzBuzz in Python
Sqlite in python
StepAIC in Python
N-gram in python
LINE-Bot [0] in Python
Csv in python
Disassemble in Python
Reflection in Python
Constant in python
nCr in Python.
format in python
Scons in Python3
Puyo Puyo in python
python in virtualenv
PPAP in Python
Quad-tree in Python
Reflection in Python
Chemistry in Python
Hashable in python
DirectLiNGAM in Python
LiNGAM in Python
Flatten in python
flatten in python