This file contains hidden or 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
__author__ = 'brendan' | |
__all__ = ['logfloat', 'LogFloat'] | |
import numpy as np # numpy's logaddexp correctly handles LOGZERO | |
from math import log as _log, exp as _exp | |
@np.vectorize | |
def logfloat(x): | |
""" |
This file contains hidden or 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/python2.7 | |
import subprocess | |
from collections import defaultdict | |
from glob import glob | |
import sys | |
pattern = sys.argv[1] | |
d = defaultdict(lambda: []) |
This file contains hidden or 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/python2.7 | |
import lxml, lxml.etree, urllib2, re | |
SESSYR=2012 | |
SESSCD='W' | |
debug_last_url = None | |
def read_endpoint(dept=None, course=None, section=None): | |
global SESSYR, SESSCD |
This file contains hidden or 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
import lxml.html | |
import urllib2 | |
import urllib | |
import cookielib | |
import re | |
class ScraperException(Exception): | |
pass | |
class Page(object): |
NewerOlder