Skip to content

Instantly share code, notes, and snippets.

@davidandrzej
davidandrzej / linearscatter.py
Created May 3, 2011 18:32
Augment 2D scatter plot with linear regression
"""
Augment scatter plot with linear regression fit
David Andrzejewski
"""
import numpy as NP
import numpy.random as NPR
import matplotlib.pyplot as P
import matplotlib.lines as L
from scikits.learn.linear_model import LinearRegression
@takumikinjo
takumikinjo / org2doku
Created March 21, 2011 07:19
Convert Emacs org-mode formatted text to Dokuwiki formatted one.
#!/usr/bin/env perl
# Usage
#
# cat <<EOF | ./org2doku
# * heading
#
# - item
# - sub item
#
@blister
blister / gist:740829
Created December 14, 2010 18:19
Bash script to add a delay to the localhost interface on Linux machines
#!/bin/bash
# Copyright 2010 Eric Ryan Harrison <[email protected]>
# Inspired by:
# http://daniel.haxx.se/blog/2010/12/14/add-latency-to-localhost/
if [ -n "$1" ]
then
if [ "$1" = "off" ]
then
tc qdisc del dev lo root
@processone
processone / strophe.websocket.js
Created December 13, 2010 16:04
Websocket support in strophe.js
/** Class: Strophe.WebSocket
* XMPP Connection manager.
*
* Thie class is the main part of Strophe. It manages a BOSH connection
* to an XMPP server and dispatches events to the user callbacks as
* data arrives. It supports SASL PLAIN, SASL DIGEST-MD5, and legacy
* authentication.
*
* After creating a Strophe.Connection object, the user will typically
* call connect() with a user supplied callback to handle connection level