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
public class Data | |
{ | |
@Module(name="test") | |
public static class Test | |
{ | |
@In(name="test") | |
public int test; | |
@Main | |
public void body() |
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
Process p = runtime.exec( | |
"arch -i386 /usr/bin/python " + script, | |
new String[]{ | |
"PATH=/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/texbin", | |
"PYTHONPATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages"}, | |
target); | |
BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream())); | |
BufferedReader ebr = new BufferedReader(new InputStreamReader(p.getErrorStream())); |
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.util.Arrays; | |
import java.util.List; | |
import javax.sound.midi.MidiSystem; | |
import javax.sound.midi.Synthesizer; | |
import javax.sound.midi.MidiChannel; | |
/** | |
* A little example showing how to play a tune in Java. | |
* |
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.Color; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.IOException; | |
import javax.imageio.ImageIO; | |
/** | |
* Simple demonstration of the bare necessities required to crate an image file | |
* @author Peter |
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
# -*- coding: utf-8 -*- | |
import matplotlib as mpl | |
mpl.use('Agg') | |
import matplotlib.pyplot as p | |
from matplotlib import colors | |
import numpy as n | |
import pylab | |
import scipy.stats as stats | |
from __builtin__ import 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
import static java.lang.System.currentTimeMillis; | |
import java.util.Arrays; | |
import java.util.Random; | |
public class Sandbox | |
{ | |
public static final Random RANDOM = new Random(); | |
public static double sumWith = 0; |
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
Compiled from "Sandbox.java" | |
public class Sandbox { | |
public static final java.util.Random RANDOM; | |
public static double sumWith; | |
public static double sumWithout; | |
public static double t0; |
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 scipy.misc as sm | |
import math | |
import random | |
import itertools as it | |
import matplotlib | |
import matplotlib.pyplot as pp | |
def combine(all, result, d=1, totalpoints = 0, totallogprob = 0): | |
""" | |
Computes the complete probability distribution over the total points. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer