Esempio n. 1
0
 def resultsA(self):
     teams_fff = [
         'ARS', 'AVL', 'BOU', 'BHA', 'BUR', 'CHE', 'CRY', 'EVE', 'LEI',
         'LIV', 'MCI', 'MUN', 'NEW', 'NOR', 'SHU', 'SOU', 'TOT', 'WAT',
         'WHU', 'WOL'
     ]
     if self.tname.text.upper() in teams_fff:
         x = fixtureFinder(self.tname.text.upper(), 'A')
         results = listJoiner(x[0])
         show_popup_6_I(results, x[1], self.tname.text.upper(), 'Away')
     else:
         show_error_popup()
Esempio n. 2
0
 def tablesO(self):
     teams = [
         'ARS', 'AVL', 'BOU', 'BHA', 'BUR', 'CHE', 'CRY', 'EVE', 'LEI',
         'LIV', 'MCI', 'MUN', 'NEW', 'NOR', 'SHU', 'SOU', 'TOT', 'WAT',
         'WHU', 'WOL'
     ]
     table = []
     for team_name in teams:
         output = fixtureFinder(team_name, 'E')
         results = output[2].__add__(output[3])
         results = [str(x) for x in results]
         results.insert(0, team_name)
         results[8] = int(results[8])
         table.append(results)
     table.sort(key=lambda x: x[8], reverse=True)
     for i in range(20):
         table[i][0] = str(i + 1) + ' ' + table[i][0]
     table.insert(0, ['#', 'P', 'W', 'D', 'L', 'GF', 'GA', 'GD', 'Pts'])
     data = []
     for i in range(9):
         data.append([row[i] for row in table])
     show_popup_7(data, 'Overall')
Esempio n. 3
0
            elif mode == 'R':
                mode = 'random'
            roundPredictor(gw, mode, cs=False)
        elif menu_choice_3 == 2:
            gw = int(input('Which gameweek? '))
            roundPredictor(gw, 'accurate', cs=True)

    elif menu_choice == 5:

        runPredictor_2()

    elif menu_choice == 6:

        team_name = input('Which team? ').upper()
        place = input('Home, Away, or Either? (H / A / E) ').upper()
        output = fixtureFinder(team_name, place)
        headers = ['P', 'W', 'D', 'L', 'GF', 'GA', 'GD', 'Pts', '']
        trio = headers + headers + headers
        if place == 'H' or place == 'A':
            results = output[0]
            table = tabulate([headers, output[1]], tablefmt='plain')
            for result in results:
                print(result)
            print(table)
        else:
            print(tabulate([*zip(*[output[0], output[1]])]))
            print(tabulate([headers, output[2]], tablefmt='plain'))
            print(tabulate([headers, output[3]], tablefmt='plain'))
            print(
                tabulate([headers, output[2].__add__(output[3])],
                         tablefmt='plain'))