This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"gameId": "258ed83f-19f3-4ddd-bb7e-9bb85768b8fd", | |
"eventType": "WALK", | |
"eventIndex": 0, | |
"inning": 0, | |
"outsBeforePlay": 0, | |
"batterId": "7310c32f-8f32-40f2-b086-54555a2c0e86", | |
"batterTeamId": "36569151-a2fb-43c1-9df7-2df512424c82", | |
"pitcherId": "9965eed5-086c-4977-9470-fe410f92d353", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS player( | |
player_id varchar(36) PRIMARY KEY, /* Use the uuid as the primary key */ | |
captured_at timestamp /* The timestamp when this player data was fetched from the site. */ | |
/* Or better yet if we can get it the timestamp the change took effect */ | |
name text | |
deceased boolean | |
/* blaserunning */ | |
base_thirst decimal | |
continuation decimal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import glob | |
import requests | |
from matplotlib import pyplot as plt | |
from itertools import accumulate | |
# Load original season 3 games | |
with open("season3games.json", "r") as f: | |
line = f.read() | |
games = json.loads(line) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import sseclient | |
def getGameDay(): | |
response = requests.get("https://www.blaseball.com/events/streamGameData", stream=True) | |
client = sseclient.SSEClient(response) | |
singleEvent = next(client.events()) | |
client.close() |
OlderNewer