コード例 #1
0
def to_base_10(test, short_bin):
    '''Convert from  from base 4 to base 10.'''
    base4v = BaseConverter(input_base=4, output_base=10, string=True)
    converted_partition = int(base4v(short_bin))
    print("The coordinates", test, "correspond to the Partition ID",
          converted_partition)
    return converted_partition
コード例 #2
0
def to_base_4(long_bin):
    base4v = BaseConverter(input_base=2, output_base=4, string=True)
    return base4v(long_bin)
コード例 #3
0
# column_list1 = ['71e49250a1e36f1081e0302774ca68ff']
table_list1 = []
column_list1 = []
capital_list1 = []


def do_delay():
    time.sleep(randint(1, 5) / 200)
    # return


#########################################################################
# END CONFIG
#########################################################################

b = BaseConverter(input_base=6, output_base=36)

try:
    port
    print('Your port is {}'.format(port))
except NameError:
    print('Please enter your port')
    port = input()


def get_domain():
    return 'http://seclab1.win.tue.nl:' + str(port) + '/level6/index.php'


def value_in_between(web_page, identifier, deidentifier):
    start = web_page.find(identifier)
コード例 #4
0
import os, csv, pprint, jieba, sqlite3
from baseconvert import BaseConverter
from googletrans import Translator

xx = jieba.cut('早上好')
print(xx)

translator = Translator()
base = BaseConverter(input_base=10, output_base=14)
base_dict = {}
rad_freq = {}
primes = {
    1: 2,
    2: 3,
    3: 5,
    4: 7,
    5: 11,
    6: 13,
    7: 17,
    8: 19,
    9: 23,
    10: 29,
    11: 31,
    12: 37,
    13: 41,
    14: 43,
    15: 47,
    16: 53,
    17: 59,
    18: 61,
    19: 67,
コード例 #5
0
def to_base_4(long_bin):
    '''Convert from  binary value to a base 4 integer.'''
    base4v = BaseConverter(input_base=2, output_base=4, string=True)
    return base4v(long_bin)