<commit_before># -*- coding: utf-8 -*-

import numpy as np
import pprint
import requests
import sys

if sys.version_info >= (3, 4):
    from pathlib import Path
else:
    from pathlib2 import Path

TEAMNAME_REPLACEMENTS = {
    'Akhisar': '<NAME>',
    'Alaves': 'Alavés',
    'Alkmaar': 'AZ Alkmaar',
    'Ath Bilbao': 'Athletic Bilbao',
    'Ath Madrid': 'Atletico Madrid',
    'Atletico': 'Atletico Madrid',
    'Aue': 'Erzgebirge Aue',
    'Augsburg': 'FC Augsburg',
    'Bayern': 'Bayern München',
    'Bayern Munich': 'Bayern München',
    'Betis': 'Real Betis',
    'Beveren': 'Waasland-Beveren',
    'Bilbao': 'Athletic Bilbao',
    '<NAME>': '<NAME>',
    'Bourg-Peronnas': 'Bourg Peronnas',
    'Bournemouth': 'AFC Bournemouth',
    'Braga': 'Sp Braga',
    'Brugge': 'Club Brugge',
    'Bueyueksehir': 'Büyüksehir',
    'Buyuksehyr': 'Büyüksehir',
    'Celta': 'Celta de Vigo',
    'Celta Vigo': 'Celta de Vigo',
    'Chievo': '<NAME>',
    'Darmstadt': 'SV Darmstadt 98',
    'Den Haag': 'ADO Den Haag',
    'Depor': 'Deportivo La Coruña',
    'Dijon': 'Dijon FCO',
    'Dortmund': '<NAME>',
    'Duesseldorf': 'Fortuna Düsseldorf',
    'Ein Frankfurt': 'Eintracht Frankfurt',
    'Entella': 'Virtus Entella',
    'Espanol': 'Espanyol',
    'FC Cologne': 'FC Köln',
    'FC Koln': 'FC Augsburg',
    'Forest': 'Nottingham Forest',
    'Fortuna Dusseldorf': 'Fortuna Düsseldorf',
    'Frankfurt': 'Eintracht Frankfurt',
    'Freiburg': 'SC Freiburg',
    'Fuerth': '<NAME>',
    'Gijon': 'Sporting Gijón',
    'Gladbach': 'Borussia Mönchengladbach',
    'Groningen': 'FC Groningen',
    'Hamburg': 'Hamburg SV',
    'Hertha': '<NAME>',
    'Hoffenheim': 'TSG Hoffenheim',
    'Hull': 'Hull City',
    'Ingolstadt': 'FC Ingolstadt 04',
    'Inter': 'Internazionale',
    'Karabuekspor': 'Karabükspor',
    'Karabukspor': 'Karabükspor',
    'Kayseri': 'Kayserispor',
    'Koeln': 'FC Köln',
    'La Coruna': 'Deportivo La Coruña',
    'Lautern': 'Kaiserslautern',
    'Leicester': 'Leicester City',
    'Leverkusen': 'Bayer Leverkusen',
    "M'gladbach": 'Borussia Mönchengladbach',
    'Malaga': 'Málaga',
    'Man City': 'Leicester City',
    'Man United': 'Manchester United',
    'Milan': 'AC Milan',
    'Monaco': 'AS Monaco',
    'Muenchen 60': 'München 1860',
    'Munich 1860': 'München 1860',
    'Nancy': 'AS Nancy Lorraine',
    'Nijmegen': 'NEC Nijmegen',
    "Nott'm Forest": 'Nottingham Forest',
    'Nuernberg': 'Nürnberg',
    'Nurnberg': 'Nürnberg',
    'PSV Eindhoven': 'PSV',
    'Paris SG': 'Paris Saint-Germain',
    'Pescara': 'US Pescara',
    'Rennes': 'Stade Rennes',
    'Roda': 'Roda JC',
    'Roma': 'AS Roma',
    'Saint-Etienne': 'St Etienne',
    'Schalke': 'Schalke 04',
    'Sevilla': 'Sevilla FC',
    'Sociedad': 'Real Sociedad',
    'Sp Gijon': 'Sporting Gijón',
    'Stoke': 'Stoke City',
    'Swansea': 'Swansea City',
    'Tottenham': 'Tottenham Hotspur',
    'Twente': 'FC Twente',
    'Utrecht': 'FC Utrecht',
    'Vallecano': '<NAME>',
    'Waregem': 'Zulte Waregem',
    'Werder': 'W<NAME>',
    'West Brom': 'West Bromwich Albion',
    'West Ham': 'West Ham United',
    'Wolfsburg': 'VfL Wolfsburg',
    'Wuerzburg': '<NAME>',
    'Wurzburger Kickers': 'Würzburger Kickers',
    'Zwolle': 'PEC Zwolle'}

# TEAMNAME_REPLACEMENTS = {'<NAME>': '<NAME>'}

LEAGUE_DICT = {
    'ENG-Premier League': {
        'ClubElo': 'ENG_1',  # Used to id on clubelo.co)m
        'MatchHistory': 'E0',  # Code used on football-data.co.uk
        'MH_from_season': '9394',  # Availability on football-data.co.uk
        'FiveThirtyEight': 'premier-league',  # Slug used on fivethirtyeight.com
    },
    'ENG-Championship': {
        'ClubElo': 'ENG_2',
        'MatchHistory': 'E1',
        'MH_from_season': '9394'
    },  # Division 1 before 2004
    'ENG-League 1': {
        'MatchHistory': 'E2',
        'MH_from_season': '9394'
    },  # Division 2 before 2004
    'ENG-League 2': {
        'MatchHistory': 'E3',
        'MH_from_season': '9394'
    },  # Division 3 before 2004
    'ENG-Conference': {
        'MatchHistory': 'EC',
        'MH_from_season': '0506'
    },  # Not available before 2005
    'SCO-Premier League': {
        'ClubElo': 'SCO_1',
        'MatchHistory': 'SC0',
        'MH_from_season': '9495'
    },
    'SCO-Division 1': {
        'MatchHistory': 'SC1',
        'MH_from_season': '9495'
    },  # Division 1 before 2004
    'SCO-Division 2': {
        'MatchHistory': 'SC2',
        'MH_from_season': '9798'
    },  # Division 2 before 2004
    'SCO-Division 3': {
        'MatchHistory': 'SC3',
        'MH_from_season': '9798'
    },  # Division 3 before 2004
    'GER-Bundesliga': {
        'ClubElo': 'GER_1',
        'MatchHistory': 'D1',
        'MH_from_season': '9394',
        'FiveThirtyEight': 'bundesliga',<commit_msg>Scottish league name<commit_after># -*- coding: utf-8 -*-

import numpy as np
import pprint
import requests
import sys

if sys.version_info >= (3, 4):
    from pathlib import Path
else:
    from pathlib2 import Path

TEAMNAME_REPLACEMENTS = {
    'Akhisar': '<NAME>',
    'Alaves': 'Alavés',
    'Alkmaar': 'AZ Alkmaar',
    'Ath Bilbao': 'Athletic Bilbao',
    'Ath Madrid': 'Atletico Madrid',
    'Atletico': 'Atletico Madrid',
    'Aue': 'Erzgebirge Aue',
    'Augsburg': 'FC Augsburg',
    'Bayern': 'Bayern München',
    'Bayern Munich': 'Bayern München',
    'Betis': 'Real Betis',
    'Beveren': 'Waasland-Beveren',
    'Bilbao': 'Athletic Bilbao',
    'Bor<NAME>': '<NAME>',
    'Bourg-Peronnas': 'Bourg Peronnas',
    'Bournemouth': 'AFC Bournemouth',
    'Braga': 'Sp Braga',
    'Brugge': 'Club Brugge',
    'Bueyueksehir': 'Büyüksehir',
    'Buyuksehyr': 'Büyüksehir',
    'Celta': 'Celta de Vigo',
    'Celta Vigo': 'Celta de Vigo',
    'Chievo': 'Chievo Verona',
    'Darmstadt': 'SV Darmstadt 98',
    'Den Haag': 'ADO Den Haag',
    'Depor': 'Deportivo La Coruña',
    'Dijon': 'Dijon FCO',
    'Dortmund': '<NAME>',
    'Duesseldorf': 'Fortuna Düsseldorf',
    'Ein Frankfurt': 'Eintracht Frankfurt',
    'Entella': 'Virtus Entella',
    'Espanol': 'Espanyol',
    'FC Cologne': 'FC Köln',
    'FC Koln': 'FC Augsburg',
    'Forest': 'Nottingham Forest',
    'Fortuna Dusseldorf': 'Fortuna Düsseldorf',
    'Frankfurt': 'Eintracht Frankfurt',
    'Freiburg': 'SC Freiburg',
    'Fuerth': '<NAME>',
    'Gijon': 'Sporting Gijón',
    'Gladbach': 'Borussia Mönchengladbach',
    'Groningen': 'FC Groningen',
    'Hamburg': 'Hamburg SV',
    'Hertha': '<NAME>',
    'Hoffenheim': 'TSG Hoffenheim',
    'Hull': 'Hull City',
    'Ingolstadt': 'FC Ingolstadt 04',
    'Inter': 'Internazionale',
    'Karabuekspor': 'Karabükspor',
    'Karabukspor': 'Karabükspor',
    'Kayseri': 'Kayserispor',
    'Koeln': 'FC Köln',
    'La Coruna': 'Deportivo La Coruña',
    'Lautern': 'Kaiserslautern',
    'Leicester': 'Leicester City',
    'Leverkusen': 'Bayer Leverkusen',
    "M'gladbach": 'Borussia Mönchengladbach',
    'Malaga': 'Málaga',
    'Man City': 'Leicester City',
    'Man United': 'Manchester United',
    'Milan': 'AC Milan',
    'Monaco': 'AS Monaco',
    'Muenchen 60': 'München 1860',
    'Munich 1860': 'München 1860',
    'Nancy': 'AS Nancy Lorraine',
    'Nijmegen': 'NEC Nijmegen',
    "Nott'm Forest": 'Nottingham Forest',
    'Nuernberg': 'Nürnberg',
    'Nurnberg': 'Nürnberg',
    'PSV Eindhoven': 'PSV',
    'Paris SG': 'Paris Saint-Germain',
    'Pescara': 'US Pescara',
    'Rennes': 'Stade Rennes',
    'Roda': 'Roda JC',
    'Roma': 'AS Roma',
    'Saint-Etienne': 'St Etienne',
    'Schalke': 'Schalke 04',
    'Sevilla': 'Sevilla FC',
    'Sociedad': 'Real Sociedad',
    'Sp Gijon': 'Sporting Gijón',
    'Stoke': 'Stoke City',
    'Swansea': 'Swansea City',
    'Tottenham': 'Tottenham Hotspur',
    'Twente': 'FC Twente',
    'Utrecht': 'FC Utrecht',
    'Vallecano': '<NAME>',
    'Waregem': 'Zulte Waregem',
    'Werder': 'Werder Bremen',
    'West Brom': 'West Bromwich Albion',
    'West Ham': 'West Ham United',
    'Wolfsburg': 'VfL Wolfsburg',
    'Wuerzburg': '<NAME>',
    'Wurzbur<NAME>ickers': '<NAME>',
    'Zwolle': 'PEC Zwolle'}

# TEAMNAME_REPLACEMENTS = {'<NAME>': '<NAME>'}

LEAGUE_DICT = {
    'ENG-Premier League': {
        'ClubElo': 'ENG_1',  # Used to id on clubelo.co)m
        'MatchHistory': 'E0',  # Code used on football-data.co.uk
        'MH_from_season': '9394',  # Availability on football-data.co.uk
        'FiveThirtyEight': 'premier-league',  # Slug used on fivethirtyeight.com
    },
    'ENG-Championship': {
        'ClubElo': 'ENG_2',
        'MatchHistory': 'E1',
        'MH_from_season': '9394'
    },  # Division 1 before 2004
    'ENG-League 1': {
        'MatchHistory': 'E2',
        'MH_from_season': '9394'
    },  # Division 2 before 2004
    'ENG-League 2': {
        'MatchHistory': 'E3',
        'MH_from_season': '9394'
    },  # Division 3 before 2004
    'ENG-Conference': {
        'MatchHistory': 'EC',
        'MH_from_season': '0506'
    },  # Not available before 2005
    'SCO-Premiership': {
        'ClubElo': 'SCO_1',
        'MatchHistory': 'SC0',
        'MH_from_season': '9495'
    },
    'SCO-Division 1': {
        'MatchHistory': 'SC1',
        'MH_from_season': '9495'
    },  # Division 1 before 2004
    'SCO-Division 2': {
        'MatchHistory': 'SC2',
        'MH_from_season': '9798'
    },  # Division 2 before 2004
    'SCO-Division 3': {
        'MatchHistory': 'SC3',
        'MH_from_season': '9798'
    },  # Division 3 before 2004
    'GER-Bundesliga': {
        'ClubElo': 'GER_1',
        'MatchHistory': 'D1',
        'MH_from_season': '9394',
        'FiveThirtyEight': 'bundesliga',
{'fraction_non_alphanumeric': 0.17975657963174868, 'fraction_numerical': 0.024133985228336628, 'mean_word_length': 3.0531197301854975, 'pattern_counts': {'":': 4, '<': 27, '<?xml version=': 0, '>': 29, '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': '81683', 'n_tokens_mistral': 4089, 'n_tokens_neox': 3803, 'n_words': 868}