This file contains 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
# so the lib can be found when the test is run | |
export LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH | |
# alternatively put the .so generated after running make someplace where the system will find it |
This file contains 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
# download & build Julia | |
cd /path/to/where/you/want/julia/to/be | |
git clone git://github.com/JuliaLang/julia.git | |
cd julia | |
make # ...wait 20 hours (or have a faster computer than I) | |
# install prerequisites for IJulia | |
sudo apt-get install pip | |
sudo pip install ipython | |
sudo pip install jinja2 tornado pyzmq |
This file contains 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
$(".tty").prepend( '<div style="float: right;"><canvas id="television" width="192" height="128" style="background-color: lightblue;">xbetahack ERROR: html5 canvas is missing.</canvas></div>'); | |
bhack = { | |
tv: { | |
canvas: null, | |
width: 96, | |
height: 64, | |
pos: 0, | |
fill: function(col) { |
This file contains 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.*; | |
import java.awt.image.*; | |
import java.awt.event.KeyEvent; | |
Robot player; | |
BufferedImage capture = null; | |
PImage converted = null; | |
void setup() { |
This file contains 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
all: beta_test.jsim | |
java -jar ~/bin/jsim/clisim.jar -g $< | |
benmark: beta_test.jsim | |
@java -jar ~/bin/jsim/clisim.jar -g $< | json benmark | |
.PHONY: all |
This file contains 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, serial | |
from operator import eq | |
ser = serial.Serial('/dev/ttyUSB0', 9600) | |
init = [0x61, 0x65, 0x61] | |
delimiter = [0x3F, 0x1C, 0x1B] | |
ok = [0x30] | |
errors = [0x31, 0x32, 0x34, 0x39] |
This file contains 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
(function() { | |
ctx.clearRect(0, 0, canvas.width, canvas.height); | |
ctx.fillRect(100, 100, 100, 100); | |
for(var i = 0; i < sound.length; i++) { | |
sound[i] = Math.random() * 2 - 1; | |
} | |
}) |
This file contains 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
(function() { | |
if(!document.time) document.time = 0; | |
document.time++; | |
var t = document.time; | |
for(var i = 0; i < sound.length; i++) { | |
sound[i] = (t*(((t>>12)|(t>>8))&(63&(t>>4))))/0xff % 1; | |
t++; | |
} |
This file contains 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
/** | |
* Written by jmptable for 6.005 problem set 0 artwork problem | |
* run in [processing](http://processing.org/) | |
*/ | |
import java.awt.Color; | |
import java.util.*; | |
import javax.swing.*; | |
import java.io.File; |
This file contains 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/zsh | |
ipython nbconvert "$1" | |
NAME=$(basename "$1" .ipynb) | |
wkhtmltopdf "$NAME.html" "$NAME.pdf" | |
rm "$NAME.html" |
OlderNewer