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
from reversion.models import Version | |
import json | |
object_fields = {} | |
for v in Version.objects.all(): | |
# For now, only dealing with versions that correspond to a still-existing | |
# model instance, since it's easier to get the model class with that info | |
if v.object: |
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/python | |
import argparse | |
import csv | |
import re | |
parser = argparse.ArgumentParser( | |
description='Extract plays involving assists from raw play-by-play data') | |
parser.add_argument('input_file',metavar='FILE') | |
parser.add_argument('--team', help='Three letter team name to search \ |
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
var isValidEDTF = function (str) { | |
var verdict, | |
intervals = str.split('/'), | |
validateSingleDate; | |
validateSingleDate = function(dateString) { | |
var verdict, | |
sepMarks = dateString.split(/([?~]*)$/), | |
dateParts = sepMarks[0].split('-'), | |
possiblyUnclearYear = /^-?[0-9]{0,2}(?:[0-9]{2}|[0-9]u|uu)$/, |
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 re | |
def is_valid_edtf(raw_string): | |
intervals = raw_string.split('/') | |
if len(intervals) == 1: | |
d1, = intervals | |
return validate_single_date(d1) | |
elif len(intervals) == 2: | |
d1, d2 = intervals | |
return bool( |
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 re | |
year_part = re.compile('(?:1[89]|20)\d{2}') | |
months = [r'jan(?:uary)?$', r'feb(?:ruary)?$', r'mar(?:ch)?$', | |
r'apr(?:il)?$', r'may$', r'jun(?:e)?$', | |
r'jul(?:y)?$', r'aug(?:ust)?$', r'sep(?:t|tember)?$', | |
r'oct(?:ober)?$', r'nov(?:ember)?$', r'dec(?:ember)?', | |
'dec', 'dec', 'dec', 'dec', 'dec', 'dec', 'dec', 'dec', | |
r'spr(?:ing)?$', r'sum(?:mer)?', r'(?:aut|autumn|fall)$', r'win(?:ter)?$'] |
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
class MultipleFileInputWidget(forms.FileInput): | |
input_type = 'file' | |
def render(self, name, value, attrs=None): | |
attrs = attrs if attrs else {} | |
attrs['multiple'] = 'multiple' | |
return super(MultipleFileInputWidget, self).render(name, value, attrs=attrs) | |
def value_from_datadict(self, data, files, name): | |
return files.getlist(name, None) |
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
<!doctype html> | |
<html> | |
<head> | |
</head> | |
<body> | |
<div id="out"> | |
</div> | |
<script type="text/javascript"> | |
var indexedDB = window.indexedDB || window.webkitIndexedDB || window.msIndexedDB || window.mozIndexedDB; |
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/python | |
import os | |
import sqlite3 | |
""" | |
Database requirement for SILS Information Technology Competency Test | |
http://ils.unc.edu/waiver/Information_Technology_Competency_Test.pdf | |
""" |
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
1988 Radio Shack Tandy 286 PC Commercial, 2010. http://www.youtube.com/watch?v=Q4ezlLdCErM&feature=youtube_gdata_player. | |
Anderson, Janna Quitney, and Harrison Rainie. The Future of Cloud Computing. Pew Internet & American Life Project Washington, DC, 2010. http://www.workingtitleconsultants.com/wp/wp-content/uploads/2010/06/The-future-of-cloud-computing.pdf. | |
Armbrust, Michael, Armando Fox, Rean Griffith, Anthony D. Joseph, Randy Katz, Andy Konwinski, Gunho Lee, David Patterson, Ariel Rabkin, and Ion Stoica. “A View of Cloud Computing.” Communications of the ACM 53, no. 4 (2010): 50–58. | |
Chrome: Now Everywhere, 2013. http://www.youtube.com/watch?v=bEFNh4qEJTA&feature=youtube_gdata_player. | |
Esteves, R.M., and Chunming Rong. “Social Impact of Privacy in Cloud Computing.” In 2010 IEEE Second International Conference on Cloud Computing Technology and Science (CloudCom), 593–596, 2010. doi:10.1109/CloudCom.2010.98. |
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/env python | |
# -*- coding: utf-8 -*- | |
import argparse | |
import sys | |
from blessings import Terminal | |
from lxml.html import parse | |
RECENTLY_PLAYED_URL = 'http://www.wxyc.info/playlists/recent.html' |
OlderNewer