<commit_before>from enum import Enum
import arrow


class Region(Enum):
    brazil = "BR"
    europe_north_east = "EUNE"
    europe_west = "EUW"
    japan = "JP"
    korea = "KR"
    latin_america_north = "LAN"
    latin_america_south = "LAS"
    north_america = "NA"
    oceania = "OCE"
    turkey = "TR"
    russia = "RU"

    @property
    def platform(self) -> "Platform":
        return getattr(Platform, self.name)

    @property
    def default_locale(self) -> str:
        return DEFAULT_LOCALE[self]

    @staticmethod
    def from_platform(platform):
        try:
            return platform.region
        except AttributeError:
            return Platform(platform).region

    @property
    def timezone(self) -> str:
        tzs = {
            'NA': 'GMT-8',
            'LAN': 'GMT-7',
            'LAS': 'GMT-5',
            'BR': 'GMT-4',
            'EUW': 'GMT-2',
            'TR': 'GMT-0',
            'EUNE': 'GMT+1',
            'RU': 'GMT+3',
            'KR': 'GMT+6',
            'JP': 'GMT+7',
            'OCE': 'GMT+8',
        }
        return tzs[self.value]


class Platform(Enum):
    brazil = "BR1"
    europe_north_east = "EUN1"
    europe_west = "EUW1"
    japan = "JP1"
    korea = "KR"
    latin_america_north = "LA1"
    latin_america_south = "LA2"
    north_america = "NA1"
    oceania = "OC1"
    turkey = "TR1"
    russia = "RU"

    @property
    def region(self) -> "Region":
        return getattr(Region, self.name)

    @property
    def default_locale(self) -> str:
        return DEFAULT_LOCALE[self]

    @staticmethod
    def from_region(region):
        try:
            return region.platform
        except AttributeError:
            return Region(region).platform


DEFAULT_LOCALE = {
    Region.brazil: "pt_BR",
    Platform.brazil: "pt_BR",
    Region.europe_north_east: "en_GB",
    Platform.europe_north_east: "en_GB",
    Region.europe_west: "en_GB",
    Platform.europe_west: "en_GB",
    Region.japan: "ja_JP",
    Platform.japan: "ja_JP",
    Region.korea: "ko_KR",
    Platform.korea: "ko_KR",
    Region.latin_america_north: "es_MX",
    Platform.latin_america_north: "es_MX",
    Region.latin_america_south: "es_AR",
    Platform.latin_america_south: "es_AR",
    Region.north_america: "en_US",
    Platform.north_america: "en_US",
    Region.oceania: "en_AU",
    Platform.oceania: "en_AU",
    Region.turkey: "tr_TR",
    Platform.turkey: "tr_TR",
    Region.russia: "ru_RU",
    Platform.russia: "ru_RU",
}


class Key(Enum):
    Q = "Q"
    W = "W"
    E = "E"
    R = "R"


class Resource(Enum):
    mana = "Mana"
    courage = "Courage"
    energy = "Energy"
    fury = "Fury"
    rage = "Rage"
    flow = "Flow"
    ferocity = "Ferocity"
    heat = "Heat"
    shield = "Shield"
    blood_well = "Blood Well"
    crimson_rush = "Crimson Rush"
    none = "None"
    no_cost = "No Cost"


class Side(Enum):
    blue = 100
    red = 200


class GameMode(Enum):
    aram = "ARAM"
    ascension = "ASCENSION"
    classic = "CLASSIC"
    showdown = "FIRSTBLOOD"
    poro_king = "KINGPORO"
    dominion = "ODIN"
    one_for_all = "ONEFORALL"
    tutorial = "TUTORIAL"
    tutorial_1 = "TUTORIAL_MODULE_1"
    tutorial_2 = "TUTORIAL_MODULE_2"
    tutorial_3 = "TUTORIAL_MODULE_3"
    nexus_siege = "SIEGE"
    assassinate = "ASSASSINATE"
    dark_star = "DARKSTAR"
    all_random_summoners_rift = "ARSR"
    urf = "URF"
    doom_bots = "DOOMBOTSTEEMO"
    star_guardian = "STARGUARDIAN"
    project = "PROJECT"
    overcharge = "OVERCHARGE"
    all_random_urf_snow = "SNOWURF"
    practice_tool = "PRACTICETOOL"
    nexus_blitz = "GAMEMODEX"<commit_msg>Change Nexus Blitz to new GameMode<commit_after>from enum import Enum
import arrow


class Region(Enum):
    brazil = "BR"
    europe_north_east = "EUNE"
    europe_west = "EUW"
    japan = "JP"
    korea = "KR"
    latin_america_north = "LAN"
    latin_america_south = "LAS"
    north_america = "NA"
    oceania = "OCE"
    turkey = "TR"
    russia = "RU"

    @property
    def platform(self) -> "Platform":
        return getattr(Platform, self.name)

    @property
    def default_locale(self) -> str:
        return DEFAULT_LOCALE[self]

    @staticmethod
    def from_platform(platform):
        try:
            return platform.region
        except AttributeError:
            return Platform(platform).region

    @property
    def timezone(self) -> str:
        tzs = {
            'NA': 'GMT-8',
            'LAN': 'GMT-7',
            'LAS': 'GMT-5',
            'BR': 'GMT-4',
            'EUW': 'GMT-2',
            'TR': 'GMT-0',
            'EUNE': 'GMT+1',
            'RU': 'GMT+3',
            'KR': 'GMT+6',
            'JP': 'GMT+7',
            'OCE': 'GMT+8',
        }
        return tzs[self.value]


class Platform(Enum):
    brazil = "BR1"
    europe_north_east = "EUN1"
    europe_west = "EUW1"
    japan = "JP1"
    korea = "KR"
    latin_america_north = "LA1"
    latin_america_south = "LA2"
    north_america = "NA1"
    oceania = "OC1"
    turkey = "TR1"
    russia = "RU"

    @property
    def region(self) -> "Region":
        return getattr(Region, self.name)

    @property
    def default_locale(self) -> str:
        return DEFAULT_LOCALE[self]

    @staticmethod
    def from_region(region):
        try:
            return region.platform
        except AttributeError:
            return Region(region).platform


DEFAULT_LOCALE = {
    Region.brazil: "pt_BR",
    Platform.brazil: "pt_BR",
    Region.europe_north_east: "en_GB",
    Platform.europe_north_east: "en_GB",
    Region.europe_west: "en_GB",
    Platform.europe_west: "en_GB",
    Region.japan: "ja_JP",
    Platform.japan: "ja_JP",
    Region.korea: "ko_KR",
    Platform.korea: "ko_KR",
    Region.latin_america_north: "es_MX",
    Platform.latin_america_north: "es_MX",
    Region.latin_america_south: "es_AR",
    Platform.latin_america_south: "es_AR",
    Region.north_america: "en_US",
    Platform.north_america: "en_US",
    Region.oceania: "en_AU",
    Platform.oceania: "en_AU",
    Region.turkey: "tr_TR",
    Platform.turkey: "tr_TR",
    Region.russia: "ru_RU",
    Platform.russia: "ru_RU",
}


class Key(Enum):
    Q = "Q"
    W = "W"
    E = "E"
    R = "R"


class Resource(Enum):
    mana = "Mana"
    courage = "Courage"
    energy = "Energy"
    fury = "Fury"
    rage = "Rage"
    flow = "Flow"
    ferocity = "Ferocity"
    heat = "Heat"
    shield = "Shield"
    blood_well = "Blood Well"
    crimson_rush = "Crimson Rush"
    none = "None"
    no_cost = "No Cost"


class Side(Enum):
    blue = 100
    red = 200


class GameMode(Enum):
    aram = "ARAM"
    ascension = "ASCENSION"
    classic = "CLASSIC"
    showdown = "FIRSTBLOOD"
    poro_king = "KINGPORO"
    dominion = "ODIN"
    one_for_all = "ONEFORALL"
    tutorial = "TUTORIAL"
    tutorial_1 = "TUTORIAL_MODULE_1"
    tutorial_2 = "TUTORIAL_MODULE_2"
    tutorial_3 = "TUTORIAL_MODULE_3"
    nexus_siege = "SIEGE"
    assassinate = "ASSASSINATE"
    dark_star = "DARKSTAR"
    all_random_summoners_rift = "ARSR"
    urf = "URF"
    doom_bots = "DOOMBOTSTEEMO"
    star_guardian = "STARGUARDIAN"
    project = "PROJECT"
    overcharge = "OVERCHARGE"
    all_random_urf_snow = "SNOWURF"
    practice_tool = "PRACTICETOOL"
    nexus_blitz = "NEXUSBLITZ"
{'fraction_non_alphanumeric': 0.12975206611570247, 'fraction_numerical': 0.008815426997245178, 'mean_word_length': 2.3772093023255816, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 13, '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': '2083930', 'n_tokens_mistral': 2916, 'n_tokens_neox': 2794, 'n_words': 542}