- 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
sudo dnf remove gnome-tour gnome-abrt gnome-calculator gnome-calendar gnome-maps gnome-weather \
rhythmbox gnome-contacts totem gnome-logs gnome-photos gnome-clocks gedit gnome-system-moniter \
gnome-user-docs gnome-screenshot gnome-remote-desktop
sudo dnf remove fedora-chromium-config
In this article I’ll tell you about my pure functional library for Software Transactional Memory (STM)
that I’ve built in C++. I adopted some advanced functional programming concepts that make it composable and convenient to use. Its implementation is rather small and robust, which differentiates the library from competitors. Let’s discuss what STM is and how to use it.
private def updateReturning[A, F]( | |
returningQuery: Query[A, F, C], v: U): SqlStreamingAction[Vector[F], F, Effect.All] = { | |
val ResultSetMapping( | |
_, CompiledStatement(_, sres: SQLBuilder.Result, _), CompiledMapping(_updateConverter, _)) = | |
updateCompiler.run(updateQuery.toNode).tree | |
val pconv: SetParameter[U] = { | |
val ResultSetMapping(_, compiled, CompiledMapping(_converter, _)) = | |
updateCompiler.run(updateQuery.toNode).tree | |
val converter = _converter.asInstanceOf[ResultConverter[JdbcResultConverterDomain, U]] |
An expression is said to be referentially transparent if it can be replaced with its value without changing the behavior of a program (in other words, yielding a program that has the same effects and output on the same input)
https://en.wikipedia.org/wiki/Referential_transparency
This example is taken from the book "Functional Programming in Scala"
The following is referentially transparent:
scala> val x = "hello, world"
One of the simplest and most recognizable type classes is the semigroup. This type class abstracts over the ability to combine values of a certain type in an associative manner.
Cats provides cats.Semigroup[A]
to model semigroups [1].
The combine
method takes two values of the type A
and returns an A
value.
object test extends App { | |
import scala.collection.JavaConversions.asJavaEnumeration | |
import java.io.{ByteArrayInputStream, SequenceInputStream} | |
val inputs = Iterator("asdf", "qewr", "wert") | |
.map(x => new ByteArrayInputStream((x + "\n").getBytes)) | |
val in = new SequenceInputStream(asJavaEnumeration(inputs)) | |
Console.setIn(in) | |
val a = readLine() | |
val b = readLine() |
import com.twitter.algebird.{Aggregator, Semigroup} | |
import com.twitter.scalding._ | |
import scala.util.Random | |
/** | |
* This job is a tutorial of sorts for scalding's Execution[T] abstraction. | |
* It is a simple implementation of Lloyd's algorithm for k-means on 2D data. | |
* | |
* http://en.wikipedia.org/wiki/K-means_clustering |
%% Shared Ring Buffer | |
-module(srb). | |
-export([new/2, push/2, pop/2, pop/1]). | |
-compile(export_all). | |
-record(counters, | |
{ clock :: non_neg_integer(), | |
max_size :: non_neg_integer() }). |
(defn flip [function] | |
(fn | |
([] (function)) | |
([x] (function x)) | |
([x y] (function y x)) | |
([x y z] (function z y x)) | |
([a b c d] (function d c b a)) | |
([a b c d & rest] | |
(->> rest | |
(concat [a b c d]) |