Exemplo n.º 1
0
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
Exemplo n.º 2
0
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
Exemplo n.º 3
0
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
Exemplo n.º 4
0
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