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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.test</groupId> | |
<artifactId>raken</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<repositories> | |
<repository> | |
<snapshots> | |
<enabled>false</enabled> |
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.{Actor, ActorSystem, Props} | |
import akka.http.Http | |
import akka.http.model.HttpMethods.POST | |
import akka.http.model.{HttpRequest, HttpResponse} | |
import akka.io.IO | |
import akka.stream.scaladsl.Flow | |
import akka.stream.{FlowMaterializer, MaterializerSettings} | |
import scala.concurrent.Future | |
import scala.concurrent.duration._ |
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.nio.charset.Charset | |
import akka.actor.{Actor, ActorSystem, Props} | |
import akka.http.Http | |
import akka.http.model.HttpMethods.POST | |
import akka.http.model.HttpResponse | |
import akka.io.IO | |
import akka.stream.scaladsl.Flow | |
import akka.stream.{FlattenStrategy, FlowMaterializer, MaterializerSettings} |
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
[INFO] [07/18/2014 11:06:01.692] [default-akka.actor.default-dispatcher-7] [akka://default/user/IO-HTTP/flow-1-1-map/flow-4-2-splitWhen/$a] Message [akka.stream.actor.ActorConsumer$OnComplete$] from Actor[akka://default/user/IO-HTTP/flow-1-1-map/flow-4-2-splitWhen#-1685653869] to Actor[akka://default/user/IO-HTTP/flow-1-1-map/flow-4-2-splitWhen/$a#-1803432808] was not delivered. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. | |
[INFO] [07/18/2014 11:06:01.692] [default-akka.actor.default-dispatcher-7] [akka://default/user/IO-HTTP/flow-1-1-map/flow-4-3-map/flow-7-1-prefixAndTail/$a] Message [akka.stream.actor.ActorConsumer$OnComplete$] from Actor[akka://default/user/IO-HTTP/flow-1-1-map/flow-4-3-map/flow-7-1-prefixAndTail#-1439727596] to Actor[akka://default/user/IO-HTTP/flow-1-1-map/flow-4-3-map/flow-7-1-prefixAndTail/$a#-14470719] was not delivered. [2] dead letters encountered. This loggin |
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.nio.charset.Charset | |
import akka.actor.{Actor, ActorSystem, Props} | |
import akka.http.Http | |
import akka.http.model.{HttpResponse, HttpRequest} | |
import akka.io.IO | |
import akka.stream.scaladsl.Flow | |
import akka.stream.{FlowMaterializer, MaterializerSettings, Transformer} | |
import akka.util.ByteString |
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/python | |
import fileinput | |
import sys | |
for line in fileinput.input(): | |
split_line = line.split(" ") | |
sys.stdout.write("%s %s %s" % (split_line[0], split_line[1], " ".join(split_line[4:]))) |
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/python | |
import glob | |
for log in glob.glob("**/*.log"): | |
f = open(log, "r") | |
mod_lines = [] | |
for line in f: | |
split_line = line.split(" ") | |
mod_lines.append("%s %s %s" % (split_line[0], split_line[1], " ".join(split_line[4:]))) |
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
machines { | |
machine {} | |
} | |
netprobes { | |
monitor-probe {} | |
} | |
gateways { | |
cluster-one-gateway { |
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
log.info("Starting single node connected to two gateways") | |
val baseConfig = raw( | |
""" | |
machines { | |
machine {} | |
} | |
gateways { | |
gatewayA {} |
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
mbarton@itrspc170:~/scratch/countdown_game$ python countdown_numbers.py -c 2 4 | |
numbers are [1, 4, 25, 50, 75, 100] | |
target is 410 | |
100 [ INITIAL_STATE ] | |
400 [ 4 * 100 = 400 ] | |
404 [ 4 * 100 = 400, 1 + 400 = 401, 75 / 25 = 3, 3 + 401 = 404 ] | |
405 [ 4 * 100 = 400, 50 + 75 = 125, 125 / 25 = 5, 5 + 400 = 405 ] | |
409 [ 50 + 75 = 125, 1 + 100 = 101, 4 * 101 = 404, 125 / 25 = 5, 5 + 404 = 409 ] | |
408 [ 50 / 25 = 2, 2 + 100 = 102, 4 * 102 = 408 ] | |
Solution not found. Best was 408. |
OlderNewer