Skip to content

Instantly share code, notes, and snippets.

View sanity's full-sized avatar

Ian Clarke sanity

View GitHub Profile
{"notify_request": {"timestamp":"2013-01-28 20:06:06","user_id_64":6327291030808759029,"response_time_ms":27,"fail":true,"error":"Invalid HTTP response code 1425806080","error_id":13,"tags":[{"id":1128022,"auction_id_64":6650444562080857093,"payment_rule_id":196067,"notify_type": "lost"}],"responses": []}}
-nosplash
--launcher.defaultAction
openFile
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_08.jdk/Contents/Home/bin/java
-vmargs
-Xincgc
-Xss1m
-Duser.name=FirstName LastName
-Dfile.encoding=UTF-8
Full thread dump Java HotSpot(TM) 64-Bit Server VM (23.4-b01 mixed mode):
"Worker-9" prio=5 tid=0x0000000112381000 nid=0x5c07 in Object.wait() [0x0000000119d24000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0000000705b0b468> (a org.eclipse.core.internal.jobs.WorkerPool)
at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:188)
- locked <0x0000000705b0b468> (a org.eclipse.core.internal.jobs.WorkerPool)
at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:220)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:50)
ian@vega ~/Applications/eclipse/Eclipse.app/Contents/MacOS> cat eclipse.ini
-nosplash
--launcher.defaultAction
openFile
-vmargs
-Xincgc
-Xss1m
-Dfile.encoding=UTF-8
-Dosgi.requiredJavaVersion=1.7
-Declipse.p2.unsignedPolicy=allow
dog = 13
cat = 8
woof A B = A+B
MacOS $ cat eclipse.ini
-startup
../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.101.v20120109-1504
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
final LinkedList<PredictionCalibrator.Prediction> predictions = Lists.newLinkedList();
for (int x = 0; x < 10000; x++) {
final double prediction = Misc.random.nextDouble();
final double outcome = (Misc.random.nextDouble() < Math.pow(prediction, 2)) ? 1.0 : 0.0;
predictions.add(new Prediction(prediction, outcome));
}
final PredictionCalibrator pc = new PredictionCalibrator(predictions);
for (final Prediction p : pc.calibrationSet) {
System.out.println(p.prediction + "\t" + p.outcome);
Nov 15 13:53:49 ip-10-71-94-36 kernel: [3707038.529104] java invoked oom-killer: gfp_mask=0x280da, order=0, oom_adj=0
Nov 15 13:53:49 ip-10-71-94-36 kernel: [3707038.529109] java cpuset=/ mems_allowed=0
Nov 15 13:53:49 ip-10-71-94-36 kernel: [3707038.529112] Pid: 9365, comm: java Not tainted 2.6.32-305-ec2 #9-Ubuntu
Nov 15 13:53:49 ip-10-71-94-36 kernel: [3707038.529114] Call Trace:
Nov 15 13:53:49 ip-10-71-94-36 kernel: [3707038.529121] [<ffffffff8107c47c>] ? cpuset_print_task_mems_allowed+0x8c/0xc0
Nov 15 13:53:49 ip-10-71-94-36 kernel: [3707038.529127] [<ffffffff810b0cd3>] oom_kill_process+0xe3/0x210
Nov 15 13:53:49 ip-10-71-94-36 kernel: [3707038.529129] [<ffffffff810b0e50>] __out_of_memory+0x50/0xb0
Nov 15 13:53:49 ip-10-71-94-36 kernel: [3707038.529131] [<ffffffff810b0f0f>] out_of_memory+0x5f/0xc0
Nov 15 13:53:49 ip-10-71-94-36 kernel: [3707038.529134] [<ffffffff810b3a81>] __alloc_pages_slowpath+0x4c1/0x560
/*
* Here we will train a decision tree to tell whether someone is healthy,
* overweight, or underweight, based on 20 training examples.
/*
// Create our training dataset
final Set<Instance> instances = Sets.newHashSet();
for (int x = 0; x < 20; x++) {
// Create random height and weight
final double height = (4 * 12) + Misc.random.nextInt(3 * 12);
final Set<Instance> instances = Sets.newHashSet();
instances.add(Instance.create("sweat", "weight", 165, "height", 5, "sex", "male"));
instances.add(Instance.create("nosweat", "weight", 121, "height", 4, "sex", "female"));
instances.add(Instance.create("sweat", "weight", 172, "height", 7, "sex", "male"));
instances.add(Instance.create("sweat", "weight", 138, "height", 4, "sex", "female"));
instances.add(Instance.create("sweat", "weight", 152, "height", 5, "sex", "male"));
instances.add(Instance.create("nosweat", "weight", 182, "height", 4, "sex", "female"));
instances.add(Instance.create("nosweat", "weight", 151, "height", 5, "sex", "male"));
instances.add(Instance.create("nosweat", "weight", 124, "height", 6, "sex", "female"));
final TreeBuilder tb = new TreeBuilder();