<commit_before>################################################################################
# Conversion functions 


# Input value as sting and base as integer
def other_to_dec(value, base):
    # Converts any supported base to base-10
    chars = [x for x in value]
    chars.reverse()
##    print 'reversed chars =', chars
    dec = 0
    for i, char in enumerate(chars):
        if char.isalpha():
            char = alnums[char]
##        print dec
        dec = dec + (int(char) * base**i)
    return dec


# Input values as integers
def dec_to_other(number, base):
    # Converts base-10 to any other supported base
    fin = []
    div = number / base
    leftover1 = number % base
##    print 'number =', number, 'leftover =', leftover1
    fin.append(leftover1)
    leftover2 = div % base
##    print 'div =', div, 'leftover =', leftover2
    if leftover2 > 0:<commit_msg>Update base_conversion.py<commit_after>################################################################################
# Conversion functions 


# Input value as sting and base as integer
def other_to_dec(value, base):
    # Converts any supported base to base-10
    chars = [x for x in value]
    chars.reverse()
##    print 'reversed chars =', chars
    dec = 0
    for i, char in enumerate(chars):
        if char.isalpha():
            char = alnums[char]
##        print dec
        dec = dec + (int(char) * base**i)
    return dec


# Input values as integers
def dec_to_other(number, base):
    # Converts base-10 to any other supported base
    fin = []
    div = number / base
    leftover1 = number % base
##    print 'number =', number, 'leftover =', leftover1
    fin.append(leftover1)
    leftover2 = div % base
##    print 'div =', div, 'leftover =', leftover2
    if div != 0:
{'fraction_non_alphanumeric': 0.1911186059584036, 'fraction_numerical': 0.012928611579539067, 'mean_word_length': 2.964365256124722, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3172442', 'n_tokens_mistral': 579, 'n_tokens_neox': 513, 'n_words': 176}