Skip to content

Instantly share code, notes, and snippets.

@alchemyst
alchemyst / gist:7399670
Created November 10, 2013 15:38
Generating autoregressive data
N = 1000
h = 5
y = numpy.random.randn(N)
x = numpy.zeros_like(y)
for i in range(h, len(y)):
x[i] = x[i-1] + y[i - h]
@alchemyst
alchemyst / pull.py
Created January 28, 2012 18:30
Scrape timetable webpage
#!/usr/bin/env python
import BeautifulSoup
import mechanize
import csv
import sys
import logging
logging.basicConfig(level=logging.INFO)
headers = ["ModuleName", "Group", "Language", "Activity", "ING", "YearPhase",