Skip to content

Instantly share code, notes, and snippets.

View jbum's full-sized avatar

Jim Bumgardner jbum

View GitHub Profile
@jbum
jbum / gist:f9c97d1d64ce9e1d3072
Created April 1, 2015 18:36
Incremental Drift on 32x32 grid
// Incremental Drift on 32x32 grid - Jim Bumgardner
//
int nbrPoints = 1024;
int cx,cy;
float crad;
float cycleLength, speed;
int startOffset = 0;
int counter =0 ;
boolean isSquare = true;
@jbum
jbum / dreamImage.py
Created July 12, 2015 20:39
jbum's DeepDream scripts
# DreamImage.py - parameterized deepdream with support for multiple models,
# auto-image-scaling, guided dreaming and kaleido mode (self-guided).
# Jim Bumgardner 7-12-15
# this assumes the deploy file is called 'deploy.prototxt' - you may need
# to rename it if using a different model such as googlenet_places205.
# sample invocations that produce nice results:
# python dreamImage.py -i $1.jpg -model ../../caffe/models/googlenet_places205 -end inception_3a/output -iter 20 -octaves 5 -o $1_m3a.jpg
# python dreamImage.py -i $1.jpg -model ../../caffe/models/googlenet_places205 -end inception_3b/output -iter 20 -octaves 5 -o $1_m3b.jpg
PImage myImage;
void setup()
{
size(500,500);
myImage = loadImage("test.png");
}
void draw()
{
@jbum
jbum / spiral_faceplate.pde
Created August 22, 2015 18:25
Processing sketch to produce fibonacci faceplate
// Jim Bumgardner 2015
import processing.pdf.*;
boolean outputPDF = true;
boolean outputNumbers = false;
boolean addFrameHoles = true;
String outputFileName = "test_spiral_11_5";
float mmToPoints = 2.83464567;
float mmtoInches = 0.0393701;
# Hidato
#
# Sample Hidato Solver - Jim Bumgardner
from Numberjack import *
def get_neighbors(idx, width, height): # get list of indices of neighbor cells
cx = idx % width
cy = idx // width
nebs = []
# Hidato
#
# Sample Hidato Solver - Jim Bumgardner
from Numberjack import *
import random
def get_neighbors(idx, width, height): # get list of indices of neighbor cells
cx = idx % width
cy = idx // width
# KenKen/Inky Solver using NumberJack - Jim Bumgardner
from Numberjack import *
#
# Ensure that the sum of the segments
# in cc == res
#
bStats = {'cnt':0,'failures':0,'backtracks':0,'walltime':0,'propags':0,'checks':0}
# KenKen/Inky Solver using NumberJack - Jim Bumgardner
from Numberjack import *
#
# Ensure that the sum of the segments
# in cc == res
#
bStats = {'cnt':0,'failures':0,'backtracks':0,'walltime':0,'propags':0,'checks':0}
# KenKen/Inky Solver using NumberJack - Jim Bumgardner
from Numberjack import *
#
# Ensure that the sum of the segments
# in cc == res
#
bStats = {'cnt':0,'failures':0,'backtracks':0,'walltime':0,'propags':0,'checks':0}
# KenKen/Inky Solver using NumberJack - Jim Bumgardner
from Numberjack import *
#
# Ensure that the sum of the segments
# in cc == res
#
bStats = {'cnt':0,'failures':0,'backtracks':0,'walltime':0,'propags':0,'checks':0}