Skip to content

Instantly share code, notes, and snippets.

View Plutor's full-sized avatar
🗯️

Logan Ingalls Plutor

🗯️
View GitHub Profile
@Plutor
Plutor / gist:9071314
Last active August 29, 2015 13:56
Tracing Aragorn's bloodline to Elros half-elven (actually five-eigths)
  • Aragorn
  • [... 15 previous Chieftains of the Dúnedain ...]
  • Arvedui, last King of Arthedain
  • [... 14 previous Kings of Arthedain ...]
  • Eärendur, last King of Arnor
  • [... 7 previous Kings of Arnor ...]
  • Isildur, King of Arnor
  • Elendil, King of Arnor and last Lord of Andúnië
  • Amandil
  • [... 16 previous Lords of Andúnië ...]
@Plutor
Plutor / perfectinnings.awk
Last active August 29, 2015 14:00
How far does the normal baseball game get while being perfect
# Run against *.EV? in a file from <http://www.retrosheet.org/game.htm>
BEGIN {
FS=","
}
$1 == "id" {
if (awayisperfect) { print "perfect" }
if (homeisperfect) { print "perfect" }
awayisperfect = 1
@Plutor
Plutor / penalty-list-2013-avg-yards.txt
Created May 7, 2014 14:41
Most called penalties, most total yards, and most average yards in the 2013 season
16.2 Defensive Pass Interference
15.0 Roughing the Kicker
15.0 Interference with Opportunity to Catch
15.0 Illegal Peelback
15.0 Illegal Cut
15.0 Fair Catch Interference
15.0 Face Mask
15.0 Disqualification
15.0 Clipping
14.2 Personal Foul
@Plutor
Plutor / gist:16a490f2f79e29263a9b
Last active August 29, 2015 14:01
What Bill Belichick has done with the Patriots' first round draft picks
Data from http://www.prosportstransactions.com/football/DraftTrades/Years/
2000 (#16): Sent to Jets as compensation for his own hiring
2001 (#6): Drafted Richard Seymour
2002 (#32): Traded up to #21, drafted Dan Graham
2003 (#14): Acquired via trade for Drew Bledsoe, traded up to #13, drafted Ty Warren
2003 (#19): Traded down to 2nd round plus 2004 1st round
2004 (#21): Acquired via above trade, drafted Vince Wilfork
2004 (#32): Drafted Ben Watson
2005 (#32): Drafted Logan Mankins
distance_cache = {}
gcd_cache = {}
def DelacorteInit():
# TODO: This half of the initialization could be done faster.
for row1 in range(28):
for col1 in range(28):
for row2 in range(28):
row_distance = (row1 - row2) ** 2
for col2 in range(28):
distance_cache[row1, col1, row2, col2] = (
@Plutor
Plutor / README.md
Last active December 11, 2021 16:06
Belichick quote generator
$ python belichick_generator.py 

Q: Danny Amendola had a big kickoff return.

BB: Yeah, they have a complementary play that goes with it out of those same groups and same looks. They just shuffle them around the next week so after four or five games, you have a lot of different elements to the position that he plays and the coverages that he's involved with. But I think his running vision, ability to set up blocks and understanding blocking schemes as they relate to the kicking game – five, six guys that are pretty much on every team. Then you have your specialists and then you go play guard, you definitely know what the center is doing, maybe a little bigger role. They’ve been in a lot of different personnel groups in between up to the four receivers last week where they started both [Donte] Moncrief, [Hakeem] Nicks, [Reggie] Wayne and [T.Y.] Hilton. Plus, their backs are good receivers. It's really, you have all those personnel groups; you have a lot of elements of three real good pass rush skills, so

@Plutor
Plutor / nfl-pre-sos-vs-actual.awk
Last active August 29, 2015 14:15
NFL Strength of Schedule prediction correlation
# Results are in: https://docs.google.com/spreadsheets/d/1ucx9dgnYq83QDZv0nR1Ts1qXMQplqMRyiTlkJgZUQoU/edit?usp=sharing
#
# awk -f nfl-pre-sos-vs-actual.awk nfl-all-games.csv
BEGIN {
FS=","
print "Season,Team,Actual SOS,Predicted SOS"
}
/^Season/ { next }
Result result;
if (!Something(&result)) {
HandleError();
}
@Plutor
Plutor / UberBut.js
Last active December 6, 2019 08:57
Script that runs @UberBut
// Get a Wordnik API key: http://developer.wordnik.com/
var WORDNIK_API_KEY = "XXXX";
// Get a Twitter app key: https://apps.twitter.com/
var TWITTER_CONSUMER_KEY = "XXXX";
var TWITTER_CONSUMER_SECRET = "XXXX";
function Start() {
// Delete exiting triggers, if any
var triggers = ScriptApp.getProjectTriggers();
for (var i = 0; i < triggers.length; i++) {
@Plutor
Plutor / alphabet_minus_word.sh
Last active August 31, 2015 13:12
Longest words spellable with alphabet blocks minus a word
# We own a set of alphabet blocks. There are 24 of them: one letter on each
# (with drawings of things that start with that letter), and X, Y, and Z are all
# on one block. We took the letters for our daughters name (no repeats, phew!)
# and they sit on a shelf in her room. The rest are with her toys in the living
# room.
#
# Here's how I figured out the longest words I could spell with the remaining
# blocks (buchwald, plutarch, abruptly, upwardly, watchful, and wrathful).
cat $WORDFILE | # Replace with a word file on your machine, probably one in /usr/share/dict/ \