I hereby claim:
- I am czinn on github.
- I am charlesz (https://keybase.io/charlesz) on keybase.
- I have a public key ASACyIXAGkx7uTOvhdlNUR_ghRHnp-SgEE8XsVrDzbhP_Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
++++++++++[->+++++>+>>+>>>>>>+++++++>++++++++++>++++++++++++>++++++++++++>+++++++<<<<<<<<<<<<<<]>-->>+>>>+++>>>+++++>>+++++>++>--->----<<<<<<<<<<<[<<<+[->+>-[-<<+<+>>>]<<<[->>>+<<<]+>[<->[-]]<[->>---------->++++++++++<<<<[->+>+<<]>>[-<<+>>]+<[>-<[-]]>[-<++++++[-<<++++++++>++>]<-->>]<<<<+<]>]>[>>>>]+>-[->+>+<<]>>[-<<+>>]+<[>-<[-]]>[-<<<[-]>>>>>.>.>..<<<<<<+++>>]>-[-<+<+>>]<[->+<]+<[>-<[-]]>[-<<<[-]>>>>>>>>>.<.<..<<<+++++<]<<<[-<<<<[<<<<]>>>>[.>>>>]]<.<]456 |
# You can find a pretrained binary vector files or train your own using tools found at | |
# https://code.google.com/p/word2vec/ | |
# Sometimes it takes a while to find a path, but #fuckitshipit | |
# You can speed it up by decreasing the number of words loaded | |
# If you don't like your scale, try reversing the two words | |
MAX_WORDS_TO_LOAD = 50000 | |
import sys, struct, heapq | |
from queue import PriorityQueue |
var definitions = require('./definitions.js'); | |
function fixDefinition(def) { | |
if (/;/.test(def)) { | |
// split at ; and recombine | |
return def.split(';').map(fixDefinition).join(';'); | |
} | |
// remove all $ signs | |
def = def.replace(/\$/g, ''); |
# Requires PyPNG (https://pypi.python.org/pypi/pypng) | |
import png | |
from collections import defaultdict | |
import sys | |
import glob | |
# Colour palettes are in different orders on images. Convert to standard palette. | |
STANDARD_PALETTE = [(0, 0, 234), (0, 131, 199), (0, 211, 221), (2, 190, 1), (34, 34, 34), (130, 0, 128), (136, 136, 136), (148, 224, 68), (160, 106, 66), (207, 110, 228), (228, 228, 228), (229, 0, 0), (229, 149, 0), (229, 217, 0), (255, 167, 209), (255, 255, 255)] | |
PALETTE_MAP = {x: i for i, x in enumerate(STANDARD_PALETTE)} |