Skip to content

Instantly share code, notes, and snippets.

@mdengler
mdengler / garch.py
Created April 18, 2012 04:38
garch in python, from Peter von Tessin
#!/usr/bin/env python
# Trivial GARCH implementation in python
#
# From Peter Tessin's http://www.petertessin.com/TimeSeries.pdf
#
#!/usr/bin/env python
# See https://github.com/Elleo/gst-opencv/blob/master/examples/python/facedetect.py
# See also http://blog.mikeasoft.com/2010/06/17/gstreamer-opencv-plugins-on-the-nokia-n900/
import pygst
pygst.require("0.10")
import gst
import gtk
@mdengler
mdengler / csvvert.py
Created June 11, 2012 03:12
CSV -> vertical display
#!/usr/bin/env python
"""
Displays a CSV file's contents vertically.
Example:
$ cat | ~/bin/csvvert.py
Year,Make,Model,Length
1981,Ford,Capri Ghia,2.34
@mdengler
mdengler / html2csv.py
Created June 21, 2012 04:45
html2csv.py
#!/bin/env python
# -*- coding: utf-8 -*-
"""
Examples:
%(progname)s http://en.wikipedia.org/wiki/List_of_Olympic_records_in_athletics
This is essentially this logic, done up
#!/usr/bin/env python
"""
Proof of concept scraper for pinnacle sports
"""
FEED = "http://xml.pinnaclesports.com/pinnacleFeed.aspx"
#!/usr/bin/env python
"""
Proof of concept scraper for pinnacle sports
@mdengler
mdengler / mrw.py
Created September 10, 2012 21:27
python exercise to find the intersection of two sets of integers
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Given two lists of N integers (32-bit signed), determine the integers
in both lists.
"""
import os
import sys
import time
@mdengler
mdengler / mrw.py
Created September 14, 2012 20:26
python exercise to find the intersection of two sets of integers
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Given two lists of N integers (32-bit signed), determine the integers
in both lists.
"""
import os
import sys
import time
@mdengler
mdengler / gist:3944990
Created October 24, 2012 09:06 — forked from booyaa/gist:3944974
fixperms.sh
#!/bin/sh
set -e
set -x
for dir in /home/*; do
username=`basename "$dir"`
users_group=`id --group $username`
chown -R $username:$users_group $username
done
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶