Models | Examples |
---|---|
Display ads | Yahoo! |
Search ads |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
(defmacro test-> | |
"Takes an expression and a set of test/form pairs. Threads expr (via ->) | |
through each form for which the corresponding test expression (not threaded) is true." | |
[expr | |
& clauses] | |
(assert (even? (count clauses))) | |
(let [g (gensym) | |
pstep (fn [[test step]] `(if ~test (-> ~g ~step) ~g))] | |
`(let [~g ~expr | |
~@(interleave (repeat g) (map pstep (partition 2 clauses)))] |
It is generally desirable to group all the hosts for a specific service into a single dashboard view. For example, all the web servers are in single view while all the database servers are in another view.
This is usually not an issue when you are sending custom metrics using Riemann client. However, there are cases where you are using something that you do not control how the metrics are being sent. i.e., Riemann-tools.
Since Riemann-tools scripts are application agnostic, in order for the dashboard view to group hosts, we must inject some application specific information into the tags field. Tags is a collection of arbitrary strings. In the case of Riemann-tools scripts you can pass in arbitrary strings on the command line.
riemann-health --host 127.0.0.1 --tag "prod" --tag "webserver"
;; Copyright Jason Wolfe and Prismatic, 2013. | |
;; Licensed under the EPL, same license as Clojure | |
(use 'plumbing.core) | |
(require '[clojure.java.shell :as shell] | |
'[clojure.string :as str]) | |
(import '[java.util HashSet] '[java.io File]) | |
(defn double-quote [s] (str "\"" s "\"")) |
Remapped on kinesis itself | |
-------------------------------------------------------------------------------- | |
caps lock -> backspace (freq use) | |
backspace -> right gui/windows (freq use) | |
left alt -> return/enter (very infreq use) | |
right ctrl -> return/enter (freq use) | |
right gui/windows -> left gui | |
enter -> right gui (infreq use) |
import os | |
import pytest | |
from alembic.command import upgrade | |
from alembic.config import Config | |
from project.factory import create_app | |
from project.database import db as _db | |
- 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
(ns org.flausenhaus.rocksdb | |
"Idiomatic Clojure bindings for the C++ RocksDB library, an embedded | |
persistent key-value store for flash storage and server workloads based on | |
LevelDB. More details about RocksDB are given at | |
https://github.com/facebook/rocksdb/wiki/Rocksdb-Architecture-Guide. | |
The implementation here borrows heavily from Factual's clj-leveldb. | |
This namespace provides a few things: | |
0. Protocols/type definitions: byte serialization (IByteSerializable), | |
closeable sequences (CloseableSeq), and mutable |
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)