Skip to content

Instantly share code, notes, and snippets.

Jeff Thompson jeffThompson

Block or report user

Report or block jeffThompson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jeffThompson
jeffThompson / SplitSyllables.py
Last active Jan 22, 2017
Splits a word into syllables
View SplitSyllables.py
'''
SPLIT SYLLABLES
Jeff Thompson | 2016 | jeffreythompson.org
Requires this modified version of the CMU Pronouncing
dictionary by Susan Bartlett, Grzegorz Kondrak and Colin Cherry:
https://webdocs.cs.ualberta.ca/~kondrak/cmudict.html
Download and save to your project directory, or somewhere you can
easily reference it.
@jeffThompson
jeffThompson / preprocess.py
Last active Jan 18, 2017
Mod to Torch-rnn preprocess script letting you skip non-ascii characters
View preprocess.py
# -*- coding: utf-8 -*-
import argparse, json, os
import numpy as np
import h5py
import codecs
parser = argparse.ArgumentParser()
parser.add_argument('--input_txt', default='data/tiny-shakespeare.txt')
View ChicagoWirelessNetworkNames.txt
00:02:2d:0c:03:53
101
12InteractiveWorldHQ
14wabash
1911
1Gary
2156
21JUMPSTREET
24-7STAR
24seven
View CrosshatchImage.pde
float gridSize = 20;
boolean crosshatch = true;
PImage img;
void setup() {
size(1400, 788);
pixelDensity(displayDensity());
@jeffThompson
jeffThompson / KCS_SampleInput.txt
Created Jun 29, 2016
An algorithmically-generated sample file for writing data to casette tape using the Kansas City Standard
View KCS_SampleInput.txt
!!!!! """"" ##### $$$$$ %%%%% &&&&& ''''' ((((( ))))) ***** +++++ ,,,,, ----- ..... ///// 00000 11111 22222 33333 44444 55555 66666 77777 88888 99999 ::::: ;;;;; <<<<< ===== >>>>> ????? @@@@@ AAAAA BBBBB CCCCC DDDDD EEEEE FFFFF GGGGG HHHHH IIIII JJJJJ KKKKK LLLLL MMMMM NNNNN OOOOO PPPPP QQQQQ RRRRR SSSSS TTTTT UUUUU VVVVV WWWWW XXXXX YYYYY ZZZZZ [[[[[ \\\\\ ]]]]] ^^^^^ _____ ````` aaaaa bbbbb ccccc ddddd eeeee fffff ggggg hhhhh iiiii jjjjj kkkkk lllll mmmmm nnnnn ooooo ppppp qqqqq rrrrr sssss ttttt uuuuu vvvvv wwwww xxxxx yyyyy zzzzz {{{{{ ||||| }}}}} ~~~~~!!!!!"""""!!!!!#####!!!!!$$$$$!!!!!%%%%%!!!!!&&&&&!!!!!'''''!!!!!(((((!!!!!)))))!!!!
View ColoredPerlinNoise.pde
// the "resolution" of the noise
float inc = 0.008;
// "rate of change" for the noise
float zInc = 0.1;
// min/max values for noise
float hueMin = 0; // hue
float hueMax = 50;
@jeffThompson
jeffThompson / GenerateSlippyMapTiles.py
Last active May 10, 2019
Takes a large image as the input, outputs map tiles at the appropriate size and file structure for use in frameworks like leaflet.js, MapBox, etc.
View GenerateSlippyMapTiles.py
# -*- coding: utf-8 -*-
import argparse, magic, re, os, math, glob, shutil
'''
GENERATE SLIPPY MAP TILES
Jeff Thompson | 2016 | jeffreythompson.org
Takes a large image as the input, outputs map tiles
at the appropriate size and file structure for use
@jeffThompson
jeffThompson / IsCountableNoun.py
Last active Jul 15, 2019
A Python function to test if a noun is countable. Too many requests will get you locked out, so use sparingly.
View IsCountableNoun.py
# -*- coding: utf-8 -*-
import re, urllib2, json
def countable_noun(thing):
'''
searches Google NGram to see if a word is a countable/mass noun
returns True if countable, False if not
@jeffThompson
jeffThompson / JPEGCompression
Created Apr 10, 2016
A Processing sketch to save JPG images with variable compression
View JPEGCompression
/*
JPEG COMPRESSION
Jeff Thompson | 2016 | www.jeffreythompson.org
For web-based images, controlling the compression of a JPG
can optimize dimensions and file size. The built-in save()
command for Processing doesn't give us this control, but we
can use Java's ImageIO to add this functionality.
*/
@jeffThompson
jeffThompson / Apollo11GuidanceComputerVertAndNounList.txt
Created Feb 15, 2016
A list of "nouns" and "verbs" to control the Apollo 11 guidance computer.
View Apollo11GuidanceComputerVertAndNounList.txt
APOLLO 11 GUIDANCE COMPUTER: VERB AND NOUN LIST
https://en.wikipedia.org/wiki/Apollo_Guidance_Computer#/media/File:Agc_verb-noun-list.jpg
VERB LIST
50 PLEASE PERFORM
51 PLEASE MARK
53 PLEASE MARK ALT LOG
54 REND COAS MARK
56 TERMINATE P20
58 STICKFLAG (R) V50N18 FLAG(S)
You can’t perform that action at this time.