- Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
- Models and Issues in Data Stream Systems
- Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
- Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
- [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&rep=rep1&t
This file contains hidden or 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
| From Theory to Practice: Plug and Play with Succinct Data Structures - Simon Gog, Timo Beller, Alistair Moffat & Matthias Petri (http://arxiv.org/pdf/1311.1249v1.pdf) | |
| Succinct Data Structures for Retrieval and Approximate Membership - Martin Dietzfelbinger and Rasmus Pagh (http://www.itu.dk/people/pagh/papers/bloomier.pdf) | |
| Lecture 17 in Erik Demaine's 6.851 (https://courses.csail.mit.edu/6.851/spring12/lectures/L17.html) | |
| Succinct Data Sstructures by Edward Kmett (https://www.youtube.com/watch?v=uA0Z7_4J7u8) | |
| Succinct Trees in Practice by Diego Arroyuelo, Rodrigo Ćanova, †Gonzalo Navaror Kunihiko Sadakane http://users.dcc.uchile.cl/~darroyue/papers/alenex2010.pdf | |
This file contains hidden or 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
| scala> List("a", "b", "AA", "d") | |
| res0: List[String] = List(a, b, AA, d) | |
| // List.sortBy, List.sorted and TreeMap all take an implicit scala.math.Ordering | |
| // just define the following at the top of StorageRepoQueries | |
| scala> object CaseInsensitiveOrdering extends Ordering[String] { | |
| | def compare(a: String, b: String) = a.toLowerCase compare b.toLowerCase | |
| | } | |
| defined module CaseInsensitiveOrdering |
This file contains hidden or 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
| Welcome to Scala version 2.10.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_51). | |
| Type in expressions to have them evaluated. | |
| Type :help for more information. | |
| scala> import com.redis._ | |
| import com.redis._ | |
| scala> import akka.actor.{ Actor, ActorSystem, Props } | |
| import akka.actor.{Actor, ActorSystem, Props} |
This file contains hidden or 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
| Welcome to Scala version 2.10.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_51). | |
| Type in expressions to have them evaluated. | |
| Type :help for more information. | |
| scala> case class Foo(i: Int) | |
| defined class Foo | |
| scala> Vector(Foo(1), Foo(2), Foo(3)) | |
| res0: scala.collection.immutable.Vector[Foo] = Vector(Foo(1), Foo(2), Foo(3)) |
This file contains hidden or 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
| val stages = Seq( | |
| Some(new ResponseHandling), | |
| Some(new Serializing), | |
| backpressureBufferSettings map { | |
| case BackpressureBufferSettings(lowBytes, highBytes, maxBytes) => | |
| new BackpressureBuffer(lowBytes, highBytes, maxBytes) | |
| } | |
| ).flatten.reduceLeft(_ >> _) | |
| TcpPipelineHandler.withLogger(log, stages) |
This file contains hidden or 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
| @volatile var callbackExecuted = false | |
| val ks = (1 to 10).map(i => s"client_key_$i") | |
| val kvs = ks.zip(1 to 10) | |
| val sets: Seq[Future[Boolean]] = kvs map { | |
| case (k, v) => client.set(k, v) | |
| } | |
| val setResult = Future.sequence(sets) map { r: Seq[Boolean] => |
This file contains hidden or 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
| describe("non blocking apis using futures") { | |
| it("get and set should be non blocking") { | |
| val kvs = (1 to 10).map(i => s"key_$i").zip(1 to 10) | |
| val setResults = kvs map {case (k, v) => | |
| set(k, v) apply client | |
| } | |
| val sr = Future.sequence(setResults) | |
| Await.result(sr.map(_.flatten), 2 seconds).forall(_ == true) should equal(true) |
This file contains hidden or 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
| val routeInfo = | |
| for { | |
| routes <- play.api.Play.current.routes.toList | |
| (method, pattern, call) <- routes.documentation | |
| } yield (method, pattern, call) | |
| println(routeInfo) | |
| generates .. | |
| List((GET,/,controllers.Application.index), (HEAD,/credentialValidation,com.eligotech.hnavigator.web.controllers.CredentialValidation.validateCredentials), (POST,/job,com.eligotech.hnavigator.web.controllers.JobManagement.createJob), (GET,/job/$id<[^/]+>,com.eligotech.hnavigator.web.controllers.JobManagement.getById(id:String)), (DELETE,/job/$id<[^/]+>,com.eligotech.hnavigator.web.controllers.JobManagement.deleteById(id:String)), (OPTIONS,/$path<.+>,com.eligotech.hnavigator.web.controllers.OptionHandler.options(path:String)), (OPTIONS,/job,com.eligotech.hnavigator.web.controllers.JobManagement.options(id:String = "")), (OPTIONS,/job/$id<[^/]+>,com.eligotech.hnavigator.web.controllers.JobManagement.options(id:String)), (GET,/job,com.eligotech.hnavigator.web.controllers.JobManagement.getByState(state:Option[Strin |
This file contains hidden or 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
| // sample query using count | |
| val c = | |
| for { | |
| d <- Databases if (d.name like s"$name%") && (d.hasDistinctCount === true) | |
| } yield t.count | |
| println(c.selectStatement) | |
| // generates this sql for h2 | |
| select select count(1) from "Databases" x2 where (x2."name" like 'world%') and (x2."hasDistinctCount" = true) |