Code
- As part of my senior thesis, I implemented an improved algorithm in Haskell for approximating single-qubit quantum gates into the Clifford+T gate set. See "Short paths in PU(2)" for algorithm details, and HTLenstra.hs for the code. Follow-up work with T. Blackman can be found here.
- (written with Q. Dao, N. Kenshur, F. Lin, C. Meng, C. Yost-Wolff for this REU report) GAPfunctions.txt contains several useful commands for working with the algebra language GAP.
- (written with D. Chait-Roth and A. Cui) See here for code related to crystallographic sphere packings, written at the 2018 DIMACS REU. This code was written for the paper "A Taxonomy of Crystallographic Sphere Packings" in Journal of Number Theory and at arXiv:1903.03563.
- My roomates and I compete amongst ourselves at NYTimes mini crosswords. I wrote elo.py as a general multi-player elo engine.
If you have data from a series of matches of a game in a text file that Python can read, you can run it in the terminal with python elo.py X (where X is the full filename, including extension). The text file must be formatted as one match per line, with each player's name that competed, followed by their relative position. For instance, if Zack beat Casimir who tied Tristan and beat Jack, then this line should be formatted as Zack 1 Casimir 2 Tristan 2 Jack 4.
The outputs are: each player's elo; a table giving head-to-head win percentages and tie percentages (** represents 100% and -- means the matchup never occured); and a graph of each player's elo over time (timestep is one game).
-
This Python file was written in 2016 to compute the odds of making the playoffs for each team of my high school fantasy football league, now in its fifth year. The underlying assumption is that each matchup is a coin toss, and it computes the corresponding probabilities exactly for a sufficiently constrained season (usually up to 24 unspecified matchups). This Python file was written in 2019 for the same purpose, but with the underlying assumption that for a given team, its weekly score is taken i.i.d. from some distribution N(μ,σ) which can be approximated well by computing the mean μ and standard deviation σ of previous results.
This Python file was written in 2020 to compute frequency and severity of misstarts for ESPN fantasy football leagues. The code linked won't actually compile since it needs the swid, espn_s2, and league_id fields specific to a given league, as well as the allTimeResults dictionary which should be populated as specified. Beware that the ESPN FF API seems to not fetch data from before 2018. This code is largely inspired by this article by Steven Morse asking similar questions about fantasy football performance.
- This document summarizes some practical lessons I learned over Summer 2017 about writing in VHDL for Quartus FPGAs and about running and setting up optics laboratory experiments.