There are lots of representations for strings. In most languages they pick one set of tradeoffs and run with it. In haskell the "default" implementation (at least the one in the prelude) is a pretty bad choice, but unlike most other languages (really) good implementations exist for pretty much every way you can twist these things. This can be a good thing, but it also leads to confusion, and frustration to find the right types and how to convert them.
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/env python | |
from optparse import OptionParser | |
from brod.zk import * | |
import pickle | |
import struct | |
import socket | |
import sys | |
import time | |
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
{-# LANGUAGE TypeFamilies #-} | |
import Data.Function (on) | |
import Control.Applicative | |
data EventData e = EventData { | |
eventId :: Int, | |
body :: Event e | |
} |
Slightly disorganized but reasonably complete notes on the algorithms, strategies and optimizations of the Akka Cluster implementation. Could use a lot more links and context etc., but was just written for my own understanding. Might be expanded later.
Links to papers and talks that have inspired the implementation can be found on the 10 last pages of this presentation.
This is the Gossip state representation:
- 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 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
// Create a new MergeStrategy for aop.xml files | |
val aopMerge: MergeStrategy = new MergeStrategy { | |
val name = "aopMerge" | |
import scala.xml._ | |
import scala.xml.dtd._ | |
def apply(tempDir: File, path: String, files: Seq[File]): Either[String, Seq[(File, String)]] = { | |
val dt = DocType("aspectj", PublicID("-//AspectJ//DTD//EN", "http://www.eclipse.org/aspectj/dtd/aspectj.dtd"), Nil) | |
val file = MergeStrategy.createMergeTarget(tempDir, path) |
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 nl.mdj.fpinscala | |
import akka.actor.{Actor, ActorRef, ActorSystem, Props} | |
import akka.pattern.ask | |
import akka.util.Timeout | |
import nl.mdj.fpinscala.KeyValueStore.{KvS, ListKeys} | |
import scala.concurrent.duration._ | |
import scala.concurrent.{ExecutionContext, Await, Future} | |
import scalaz.std.list._ |
You must use the magic method %save
:
In [1]: %save?
Type: Magic function
String Form:<bound method CodeMagics.save of <IPython.core.magics.code.CodeMagics object at 0x7fb5d25bb1d0>>
Namespace: IPython internal
File: /usr/lib/python2.7/dist-packages/IPython/core/magics/code.py
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
com.sun.management:type=DiagnosticCommand | |
com.sun.management:type=HotSpotDiagnostic | |
java.lang:name=CodeCacheManager,type=MemoryManager | |
java.lang:name=Code Cache,type=MemoryPool | |
java.lang:name=Compressed Class Space,type=MemoryPool | |
java.lang:name=G1 Eden Space,type=MemoryPool | |
java.lang:name=G1 Old Generation,type=GarbageCollector | |
java.lang:name=G1 Old Gen,type=MemoryPool | |
java.lang:name=G1 Survivor Space,type=MemoryPool | |
java.lang:name=G1 Young Generation,type=GarbageCollector |
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
# https://github.com/rama-nallamilli/kafka-prometheus-monitoring | |
# https://github.com/Yolean/kubernetes-kafka/blob/master/prometheus/10-metrics-config.yml | |
lowercaseOutputName: true | |
rules: | |
- pattern : kafka.network<type=Processor, name=IdlePercent, networkProcessor=(.+)><>Value | |
- pattern : kafka.network<type=RequestMetrics, name=RequestsPerSec, request=(.+)><>OneMinuteRate | |
- pattern : kafka.network<type=SocketServer, name=NetworkProcessorAvgIdlePercent><>Value | |
- pattern : kafka.server<type=ReplicaFetcherManager, name=MaxLag, clientId=(.+)><>Value | |
- pattern : kafka.server<type=BrokerTopicMetrics, name=(.+), topic=(.+)><>OneMinuteRate |
OlderNewer