a
    ßËz_Þ  ã                   @   s4   d Z dZeeƒaeeƒadd„ Zdd„ Zdd„ ZdS )	zshort numbersZ$0123456789abcdefghijklmnopqrstuvwxyzc                 C   s>   | t  }||  dkrt| }ntt| | t  ƒƒt|  }|S )zcode a shonu from decimalé    )ÚlengthÚpointsÚmakeÚint)ZdecimalÚtÚout© r   ú"/home/ernad/ernad/python/shonus.pyr   	   s
    
r   c                 C   sH   t | ƒ}| ¡  d}d}|D ]&}t |¡}||t|  7 }|d7 }q|S )zcode shonu to decimalr   é   )ÚlistÚreverseÚchainÚfindr   )ÚshonuÚcharsZpowerr   ÚcharZdigitr   r   r	   Úekam   s    

r   c                 C   s   t | ƒ} t |ƒ}t| | ƒS )z%decimal difference between two shonus)r   r   )ÚbigZsmallr   r   r	   Údiff"   s    r   N)	Ú__doc__r   Úlenr   r   r   r   r   r   r   r   r   r	   Ú<module>   s   