alpha_dict = {
    'a': 0.0575,
    'b': 0.0128,
    'c': 0.0263,
    'd': 0.0285,
    'e': 0.0913,
    'f': 0.0173,
    'g': 0.0133,
    'h': 0.0313,
    'i': 0.0599,
    'j': 0.0006,
    'k': 0.0084,
    'l': 0.0335,
    'm': 0.0235,
    'n': 0.0596,
    'o': 0.0689,
    'p': 0.0192,
    'q': 0.0008,
    'r': 0.0508,
    's': 0.0567,
    't': 0.0706,
    'u': 0.0334,
    'v': 0.0069,
    'w': 0.0119,
    'x': 0.0073,
    'y': 0.0164,
    'z': 0.0007,
    ' ': 0.1928,
}

accu_dict = {
 'a': 0,
 'b': 0.0575,
 'c': 0.0703,
 'd': 0.0966,
 'e': 0.12510000000000002,
 'f': 0.21640000000000004,
 'g': 0.23370000000000005,
 'h': 0.24700000000000005,
 'i': 0.27830000000000005,
 'j': 0.33820000000000006,
 'k': 0.33880000000000005,
 'l': 0.34720000000000006,
 'm': 0.38070000000000004,
 'n': 0.40420000000000006,
 'o': 0.46380000000000005,
 'p': 0.5327000000000001,
 'q': 0.5519000000000001,
 'r': 0.5527000000000001,
 's': 0.6035,
 't': 0.6602,
 'u': 0.7308,
 'v': 0.7642,
 'w': 0.7711,
 'x': 0.783,
 'y': 0.7903,
 'z': 0.8067,
 ' ': 0.8074,
 }


def dec2bin(x):
    x -= int(x)
    bins = []
    while x:
        x *= 2
        bins.append(1 if x>=1. else 0)
        x -= int(x)
    return bins


def calc_xulie_pro(xulie):
    xulie = list(xulie)
    leiji_pos = 1
    for i in range(len(xulie)):
        leiji_pos = alpha_dict.get(xulie[i], 1) * leiji_pos

    return leiji_pos


def bin2dec(b):
    d = 0
    for i, x in enumerate(b):
        d += 2**(-i-1)*x
    return d


if __name__ == "__main__":
    daima = 'asf'
    result = calc_xulie_pro(daima)
    result = dec2bin(result)
    print(result)


dbe5020f84aa2996e023cc8d1e26a1faf0e253e9
<mask token>


def calc_xulie_pro(xulie):
    xulie = list(xulie)
    leiji_pos = 1
    for i in range(len(xulie)):
        leiji_pos = alpha_dict.get(xulie[i], 1) * leiji_pos
    return leiji_pos


def bin2dec(b):
    d = 0
    for i, x in enumerate(b):
        d += 2 ** (-i - 1) * x
    return d


<mask token>

<mask token>


def dec2bin(x):
    x -= int(x)
    bins = []
    while x:
        x *= 2
        bins.append(1 if x >= 1.0 else 0)
        x -= int(x)
    return bins


def calc_xulie_pro(xulie):
    xulie = list(xulie)
    leiji_pos = 1
    for i in range(len(xulie)):
        leiji_pos = alpha_dict.get(xulie[i], 1) * leiji_pos
    return leiji_pos


def bin2dec(b):
    d = 0
    for i, x in enumerate(b):
        d += 2 ** (-i - 1) * x
    return d


<mask token>

<mask token>


def dec2bin(x):
    x -= int(x)
    bins = []
    while x:
        x *= 2
        bins.append(1 if x >= 1.0 else 0)
        x -= int(x)
    return bins


def calc_xulie_pro(xulie):
    xulie = list(xulie)
    leiji_pos = 1
    for i in range(len(xulie)):
        leiji_pos = alpha_dict.get(xulie[i], 1) * leiji_pos
    return leiji_pos


def bin2dec(b):
    d = 0
    for i, x in enumerate(b):
        d += 2 ** (-i - 1) * x
    return d


if __name__ == '__main__':
    daima = 'asf'
    result = calc_xulie_pro(daima)
    result = dec2bin(result)
    print(result)

alpha_dict = {'a': 0.0575, 'b': 0.0128, 'c': 0.0263, 'd': 0.0285, 'e': 
    0.0913, 'f': 0.0173, 'g': 0.0133, 'h': 0.0313, 'i': 0.0599, 'j': 0.0006,
    'k': 0.0084, 'l': 0.0335, 'm': 0.0235, 'n': 0.0596, 'o': 0.0689, 'p': 
    0.0192, 'q': 0.0008, 'r': 0.0508, 's': 0.0567, 't': 0.0706, 'u': 0.0334,
    'v': 0.0069, 'w': 0.0119, 'x': 0.0073, 'y': 0.0164, 'z': 0.0007, ' ': 
    0.1928}
accu_dict = {'a': 0, 'b': 0.0575, 'c': 0.0703, 'd': 0.0966, 'e': 
    0.12510000000000002, 'f': 0.21640000000000004, 'g': 0.23370000000000005,
    'h': 0.24700000000000005, 'i': 0.27830000000000005, 'j': 
    0.33820000000000006, 'k': 0.33880000000000005, 'l': 0.34720000000000006,
    'm': 0.38070000000000004, 'n': 0.40420000000000006, 'o': 
    0.46380000000000005, 'p': 0.5327000000000001, 'q': 0.5519000000000001,
    'r': 0.5527000000000001, 's': 0.6035, 't': 0.6602, 'u': 0.7308, 'v': 
    0.7642, 'w': 0.7711, 'x': 0.783, 'y': 0.7903, 'z': 0.8067, ' ': 0.8074}


def dec2bin(x):
    x -= int(x)
    bins = []
    while x:
        x *= 2
        bins.append(1 if x >= 1.0 else 0)
        x -= int(x)
    return bins


def calc_xulie_pro(xulie):
    xulie = list(xulie)
    leiji_pos = 1
    for i in range(len(xulie)):
        leiji_pos = alpha_dict.get(xulie[i], 1) * leiji_pos
    return leiji_pos


def bin2dec(b):
    d = 0
    for i, x in enumerate(b):
        d += 2 ** (-i - 1) * x
    return d


if __name__ == '__main__':
    daima = 'asf'
    result = calc_xulie_pro(daima)
    result = dec2bin(result)
    print(result)

alpha_dict = {
    'a': 0.0575,
    'b': 0.0128,
    'c': 0.0263,
    'd': 0.0285,
    'e': 0.0913,
    'f': 0.0173,
    'g': 0.0133,
    'h': 0.0313,
    'i': 0.0599,
    'j': 0.0006,
    'k': 0.0084,
    'l': 0.0335,
    'm': 0.0235,
    'n': 0.0596,
    'o': 0.0689,
    'p': 0.0192,
    'q': 0.0008,
    'r': 0.0508,
    's': 0.0567,
    't': 0.0706,
    'u': 0.0334,
    'v': 0.0069,
    'w': 0.0119,
    'x': 0.0073,
    'y': 0.0164,
    'z': 0.0007,
    ' ': 0.1928,
}

accu_dict = {
 'a': 0,
 'b': 0.0575,
 'c': 0.0703,
 'd': 0.0966,
 'e': 0.12510000000000002,
 'f': 0.21640000000000004,
 'g': 0.23370000000000005,
 'h': 0.24700000000000005,
 'i': 0.27830000000000005,
 'j': 0.33820000000000006,
 'k': 0.33880000000000005,
 'l': 0.34720000000000006,
 'm': 0.38070000000000004,
 'n': 0.40420000000000006,
 'o': 0.46380000000000005,
 'p': 0.5327000000000001,
 'q': 0.5519000000000001,
 'r': 0.5527000000000001,
 's': 0.6035,
 't': 0.6602,
 'u': 0.7308,
 'v': 0.7642,
 'w': 0.7711,
 'x': 0.783,
 'y': 0.7903,
 'z': 0.8067,
 ' ': 0.8074,
 }


def dec2bin(x):
    x -= int(x)
    bins = []
    while x:
        x *= 2
        bins.append(1 if x>=1. else 0)
        x -= int(x)
    return bins


def calc_xulie_pro(xulie):
    xulie = list(xulie)
    leiji_pos = 1
    for i in range(len(xulie)):
        leiji_pos = alpha_dict.get(xulie[i], 1) * leiji_pos

    return leiji_pos


def bin2dec(b):
    d = 0
    for i, x in enumerate(b):
        d += 2**(-i-1)*x
    return d


if __name__ == "__main__":
    daima = 'asf'
    result = calc_xulie_pro(daima)
    result = dec2bin(result)
    print(result)

