Skip to content

Instantly share code, notes, and snippets.

View dlareau's full-sized avatar

Dillon Lareau dlareau

View GitHub Profile
@dlareau
dlareau / instructions.md
Created December 2, 2024 04:11
Installing the Coral dual edge TPU drivers on synology

Driver Installation

Notes

  1. These instructions are provided in a manner that assumes you know what you're doing (at least a little bit). They don't go into extreme detail, and they won't help you troubleshoot if you've broken something.
  2. I'm not responsible if you do break something. Try these instructions at your own risk. They worked for me, and hopefully they'll work for you too.
  3. These instructions are based on my experience doing this for the synology RS1221+. They are somewhat generalized in that I will call out where there are architecture specific choices made, but if they don't work for you
cigar
rebut
sissy
humph
awake
blush
focal
evade
naval
serve
@dlareau
dlareau / sample.yaml
Last active February 21, 2022 23:27
Sample SIBR service
version: '3'
services:
mediawiki:
image: mediawiki:1.37.1
restart: always
networks:
- proxy
- local
labels:
- "traefik.enable=true"
# takes a whole game of packets
def add_fields(packets):
batCount = -1
# Pretend the first packet has been repeated
batSet = [packets[0]]
lastPacket = packets[0]
# Iterate over all game packets
@dlareau
dlareau / packet_proposal.txt
Last active August 30, 2021 13:34
Proposal of packets and how to calculate stats
// Items always in a standard feed event
- id
- playerTags
- teamTags
- gameTags
- metadata
- created
- day
- season
- phase
Life
1 - What are you majoring in? wrong answers only.
1 - What piece of media scared each of you the most?
1 - What is your favorite pizza?
1 - What is your spice-sona (OC)?
1 - What are your favorite ice cream flavors?
2 - What is your favorite obscure emoji?
2 - What's your goty other than Blaseball?
2 - How would you describe your soulsmell?
2 - If you had to combine any two fruit juices for an official Blaseball juice, what would they be?
@dlareau
dlareau / sample.json
Created August 28, 2020 00:57
Sample stream data
data: {"value":{"games":{"sim":{"id":"thisidisstaticyo","day":70,"league":"d8545021-e9fc-48a3-af74-48685950a183","nextElectionEnd":"2020-08-30T19:00:00.011Z","nextPhaseTime":"2020-08-31T16:00:00.011Z","nextSeasonStart":"2020-08-31T16:00:00.011Z","phase":2,"playOffRound":0,"playoffs":"0e8512d6-648d-40bf-bbbd-c4e7690c9ce1","rules":"4ae9d46a-5408-460a-84fb-cbd8d03fff6c","season":3,"seasonId":"6c8acae5-fae4-4f81-a253-b21e97853996","terminology":"b67e9bbb-1495-4e1b-b517-f1444b0a6c8b","eraColor":null,"eraTitle":"The Discipline Era","openedBook":true,"unlockedPeanuts":true,"twgo":"JHFMTOJMNPSMLMDGFOSEZDTMJWHPADAACGRTBBPBBCJRTPMJCSNKKAOMVMSTAJTVTCJIMPSSSTBFHRSSMSDKIRLWLVWSSMEIMCCD","doTheThing":false,"labourOne":1,"subEraColor":null,"subEraTitle":"Feedback","eatTheRich":true,"unlockedInterviews":true},"season":{"id":"6c8acae5-fae4-4f81-a253-b21e97853996","league":"d8545021-e9fc-48a3-af74-48685950a183","rules":"4ae9d46a-5408-460a-84fb-cbd8d03fff6c","schedule":"13126714-3ea2-4364-9844-063da864e694","seasonNumber":3,"st
@dlareau
dlareau / fetchGameData.py
Created August 26, 2020 00:53
fetchGameData
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()
@dlareau
dlareau / graph.py
Last active August 26, 2020 02:33
Plot rescored games
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)
@dlareau
dlareau / sample.sql
Last active August 19, 2020 19:31
Sample queries
/* The proposed tables */
/* multi-table */
CREATE TABLE IF NOT EXISTS attr_table(
id SERIAL PRIMARY KEY,
everything /* pretend this expands to the 20 or so player fields */
);
CREATE TABLE IF NOT EXISTS player_table(
id SERIAL PRIMARY KEY,