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 / UploadDataOverWifi.ino
Last active May 15, 2019
How to upload data to a server with Arduino
View UploadDataOverWifi.ino
#include <SPI.h>
#include <WiFi101.h>
/*
UPLOAD DATA OVER WIFI
Jeff Thompson | 2017 | jeffreythompson.org
The great Arduino Wifi101 library includes lots of examples
of how to *get* data from the internet, but no examples on how
@jeffThompson
jeffThompson / GetFeatherMacAddress.ino
Created Mar 29, 2017
Extracts the MAC address from an Adafruit Feather M0 Wifi board
View GetFeatherMacAddress.ino
#include <SPI.h>
#include <WiFi101.h>
/*
GET FEATHER MAC ADDRESS
Jeff Thompson | 2017 | jeffreythompson.org
Extracts the MAC address from an Adafruit Feather
M0 Wifi board.
@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 Sep 21, 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
You can’t perform that action at this time.