- processor: controls operation of computer, data processing functions
- main memory: stores data and programs, typically volatile
- I/O modules: move data between computer and external environment, e.g. disks, internet, terminals
- system bus: communciation between three systems above
This file contains 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
# 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)} |
This file contains 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
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, ''); |
This file contains 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
# 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 |
This file contains 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
++++++++++[->+++++>+>>+>>>>>>+++++++>++++++++++>++++++++++++>++++++++++++>+++++++<<<<<<<<<<<<<<]>-->>+>>>+++>>>+++++>>+++++>++>--->----<<<<<<<<<<<[<<<+[->+>-[-<<+<+>>>]<<<[->>>+<<<]+>[<->[-]]<[->>---------->++++++++++<<<<[->+>+<<]>>[-<<+>>]+<[>-<[-]]>[-<++++++[-<<++++++++>++>]<-->>]<<<<+<]>]>[>>>>]+>-[->+>+<<]>>[-<<+>>]+<[>-<[-]]>[-<<<[-]>>>>>.>.>..<<<<<<+++>>]>-[-<+<+>>]<[->+<]+<[>-<[-]]>[-<<<[-]>>>>>>>>>.<.<..<<<+++++<]<<<[-<<<<[<<<<]>>>>[.>>>>]]<.<]456 |
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: