Skip to content

Instantly share code, notes, and snippets.

View nickodell's full-sized avatar

Nick ODell nickodell

  • Fort Collins, CO
View GitHub Profile
import random
def simulation(x):
subjects = 0
trials = 0
while True:
trials += 1
if random.random() < 0.30:
#Runs following code with 30% chance
subjects += 1
import urllib2
import json
url = "http://blockchain.info/charts/n-transactions?format=json"
page = urllib2.urlopen(url).read()
data = json.loads(page)['values']
data = map(lambda point: point['y'], data)
print int(sum(data))
@nickodell
nickodell / gist:3160520
Created July 22, 2012 18:01
arduino blink
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(1000);
dititalWrite(13, LOW);
delay(1000);
}
@nickodell
nickodell / gist:3120334
Created July 16, 2012 03:42
build.properties
dir.developement=C:\Users\Nick\Desktop\eclipse\workspace\EEmod\
@nickodell
nickodell / gist:3120283
Created July 16, 2012 03:32
Failed compile log
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar
Buildfile: C:\Users\Nick\Desktop\eclipse\workspace\EEmod\build.xml
recompile:
[exec] == MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
[exec] # found jad, ff, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, param csvs, astyle, astyle config
[exec] == Recompiling client ==
[exec] > Cleaning bin
[exec] > Recompiling
[exec] '"C:\Program Files\Java\jdk1.7.0_05\bin\javac" -Xlint:-options -deprecation -g -source 1.6 -target 1....' failed : 1
@nickodell
nickodell / gist:3120282
Created July 16, 2012 03:31
Tree against EE3
This file has been truncated, but you can view the full file.
Folder PATH listing
Volume serial number is 8A1F-8EC3
C:.
| build.properties
| build.xml
| log
| mcp62.zip
| tree
|
+---forge