- 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
def forceHttps(handler: Handler, request: RequestHeader): Handler = { | |
(isHTTPSRequired, isRequestSecure(request), request.method, request.uri) match { | |
// HTTPS is supported but not required for the API | |
case (_, _, _, uri) if uri.startsWith("/api") => handler | |
// HTTPS is required here, redirect GET requests | |
case (true, false, "GET", uri) => Action(Results.Redirect(s"https://${request.domain}${request.uri}")) | |
// HTTPS is required but we can't redirect |
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
#!/bin/bash | |
# Perform installation as root | |
# Install prereqs | |
yum -y install libcurl libcurl-devel rrdtool rrdtool-devel rrdtool-prel libgcrypt-devel gcc make gcc-c++ | |
# Get Collectd, untar it, make it and install | |
wget http://collectd.org/files/collectd-5.4.0.tar.gz | |
tar zxvf collectd-5.4.0.tar.gz |
UPDATE: This is now available as a plugin https://github.com/tbroyer/gradle-errorprone-plugin
To use it, just add the following to your build.gradle
and it'll change all JavaCompile
tasks to use the error-prone compiler:
apply from: 'https://gist.github.com/tbroyer/6847494/raw/errorprone.gradle'
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
#!/bin/bash -e | |
IFADDR="192.168.3.1/24" | |
if [[ ! ip link show docker0 ]]; then | |
ip link add docker0 type bridge | |
ip addr add "$IFADDR" dev docker0 | |
ip link set docker0 up | |
iptables -t nat -A POSTROUTING -s "$IFADDR" ! -d "$IFADDR" -j MASQUERADE | |
fi |
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 ruby | |
require 'base64' | |
require 'open-uri' | |
# file or url | |
def get_css(src) | |
if src.start_with? 'http' | |
src = src.gsub('|', '%7C') | |
STDERR.puts "# GET #{src}" | |
# simulate modern browser to get woff |
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
// Solve Every Sudoku Puzzle in Dart | |
// A translation of: http://norvig.com/sudopy.shtml | |
// Translated by Brian Slesinsky | |
// See http://norvig.com/sudoku.html | |
// Throughout this program we have: | |
// r is a row, e.g. 'A' | |
// c is a column, e.g. '3' | |
// s is a square, e.g. 'A3' |
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
/** | |
* A {@link HttpRequest.ConnectionFactory connection factory} which uses OkHttp. | |
* <p/> | |
* Call {@link HttpRequest#setConnectionFactory(HttpRequest.ConnectionFactory)} with an instance of | |
* this class to enable. | |
*/ | |
public class OkConnectionFactory implements HttpRequest.ConnectionFactory { | |
private final OkHttpClient client; | |
public OkConnectionFactory() { |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000