<commit_before>from gameconfig import config
from lib.lazyassconsole import Console
from lib.generator import RandomFiller
from pydsmanager import teams, free_players, match_results


def print_banner():
    print(config['banner'])


def print_menu():
    for menu_entry in config['menu_choice']:
        print("{} . {}".format(menu_entry, config['menu_choice'][menu_entry]))


def check_cmd(cmd):
    if cmd in config['menu_choice']:
        print(config['menu_choice'][cmd])
        if cmd == 'gp':
            generate_player()
        elif cmd == 'ap':
            add_player_to_team()
        elif cmd == 'gt':
            generate_team()
        elif cmd == 'gm':
            generate_match()
        elif cmd == 'sp':
            show_free_players()
        elif cmd == 'st':
            show_teams()
    else:
        Console.print("Invalid Command {}".format(cmd), 'r')


def generate_player():
    rnd = RandomFiller()
    player = rnd.get_player(rnd.get_locale())
    print("Player generated {}".format(player))
    free_players.append(player)


def show_free_players():
    for player in free_players:
        print(player)


def add_player_to_team():
    pass


def generate_team():
    rnd = RandomFiller()
    team = rnd.get_team(rnd.get_locale())
    print("team: {} ({}) generated".format(team.name, team.nationality))
    teams.append(team)


def show_teams():
    if len(teams) > 0:
        print("Which team? 1/{}".format(len(teams)))
        i = 1
        for team in teams:
            print("{}. {} ({})".format(i, team.name, team.nationality))
            i += 1
        index = int(input())
        index -= 1
        if len(teams) > index > -1:
            team = teams[index]
            print("{}".format(team.name))
            print("nation: {}".format(team.nationality))
            print("coach {}".format(team.coach))<commit_msg>showing and generating teams<commit_after>from gameconfig import config
from lib.lazyassconsole import Console
from lib.generator import RandomFiller
from pydsmanager import teams, free_players, match_results


def print_banner():
    print(config['banner'])


def print_menu():
    for menu_entry in config['menu_choice']:
        print("{} . {}".format(menu_entry, config['menu_choice'][menu_entry]))


def check_cmd(cmd):
    if cmd in config['menu_choice']:
        print(config['menu_choice'][cmd])
        if cmd == 'gp':
            generate_player()
        elif cmd == 'ap':
            add_player_to_team()
        elif cmd == 'gt':
            generate_team()
        elif cmd == 'gm':
            generate_match()
        elif cmd == 'sp':
            show_free_players()
        elif cmd == 'st':
            show_teams()
    else:
        Console.print("Invalid Command {}".format(cmd), 'r')


def generate_player():
    rnd = RandomFiller()
    player = rnd.get_player(rnd.get_locale())
    print("Player generated {}".format(player))
    free_players.append(player)


def show_free_players():
    for player in free_players:
        print(player)


def add_player_to_team():
    pass


def generate_team():
    rnd = RandomFiller()
    team = rnd.get_team(rnd.get_locale())
    print("team: {} ({}) generated".format(team.name, team.nationality))
    teams.append(team)


def show_teams():
    if len(teams) > 0:
        print("Which team? 1/{}".format(len(teams)))
        i = 1
        for team in teams:
            print("{}. {} ({})".format(i, team.name, team.nationality))
            i += 1
        index = int(input())
        index -= 1

        if len(teams) > index > -1:
            team = teams[index]
            print("{}".format(team.name))
            print("nation: {}".format(team.nationality))
            print("coach {}".format(team.coach))
{'fraction_non_alphanumeric': 0.14598930481283423, 'fraction_numerical': 0.0032085561497326204, 'mean_word_length': 2.5126760563380284, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '2507372', 'n_tokens_mistral': 1186, 'n_tokens_neox': 1154, 'n_words': 264}