- Mr. Coffee Burr Grinder ($35)
- Hario Coffee Mill, Slim ($25)
import csv, time | |
from selenium import webdriver | |
from selenium.webdriver.support.ui import Select | |
from selenium.webdriver.common.keys import Keys | |
applicant_name = # your name | |
applicant_email = # your email | |
applicant_address = # your physical address | |
occupation = # your occupation |
rm -f output.csv
ogr2ogr -f CSV -t_srs EPSG:4326 -lco GEOMETRY=AS_XY -nln output output.csv input.vrt
## Generate a full season's worth of pitching Marcel projections from past years' stats | |
from createTuple import createTuple ## gist: 778481 | |
from writeMatrixCSV import writeMatrixCSV ## gist: 778484 | |
def makePitTable(r): | |
for stat in ['AB', 'H', 'D', 'T', 'HR', 'SO', 'BB', 'SF', 'HP', 'CI', 'IPouts', 'R']: | |
if stat in r: pass | |
else: r[stat] = 0 | |
ab = 0.9*r['IPouts'] + r['H'] |
## Generate a full season's worth of batting Marcel projections from past years' stats | |
from createTuple import createTuple ## gist: 778481 | |
from writeMatrixCSV import writeMatrixCSV ## gist: 778484 | |
def makeBatTable(r): | |
for stat in ['AB', 'H', 'D', 'T', 'HR', 'SO', 'BB', 'SF', 'HP', 'CI']: | |
if stat in r: pass | |
else: r[stat] = 0 | |
if r['AB'] == 0: |
{ | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"close_windows_when_empty": true, | |
"color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme", | |
"draw_indent_guides": true, | |
"draw_white_space": "selection", | |
"file_exclude_patterns": | |
[ | |
".DS_Store", |
import re | |
import json | |
ws_re = re.compile("\s+") | |
line_num_re = re.compile("\s\d+\s{2,}", re.M) | |
# first, pdftotext -layout <pdf> <text> | |
with open("12-307_jnt1.txt", "r") as f: | |
data = f.read() |
Over the last 3 years or so I've helped a bunch of companies, small and large, switch to Django. As part of that, I've done a lot of teaching Django (and Python) to people new to the platform (and language). I'd estimate I've trained something around 200-250 people so far. These aren't people new to programming — indeed, almost all of them are were currently employed as software developers — but they were new to Python, or to Django, or to web development, or all three.
In doing so, I've observed some patterns about what works and what doesn't. Many (most) of the failings have been my own pedagogical failings, but as I've honed my coursework and my skill I'm seeing, time and again, certain ways that Django makes itself difficult to certain groups of users.
This document is my attempt at organizing some notes around what ways different groups struggle. It's not particularly actionable — I'm not making any arguments about what Django should or shouldn't do (at least
class ReloaderEventHandler(FileSystemEventHandler): | |
""" | |
Listen for changes to modules within the Django project | |
On change, reload the module in the Python Shell | |
Custom logic required to reload django models.py modules | |
Due to the singleton AppCache, which caches model references. | |
For those models files, we must clear and repopulate the AppCache | |
""" | |
def __init__(self, *args, **kwargs): |
import urlparse | |
import oauth2 as oauth | |
consumer_key = '' | |
consumer_secret = '' | |
request_token_url = 'http://www.tumblr.com/oauth/request_token' | |
access_token_url = 'http://www.tumblr.com/oauth/access_token' | |
authorize_url = 'http://www.tumblr.com/oauth/authorize' |