This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.io.*; | |
import org.openqa.selenium.*; | |
import org.openqa.selenium.firefox.*; | |
import org.openqa.selenium.htmlunit.*; | |
import org.apache.commons.io.*; | |
public class Screeny { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.6.+' | |
} | |
} | |
apply plugin: 'android-library' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import urllib, hashlib | |
import sys, os, os.path | |
if not len(sys.argv) == 2: | |
print "usage: imdur.py <a word>" | |
sys.exit(1) | |
if not (len(sys.argv[1]) == 5 or len(sys.argv[1]) > 7): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import numpy as np | |
from PIL import Image | |
filenames = ["panda1.png", "panda2.png", "panda3.png", "panda4.png"] | |
images = [Image.open(fn) for fn in filenames] | |
images = [im.convert('RGB') for im in images] | |
levels = np.zeros((16, 16, 9), np.int16) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.geom.*; | |
final int WIDTH = 60; | |
final int HEIGHT = 32; | |
final int ZOOM = 4; | |
final int STEPS = 64; | |
int[][][] screen; | |
Slice[] slices; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var filter = document.createElement('style'); | |
filter.innerHTML = ".section-feed-filters { display: block; }"; | |
function hider(target) { | |
if($(this).prop('checked')) { | |
$(target).css({ | |
"visibility":"visible", | |
"height":"auto", | |
"margin":"2em", | |
"border-collapse":"initial" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from http://www.swharden.com/blog/2010-03-05-realtime-fft-graph-of-audio-wav-file-or-microphone-input-with-python-scipy-and-wckgraph/ | |
import pyaudio | |
import scipy | |
import struct | |
import scipy.fftpack | |
from Tkinter import * | |
import threading | |
import time, datetime | |
import wckgraph |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# DESCRIPTION: compiles c++ project for Spark Core and flashes it to core connected in DFU mode | |
# USAGE: sparkflash <main app sourcefile> <source files...> | |
# EXAMPLE: sparkflash snowglobe.ino *.cpp *.h | |
# NOTE: assumes the following directory structure: | |
# $HOME/bin/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib as mpl | |
mpl.use('Agg') | |
import matplotlib.pyplot as plt | |
R = [15620.0, 31000.0, 62000.0, 124000.0, 250000.0, 500000.0, 1000000.0, 2000000.0] | |
R8 = 3922 | |
VCC = 5 | |
def int_to_bit_array(i, length): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Paper extends SurfaceView implements SurfaceHolder.Callback { | |
private PaperThread paperThread = null; | |
public Paper(Context context) { | |
super(context); | |
getHolder().addCallback(this); | |
paperThread = new PaperThread(getHolder(), this); | |
} |