Skip to content

Instantly share code, notes, and snippets.

View KevinGreene's full-sized avatar

Kevin Greene KevinGreene

View GitHub Profile
@KevinGreene
KevinGreene / image.py
Created December 31, 2013 01:30
Python Prime Number Viewer
from PIL import Image
height = 1039
width = 1039
im = Image.new("RGB", (width,height), "white")
pixels = im.load()
f = open('prime_colors', 'r')
for x in range(width):
@KevinGreene
KevinGreene / strangeloop.html
Created October 9, 2013 20:57
An example strangeloop private talk
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Tracking Millions of Ganks in Near Real Time</title>
<meta http-equiv="pragma" content="no-cache" />
@KevinGreene
KevinGreene / build.gradle
Created September 24, 2013 01:41
Sample build.gradle and gradle.properties - Comp 439 (Distributed Systems)
apply plugin: 'java'
apply plugin: 'groovy'
repositories {
mavenCentral()
}
dependencies {
compile 'org.antlr:antlr4:4.1'
compile 'org.codehaus.groovy:groovy-all:2.1.7'
@KevinGreene
KevinGreene / gist:6438133
Created September 4, 2013 14:55
Example error from setting valueTabuRatio. Looking further into the docs, it appears it is supposed to be an integer, seen here: http://docs.jboss.org/drools/release/6.0.0.CR2/optaplanner-javadoc/org/optaplanner/core/config/localsearch/decider/acceptor/AcceptorConfig.html Which contradicts the fact that it's a ratio, and the description here: ht…
:benchmarkException in thread "main" com.thoughtworks.xstream.converters.ConversionException: For input string: ".02" : For input string: ".02"
---- Debugging information ----
message : For input string: ".02"
cause-exception : java.lang.NumberFormatException
cause-message : For input string: ".02"
class : java.lang.Integer
required-type : java.lang.Integer
converter-type : com.thoughtworks.xstream.converters.SingleValueConverterWrapper
wrapped-converter : com.thoughtworks.xstream.converters.basic.IntConverter
line number : 114
@KevinGreene
KevinGreene / Github export to Pivotal CSV
Created August 10, 2013 04:48
Export github issues to pivotal Some minor updates to https://gist.github.com/unbracketed/3380407 to put it in a more typical Pivotal Tracker import format
import csv
import requests
GITHUB_USER = 'REDACTED'
GITHUB_PASSWORD = 'REDACTED'
REPO = 'USER/REPO' # format is username/repo
ISSUES_FOR_REPO_URL = 'https://api.github.com/repos/%s/issues' % REPO
AUTH = (GITHUB_USER, GITHUB_PASSWORD)