Skip to content

Instantly share code, notes, and snippets.

View jeffThompson's full-sized avatar

Jeff Thompson jeffThompson

View GitHub Profile
xsot /
Last active November 6, 2022 15:05
sed maze solver


sed -E -f solver.sed input where input is a file containing the maze.

For best results, resize your terminal to match the height of the maze. To disable animations, delete the lines containing p.

Maze format

The solver assumes the following:

  • The maze only contains the characters # \nSE
  • Every line has the same number of characters
  • There is only one start (S) and end (E)
awjuliani / DCGAN.ipynb
Last active May 19, 2020 07:12
An implementation of DCGAN in Tensorflow and Python.
View DCGAN.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
yrevar / imagenet1000_clsidx_to_labels.txt
Last active September 30, 2023 07:17
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
View imagenet1000_clsidx_to_labels.txt
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
kylemcdonald /
Last active July 25, 2019 09:33
Google Suggest results for a query followed by the every string.lowercase letter.
import argparse
import string
import requests
import time
parser = argparse.ArgumentParser(
description='Get all Google Suggest results for a query.')
parser.add_argument('--sleep', type=float, default=0.1)
parser.add_argument('--verbose', action='store_true')
blixt /
Last active November 5, 2021 13:42
Testing random number generators with DieHarder
danharper / background.js
Last active September 13, 2023 16:58
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
View background.js
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
tullyhansen / gist:7621632
Last active October 10, 2022 13:11
Draft spec 0.3 for a bot taxonomy (see also #botALLY
View gist:7621632
# Towards a Taxonomy of Twitter Bots
## Intro
- towards a definition - autonomous non-human agents on Twitter
- critical thinking - MECE, rabbit rule, holding hands
- patterns of behaviour, rather than content
- Twitter largely a textual medium
- crossover between two broadest categories (automated/event-driven), but largely one or the other (maybe?)
- some bots will exhibit both behaviours (active/reactive), but tend to favour one (most commonly, tweeters will also exhibit conversationalist behaviours)
19h / reset.js
Created February 19, 2013 22:51
Node.js — Clear Terminal / Console. Reset to initial state.
View reset.js
console.reset = function () {
return process.stdout.write('\033c');
fvianello / Applescript to open selected file in finder with specific editor
Created February 20, 2012 09:55
This Applescript take the selected file in Finder and open it with Sublime Text 2 (~/bin/subl). Using Alfred you can bind a global hotkey for this script, so you can edit your files with just a keypress, without worrying about the default editor.
View Applescript to open selected file in finder with specific editor
tell application "Finder"
set filePath to (POSIX path of (target of front window as alias))
set fileAlias to the selection as alias
set fileName to name of fileAlias
do shell script "~/bin/subl " & filePath & fileName
end tell
josephwegner / jquery-hideIdleCursor.js
Created September 20, 2011 12:31
Hide your cursor on a web page when it is idle. Great if you're using a web page for some sort of TV Display and don't want the cursor messing things up.
View jquery-hideIdleCursor.js
//Requires jQuery -
$(document).ready(function() {
var idleMouseTimer;
var forceMouseHide = false;
$("body").css('cursor', 'none');
$("#wrapper").mousemove(function(ev) {
if(!forceMouseHide) {
$("body").css('cursor', '');