Skip to content

Instantly share code, notes, and snippets.

@debasishg
debasishg / gist:8172796
Last active March 15, 2024 15:05
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. 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.
  2. Models and Issues in Data Stream Systems
  3. 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
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&rep=rep1&t
@potiuk
potiuk / libmemcached.rb
Last active December 29, 2020 10:07
Install libmemcached with brew in preview (build 13A558) version of OSX Mavericks with XCode 5 Developer Preview 6
require 'formula'
class Libmemcached < Formula
homepage 'http://libmemcached.org'
url 'https://launchpad.net/libmemcached/1.0/1.0.17/+download/libmemcached-1.0.17.tar.gz'
sha1 '1023bc8c738b1f5b8ea2cd16d709ec6b47c3efa8'
depends_on 'memcached'
def install
@nodesocket
nodesocket / bootstrap.flatten.css
Last active April 1, 2021 23:37
Below are simple styles to "flatten" bootstrap. I didn't go through every control and widget that bootstrap offers, only what was required for https://commando.io, so your milage may vary.
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2024 06:36
A badass list of frontend development resources I collected over time.
@mvsantos
mvsantos / remove-image-background.sh
Created May 10, 2013 14:16
Remove/strip image background - rough mode - requires ImageMagick
# Requires ImageMagick
# Converting the source from JPEG to PNG - if necessary
convert my_src_image.jpg my_src_image.png
# Option A
# - Requires a temporary intermediate file
# - Drill more than 10 might result in poor results
@dmarx
dmarx / LinkFixerClone.py
Last active January 19, 2021 02:20
A simple LinkFixerBot clone developed as a demonstration for anyone who is curious how a simple reddit bot might be coded. To kill this code, spam "Ctrl+C" until it catches the exception.
import praw # simple interface to the reddit API, also handles rate limiting of requests
import re
from collections import deque
from time import sleep
USERNAME = "Your username here"
PASSWORD = "Your password here"
USERAGENT = "Your useragent string here. It should include your /u/username as a courtesy to reddit"
r = praw.Reddit(USERAGENT)
@sspross
sspross / DJANGO_TWISTED_HAPROXY.md
Last active November 13, 2023 03:15
Serving Django and Twisted using HAproxy

Serving Django and Twisted using HAproxy

Why?

Because we wanted to achive the following while developing a webapp using websockets:

Static serving (nginx), Django application (gunicorn) and Websockets service (twisted)

  • on the same IP
@larsbutler
larsbutler / cluster_status.py
Created April 4, 2013 11:18
Script for monitoring celery worker usage, for https://github.com/gem/oq-engine
#!/usr/bin/env python
import sys
from celery.task.control import inspect
def ping_celery():
ins = inspect()
# Count the number of total worker processes
total_workers = 0
# ... and active tasks
@tomhennigan
tomhennigan / delegate_example.py
Created March 26, 2013 14:20
Delegate method pattern for Python classes.
from delegates import DelegateProviderMixin, notify_delegates
class Something(DelegateProviderMixin):
@notify_delegates
def do_something(self):
print 'do_something'
def do_something_else(self):
print 'do_something_else'
@econchick
econchick / gist:4666413
Last active December 22, 2023 13:32
Python implementation of Dijkstra's Algorithm
class Graph:
def __init__(self):
self.nodes = set()
self.edges = defaultdict(list)
self.distances = {}
def add_node(self, value):
self.nodes.add(value)
def add_edge(self, from_node, to_node, distance):