-
Numbers always have exact expressions in data.
-
Numbers always have exact expressions in data if I restrict the significant digits I work with and round them off hard enough.
-
Multiplication is associative and commutative.
-
Multiplication is invertible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| from typing import NamedTuple | |
| from collections import Counter | |
| class QueueEntry(NamedTuple): | |
| id: int | |
| tickets: int | |
| wait_time: int = 0 | |
| def wait(self, tickets): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| combo_tables = { | |
| # JStris/TetrisFriends/etc. combo table | |
| "tf": [ | |
| [0,], | |
| [0,0,0,1,1,2,2,3,3,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5], | |
| [0,1,1,2,2,3,3,4,4,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6], | |
| [0,2,2,3,3,4,4,5,5,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7], | |
| [0,4,4,5,5,6,6,7,7,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9], | |
| ], | |
| # Worldwide Combos combo table |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import csv | |
| import sys | |
| import re | |
| import os | |
| from collections import Counter | |
| print("Building corpus...") | |
| nicknames = [] |
This week in Javscript fuckery:
const arr = [];
for (let a = 0; a < 10; ++a) {
arr.push(a);
}
console.log(arr);
What does this output?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| from math import floor, ceil | |
| from collections import Counter | |
| class Player: | |
| def __init__(self, id): | |
| self.id = id | |
| self.stars = 3 | |
| self.rock = 4 | |
| self.paper = 4 |