<commit_before># encoding: utf8
"""Faithful translations of calculations the games make."""

def calculated_stat(base_stat, level, iv, effort):
    """Returns the calculated stat -- i.e. the value actually shown in the game
    on a Pokémon's status tab.
    """

    # Remember: this is from C; use floor division!
    return (base_stat * 2 + iv + effort // 4) * level // 100 + 5

def calculated_hp(base_hp, level, iv, effort):
    """Similar to `calculated_stat`, except with a slightly different formula
    used specifically for HP.
    """

    # Shedinja's base stat of 1 is special; its HP is always 1
    if base_hp == 1:
        return 1

    return (base_hp * 2 + iv + effort // 4) * level // 100 + 10 + level<commit_msg>Added a function for the EXP formula.<commit_after># encoding: utf8
"""Faithful translations of calculations the games make."""

def calculated_stat(base_stat, level, iv, effort):
    """Returns the calculated stat -- i.e. the value actually shown in the game
    on a Pokémon's status tab.
    """

    # Remember: this is from C; use floor division!
    return (base_stat * 2 + iv + effort // 4) * level // 100 + 5

def calculated_hp(base_hp, level, iv, effort):
    """Similar to `calculated_stat`, except with a slightly different formula
    used specifically for HP.
    """

    # Shedinja's base stat of 1 is special; its HP is always 1
    if base_hp == 1:
        return 1

    return (base_hp * 2 + iv + effort // 4) * level // 100 + 10 + level

def earned_exp(base_exp, level):
    """Returns the amount of EXP earned when defeating a Pokémon at the given
    level.
    """

    return base_exp * level // 7
{'fraction_non_alphanumeric': 0.10478497880072683, 'fraction_numerical': 0.022410660205935795, 'mean_word_length': 2.887058823529412, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3666943', 'n_tokens_mistral': 536, 'n_tokens_neox': 472, 'n_words': 214}