î
[á[\Û  ã               @   s5   d  d l  Z  d  d l Z e  j d ƒ d d „  Z d S)é    Nzhttp://xkcd.com/353/c             C   sz   t  j | ƒ j ƒ  } d d „  | d d … | d d … f Dƒ \ } } t d |  | d d … | | d d … f ƒ d S)zŽCompute geohash() using the Munroe algorithm.

    >>> geohash(37.421542, -122.085589, b'2005-05-26-10458.68')
    37.857713 -122.544543

    c             S   s'   g  |  ] } d  t  j d | ƒ ‘ q S)z%fz0.)ÚfloatÚfromhex)Ú.0Úx© r   ú!/usr/lib/python3.4/antigravity.pyú
<listcomp>   s   	 zgeohash.<locals>.<listcomp>Né   é    z	%d%s %d%sé   )ÚhashlibZmd5Z	hexdigestÚprint)ZlatitudeZ	longitudeZdatedowÚhÚpÚqr   r   r   Úgeohash   s    3r   )Z
webbrowserr   Úopenr   r   r   r   r   Ú<module>   s   