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.Stack; | |
/** | |
* | |
*/ | |
public class Circuits { | |
class Position { | |
int node; | |
int cost; Position(int node, int cost) { this.node = node; this.cost = cost; } | |
} |
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
{ | |
"Type" : "Notification", | |
"MessageId" : "35ecbe70-f71e-42d7-b099-720e3d5aed0b", | |
"TopicArn" : "arn:aws:sns:us-east-1:663000815183:alarm-test", | |
"Subject" : "OK: \"alarm-test\" in US - N. Virginia", | |
"Message" : "{\"AlarmName\":\"alarm-test\",\"AlarmDescription\":null,\"AWSAccountId\":\"663000815183\",\"NewStateValue\":\"OK\",\"OldStateValue\":\"INSUFFICIENT_DATA\",\"NewStateReason\":\"Threshold Crossed: 1 datapoint (1.0) was not greater than or equal to the threshold (2.0).\",\"StateChangeTime\":\"2012-03-23T00:01:43.726+0000\",\"Region\":\"US - N. Virginia\",\"Trigger\":{\"MetricName\":\"ApproximateNumberOfMessagesVisible\",\"Namespace\":\"AWS/SQS\",\"Statistic\":\"AVERAGE\",\"Unit\":null,\"Dimensions\":[{\"name\":\"QueueName\",\"value\":\"fault-handling-test\"}],\"Period\":60,\"EvaluationPeriods\":1,\"ComparisonOperator\":\"GreaterThanOrEqualToThreshold\",\"Threshold\":2.0}}", | |
"Timestamp" : "2012-03-23T00:01:43.825Z", | |
"SignatureVersion" : "1", | |
"Signature" : "GWVHb9si6CVuk34avcl4iqBi8MNNXJRsDsA |
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
Index: ../../src/apache-camel-2.8.4/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsConsumer.java | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- ../../src/apache-camel-2.8.4/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsConsumer.java (revision ) | |
+++ ../../src/apache-camel-2.8.4/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsConsumer.java (revision ) | |
@@ -16,22 +16,13 @@ | |
*/ | |
package org.apache.camel.component.aws.sqs; |
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
Index: ../../src/apache-camel-2.8.4/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsConsumer.java | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- ../../src/apache-camel-2.8.4/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsConsumer.java (revision ) | |
+++ ../../src/apache-camel-2.8.4/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsConsumer.java (revision ) | |
@@ -16,22 +16,13 @@ | |
*/ | |
package org.apache.camel.component.aws.sqs; |
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 akka.actor.ActorRef; | |
import akka.camel.*; | |
import com.amazonaws.auth.AWSCredentials; | |
import com.amazonaws.auth.PropertiesCredentials; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.UnsupportedEncodingException; | |
import java.net.URLEncoder; |
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 com.google.common.base.Joiner; | |
import java.io.*; | |
import java.util.*; | |
import static java.lang.System.out; | |
import static java.lang.String.format; | |
public class DraainageDraaaaainage { | |
private final int[][] elevations; | |
private final Node[][] nodes; |
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 com.google.common.base.Predicate; | |
import com.google.common.collect.Iterables; | |
import com.google.common.collect.Lists; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.List; |
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
akka:event-driven:dispatcher:global-9@5786, prio=5, in group 'main', status: 'RUNNING' | |
at MySupervisor.preStart(MySupervisor.java:121) | |
at akka.actor.LocalActorRef.performRestart$1(ActorRef.scala:1003) | |
at akka.actor.LocalActorRef$$anonfun$1.apply$mcZ$sp(ActorRef.scala:1031) | |
at akka.actor.LocalActorRef$$anonfun$1.apply(ActorRef.scala:1021) | |
at akka.actor.LocalActorRef$$anonfun$1.apply(ActorRef.scala:1021) | |
at akka.util.ReentrantGuard.withGuard(LockUtil.scala:20) | |
at akka.actor.LocalActorRef.attemptRestart$1(ActorRef.scala:1021) | |
at akka.actor.LocalActorRef.restart(ActorRef.scala:1057) | |
at akka.actor.LocalActorRef.handleTrapExit(ActorRef.scala:947) |
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
package com.puttyjar.metagame | |
import scalala.scalar._; | |
import scalala.tensor.::; | |
import scalala.tensor.mutable._; | |
import scalala.tensor.dense._; | |
import scalala.tensor.sparse._; | |
import scalala.library.Library._; | |
import scalala.library.LinearAlgebra._; | |
import scalala.library.Statistics._; |
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 os, json, csv | |
os.chdir("/Users/dcarleton/workspace/upload") | |
jsons = filter(lambda f: f.endswith(".json"), os.listdir(".")) | |
for file in jsons: | |
j = json.load(open(file)) | |
csv_file = open(file + ".csv", "w") | |
c = csv.writer(csv_file) |