Skip to content

Commit

Permalink
New get_data for iglo.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszlew committed May 12, 2024
1 parent 61012ef commit e597650
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ __pycache__/
*.py[cod]
*$py.class

dist/
dist/venv
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ git config --global core.hooksPath .githooks/

```shell
git clone https://github.com/lukaszlew/accurating
virtualenv /tmp/venv
source /tmp/venv/bin/activate
pip install poetry
poetry install
poetry run pytest
poetry run mypy .
Expand Down
7 changes: 6 additions & 1 deletion iglo/iglo.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ def request(s, url):
print(f'getting {s}')
return requests.get(f'{url}/{s}').json()['results']

def get_data2(test):
url = 'https://iglo.szalenisamuraje.org/api/igor-matches'
data = requests.get(f'{url}').json()
return data

# Deprecated
def get_data(test):
url = 'https://iglo.szalenisamuraje.org/api'
data = []
Expand Down Expand Up @@ -72,7 +77,7 @@ def save_iglo_data_local(path):

def save_iglo_data(path, test=False):
with open(path, 'w') as f:
json.dump(get_data(test), f)
json.dump(get_data2(test), f)


def train_ielo(data_path, cfg_path, output_path):
Expand Down
2 changes: 1 addition & 1 deletion iglo/matches.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions iglo/ratings.json

Large diffs are not rendered by default.

0 comments on commit e597650

Please sign in to comment.