swdata/calc_participants.py
2018-03-20 20:35:36 +08:00

19 lines
403 B
Python

# from G254
import json
from pathlib import Path
from island.match import Match
result = 0
for file in Path('wos-data-new').iterdir():
p = Path(file)
if p.suffix == '.json':
name = p.stem
if int(name[1:]) >= 254:
m = Match.read_from_json(str(file))
result += len(m.query('player', 'join').select('pid').raw_data)
print(result)
# 146 users