I hereby claim:
- I am carl297r on github.
- I am carl297r (https://keybase.io/carl297r) on keybase.
- I have a public key whose fingerprint is 877C C76E 8B3D 233F 14F2 8788 5A81 D87C 7BBD CC83
To claim this, I am signing this object:
| import java.io.File | |
| csvwrite(new File("x-matrix.csv"),X) | |
| val X3 = csvread(new File("x-matrix.csv")) |
I hereby claim:
To claim this, I am signing this object:
| // Here is my dummy row data for a single commodity. Only has 2 things, price and holding but yours will have more like date. | |
| // I left out date because it was needed to calc sum product but not hard to include. | |
| case class Row(price: Double, holding: Double) | |
| // This function is generates my stream of dummy row prices and holdings | |
| def RowStream(start: Row): Stream[Row] = start #:: RowStream(Row(start.price+1, start.holding + 2)) | |
| // Here are my streams for NG, CL & AG | |
| val ng = RowStream(Row(1,1)) | |
| val cl = RowStream(Row(100,10)) |
| // See https://gist.github.com/carl297r/10019568 |
| package demo | |
| // Adapted from Jonas Bonér's example https://gist.github.com/jboner/9990435 | |
| import akka.actor.{Props, ActorSystem} | |
| import akka.persistence.{EventsourcedProcessor, SnapshotOffer} | |
| object PersistedPingPong extends App { | |
| case object Ball //The Command |