コード例 #1
0
ファイル: numsys.py プロジェクト: TrigonaMinima/Alphas
def uoct(start=0,end=26):
    """
    numsys.uoct([start, [end]]) -> dict

    Returns a dictionary of alphabets (key is uppercase alphabet) and their ascii
    codes in octal as the value.
    """
    octa = {}
    for a in core.ualist(start,end):
        octa[a] = octal(a)
    return octa
コード例 #2
0
ファイル: numsys.py プロジェクト: TrigonaMinima/Alphas
def uhex(start=0,end=26):
    """
    numsys.uhex([start, [end]]) -> dict

    Returns a dictionary of alphabets (key is uppercase alphabet) and their ascii
    codes in hexadecimal as the value.
    """
    hexa = {}
    for a in core.ualist(start,end):
        hexa[a] = hexadecimal(a)
    return hexa
コード例 #3
0
ファイル: numsys.py プロジェクト: TrigonaMinima/Alphas
def ubi(start=0,end=26):
    """
    numsys.ubi([start, [end]]) -> dict

    Returns a dictionary of alphabets (key is uppercase alphabet) and their ascii
    codes in binary as the value.
    """
    bi = {}
    for a in core.ualist(start,end):
        bi[a] = binary(a)
    return bi
コード例 #4
0
ファイル: crypt.py プロジェクト: TrigonaMinima/Alphas
def urot(rotv=13, start=0, end=26):
    """
    crypt.urot([rotv, [start, [end]]]) -> dict

    Returns a dictionary of alphabets (key is uppercase alphabet and value is
    rotated alphabet) from start till end. Rot value is by default 13, but can
    be anything. By default the start is 0 and end is 26.
    """
    d = {}
    for a in core.ualist(start, end):
        if (rotv + start < 26):
          d[a] = core.ualph(start+rotv,start+rotv+1)
        else :
          d[a] = core.ualph(start+rotv-26,start+rotv-26+1)
        start += 1
    return d