littlefish/util.py
def to_base62(n):
    """
    Converts a number to base 62
    :param n: The number to convert
    :return: Base 62 representation of number (string)
    """
    remainder = n % 62
    result = BASE62_MAP[remainder]
    num = n // 62

    while num > 0:
        remainder = num % 62
        result = '%s%s' % (BASE62_MAP[remainder], result)
        num = num // 62

    return result
def to_base62(n):
    """
    Converts a number to base 62
    :param n: The number to convert
    :return: Base 62 representation of number (string)
    """
    remainder = n % 62
    result = BASE62_MAP[remainder]
    num = n // 62

    while num > 0:
        remainder = num % 62
        result = '%s%s' % (BASE62_MAP[remainder], result)
        num = num // 62

    return result
def to_base62 ( n ) : remainder = n % 62 result = BASE62_MAP [ remainder ] num = n // 62 while num > 0 : remainder = num % 62 result = '%s%s' % ( BASE62_MAP [ remainder ] , result ) num = num // 62 return result
Converts a number to base 62
    :param n: The number to convert
    :return: Base 62 representation of number (string)
Converts a number to base 62 : param n : The number to convert : return : Base 62 representation of number ( string )