Skip to content

Instantly share code, notes, and snippets.

@oshoham
oshoham / parse_blaseball_book.py
Last active August 9, 2020 18:43
Parse the Book of Blaseball from the site's minified JavaScript (Python 3 version)
import esprima
import requests
from bs4 import BeautifulSoup
from urllib.parse import urljoin
class BookOfBlaseballVisitor(esprima.NodeVisitor):
def find_book_function_node(self, node):
self._ancestors = []
self._book_function_node = None
@oshoham
oshoham / laser_harp.ino
Last active June 15, 2022 13:14 — forked from boysonhudson/laser_harp.ino
Laser Harp Arduino Code
/*
* Laser Harp MIDI Controller
*
* Authors: Wei-Luen (Alan) Peng and Oren Shoham
*/
// hex to MIDI note reference: https://www.wavosaur.com/download/midi-note-hex.php
// scale: B5, A5, G5, F5, E5, D5, C5
const int notes[7] = {0x5F, 0x5D, 0x5B, 0x59, 0x58, 0x56, 0x54};
const int startingInputPin = 3;
@oshoham
oshoham / .block
Last active November 21, 2023 17:12
People Killed By The Police In The U.S. In 2015
license: mit