fix various paths

This commit is contained in:
Dima Gerasimov 2019-05-08 21:19:51 +01:00
parent 2b45b2db1d
commit 859ff19a85
2 changed files with 10 additions and 2 deletions

View file

@ -11,7 +11,7 @@ from kython.kerror import Res, ytry, unwrap
from kython.kdatetime import as_utc
_BDIR = Path('/L/Dropbox/data/codeforces')
_BDIR = Path('/L/zzz_syncthing/data/codeforces')
Cid = int
@ -95,6 +95,11 @@ def iter_data() -> Iterator[Res[Competition]]:
def get_data():
return list(sorted(iter_data(), key=fget(Competition.when)))
def test():
assert len(get_data()) > 10
def main():
for d in iter_data():
try:

View file

@ -11,7 +11,7 @@ from kython.kerror import Res, ytry, unwrap
def get_latest():
last = max(Path('/L/Dropbox/data/topcoder').glob('*.json'))
last = max(Path('/L/zzz_syncthing/data/topcoder').glob('*.json'))
return json.loads(last.read_text())
@ -79,6 +79,9 @@ def get_data():
return list(sorted(iter_data(), key=fget(Competition.when)))
def test():
assert len(get_data()) > 10
def main():
for d in iter_data():
try: