Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeff Thompson jeffThompson

View GitHub Profile
@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)
@jeffThompson
jeffThompson / MyFacebookAdPreferences.json
Created Dec 15, 2015
All the things Facebook knows about me, thinks it knows about me.
View MyFacebookAdPreferences.json
[{
"fbid": 6004114554024,
"name": "TechCrunch",
"type": "interest",
"subtype": "KEYWORD_TYPE_INTEREST_CLUSTER",
"topic": "News and entertainment",
"disambiguation_category": null
}, {
"fbid": 6003346592981,
"name": "Online shopping",
@jeffThompson
jeffThompson / FacebookCountryInfo.json
Created Dec 15, 2015
Info about countries, from a random Facebook page.
View FacebookCountryInfo.json
{
"countries": {
"US": "United States",
"CA": "Canada",
"GB": "United Kingdom",
"AR": "Argentina",
"AU": "Australia",
"AT": "Austria",
"BE": "Belgium",
"BR": "Brazil",
@jeffThompson
jeffThompson / MakerbotLayersGif.py
Last active Nov 30, 2015
A dumb little thing that makes an animated GIF from your Makerbot preview window. Start at Layer 0, run this script, and out comes a lovely GIF.
View MakerbotLayersGif.py
'''
MAKERBOT LAYERS >> GIF
Jeff Thompson | 2015 | www.jeffreythompson.org
A dumb little thing that makes an animated GIF from your Makerbot preview
window. Start at Layer 0, run this script, and out comes a lovely GIF.
EXAMPLE OUTPUT:
This sweet saber-toothed tiger skull:
@jeffThompson
jeffThompson / HotDogPlaylist.txt
Last active Nov 8, 2015
A playlist of hot dog themed songs, for the NJ Hot Dog Tour.
View HotDogPlaylist.txt
"Oh Susanna!"
Carl Weisman and the Singing Dogs
"Hot Dog"
Led Zeppelin
"Under the Boardwalk"
Jackson 5
"Hot Dog Song"
@jeffThompson
jeffThompson / WhichFilesAreMine.py
Created Oct 30, 2015
Gets a list of files that don't belong to my user.
View WhichFilesAreMine.py
'''
WHICH FILES ARE MINE?
Jeff Thompson | 2015 | www.jeffreythompson.org
'''
import os, pickle, pprint
folder = '/'
View BashoHaiku.txt
Scarecrow in the hillock
Paddy field --
How unaware! How useful!
Passing through the world
Indeed this is just
Sogi's rain shelter.
A wild sea-
In the distance over Sado
@jeffThompson
jeffThompson / AllPokemonRedObjects.txt
Created Oct 10, 2015
All items from the original GameBoy version of "Pokemon Red".
View AllPokemonRedObjects.txt
Antidote
Awakening
Bicycle
Bike Voucher
Burn Heal
Calcium
Carbos
Card Key
Coin
Coin Case
You can’t perform that action at this time.