예제 #1
0
def oct(start=0,end=26):
    """
    numsys.oct([start, [end]]) -> dict

    Returns a dictionary of alphabets (key is lowercase alphabet) and their ascii
    codes in octal as the value.
    """
    octa = {}
    for a in core.alist(start,end):
        octa[a] = octal(a)
    return octa
예제 #2
0
def hex(start=0,end=26):
    """
    numsys.hex([start, [end]]) -> dict

    Returns a dictionary of alphabets (key is lowercase alphabet) and their ascii
    codes in hexadecimal as the value.
    """
    hexa = {}
    for a in core.alist(start,end):
        hexa[a] = hexadecimal(a)
    return hexa
예제 #3
0
def bi(start=0,end=26):
    """
    numsys.bi([start, [end]]) -> dict

    Returns a dictionary of alphabets (key is lowercase alphabet) and their ascii
    codes in binary as the value.
    """
    bi = {}
    for a in core.alist(start,end):
        bi[a] = binary(a)
    return bi
예제 #4
0
def rot(rotv=13, start=0, end=26):
    """
    crypt.rot([rotv, [start, [end]]]) -> dict

    Returns a dictionary of alphabets (key is lowercase 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.alist(start, end):
        if (rotv + start < 26):
          d[a] = core.alph(start+rotv,start+rotv+1)
        else :
          d[a] = core.alph(start+rotv-26,start+rotv-26+1)
        start += 1
    return d