Skip to content

Instantly share code, notes, and snippets.

Jeff Thompson jeffThompson

View GitHub Profile
@xsot
xsot / instructions.md
Last active May 24, 2020
sed maze solver
View instructions.md

Usage

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
awjuliani / DCGAN.ipynb
Last active May 19, 2020
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
yrevar / imagenet1000_clsidx_to_labels.txt
Last active Aug 3, 2020
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
kylemcdonald / suggest-all.py
Last active Jul 25, 2019
Google Suggest results for a query followed by the every string.lowercase letter.
View suggest-all.py
import argparse
import string
import requests
import time
parser = argparse.ArgumentParser(
description='Get all Google Suggest results for a query.')
parser.add_argument('query')
parser.add_argument('--sleep', type=float, default=0.1)
parser.add_argument('--verbose', action='store_true')
@blixt
blixt / TestingRNGs.md
Last active Dec 10, 2019
Testing random number generators with DieHarder
View TestingRNGs.md

Testing RNGs with Dieharder

This guide is specifically for pseudo-random number generators (PRNGs) written in JavaScript, and tested in Mac OS X.

Prerequisites

Homebrew

@danharper
danharper / background.js
Last active Aug 2, 2020
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
tullyhansen / gist:7621632
Last active Jun 17, 2017
Draft spec 0.3 for a bot taxonomy (see also http://i.imgur.com/bKXNQ0V.png) #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
19h / reset.js
Created Feb 19, 2013
Node.js — Clear Terminal / Console. Reset to initial state.
View reset.js
console.reset = function () {
return process.stdout.write('\033c');
}
@josephwegner
josephwegner / jquery-hideIdleCursor.js
Created Sep 20, 2011
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 - http://code.jquery.com/jquery-1.6.4.min.js
$(document).ready(function() {
var idleMouseTimer;
var forceMouseHide = false;
$("body").css('cursor', 'none');
$("#wrapper").mousemove(function(ev) {
if(!forceMouseHide) {
$("body").css('cursor', '');
You can’t perform that action at this time.