Esempio n. 1
0
#!/usr/bin/python
# -*- coding:utf8 -*-
from klasses.Game import Game
from klasses.miscellaneous import MPTime

gm = '200102280DEN'
game = Game(gm, 'regular')
# print(game.teamplyrs())
_, _, _, record = game.game_scanner(gm)
for i in record:
    # if 'MK' in i or 'MS' in i:
    print(i)
# game.game_analyser(gm, record)
# game.pace(gm, record)
game.find_time_series(gm, record)

# a = MPTime('47:36.1')
# b = MPTime('47:36.0')
# print(a >= b)    # True
Esempio n. 2
0
# -*- coding:utf8 -*-

from klasses.Game import Game
from klasses.Player import Player
from util import LoadPickle, playerMarkToDir, writeToPickle, gameMarkToSeason
from stats_nba.Game_nba import Game_nba
import pandas as pd
import numpy as np
np.set_printoptions(suppress=True)
pd.options.display.expand_frame_repr = False
pd.options.display.width = 50
RoF = 0

gm = '201201070NJN'
game = Game(gm, 'playoff' if RoF else 'regular')
record = game.game_scanner()
# for i in record:
#     print(i)
record = game.game_analyser(record)
record = game.game_analyser(record, T=1)
ss = gameMarkToSeason(gm)
rof = 'playoff' if RoF else 'regular'
season_dir = 'D:/sunyiwu/stat/data/seasons_scanned/%s/%s/' % (ss, rof)
writeToPickle(season_dir + gm + '_scanned.pickle', record)
for i in record:
    print(i)
# print()

game.find_time_series(record)
game.start_of_quarter(record)