Skip to content

Instantly share code, notes, and snippets.

@willettk
willettk / bridle_trails.ipynb
Created January 6, 2019 23:32
Bridle Trails 50K predictions
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@willettk
willettk / names.txt
Created January 9, 2018 22:50
Dear Prudence - The Best Names
Bethilda
Brunhilda
Chegory
Chelizabeth
Drusilla
Elizanthonius
Esteñabeth
Festerling
Flimshaw
Grasputin
@willettk
willettk / nationwide.ipynb
Last active February 4, 2020 20:01
Make a list of all the (English) Wikipedia page titles that can be sung to the tune of the Nationwide jingle.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@willettk
willettk / ll70.ipynb
Created November 10, 2016 15:19
LL70 prelims
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@willettk
willettk / movie_rating_query_extras.sql
Last active July 5, 2016 06:42
Movie rating SQL queries - extras
-- Q1
SELECT name from Reviewer
WHERE Reviewer.rID IN
(SELECT Rating.rID from Rating
WHERE Rating.mID =
(SELECT mid from Movie
WHERE title = "Gone with the Wind"))
-- Q2
@willettk
willettk / movie_rating_exercises.sql
Last active July 2, 2016 17:13
Solutions to Stanford SQL Movie Rating Exercises
-- Q1
SELECT title FROM Movie
WHERE director="Steven Spielberg"
-- Q2
SELECT DISTINCT(year) FROM Movie
JOIN Rating as R on Movie.mID = R.mID
WHERE R.stars > 3 AND R.stars < 6
find . -maxdepth 1 -mindepth 1 -type d -exec sh -c 'echo "{} : $(find "{}" -type f | wc -l)" file\(s\)' \;
from matplotlib import pyplot as plt
import numpy as np
pages = np.arange(500)+1
gt = pages / 10.
py = 2.5 * np.log10(pages)
fig = plt.figure(figsize=(8,8))
ax = fig.add_subplot(111)
@willettk
willettk / oscar_winners.csv
Last active November 24, 2016 17:12
Oscar winners in acting (as of 2016)
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Emil Jannings
Janet Gaynor
Warner Baxter
Mary Pickford
George Arliss
Norma Shearer
Lionel Barrymore
Marie Dressler
Wallace Beery
Fredric March
@willettk
willettk / mosaic_data.csv
Created January 8, 2016 19:22
Mosaic-formatted data for AAS 227. 1 = M, 0 = F; speaker,chair,question,question1
1 0 1 1
1 0 1 1
1 0 1 1
1 0 1 1
1 1 0 0
1 1 1 0
1 1 1 0
1 1 1 0
1 1 1 1
1 1 1 1