A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
import time | |
import urllib2 | |
from datetime import datetime | |
def do_dave(): | |
while 10 < datetime.now().hour < 15: | |
time.sleep(5) | |
urllib2.urlopen('http://www.reddit.com/') | |
// How to use: | |
// 1. Open "Script Editor" (requires OS X 10.10 Yosemite) | |
// 2. Change the language from "AppleScript" to "JavaScript" | |
// 3. Paste the code below and replace the safari example. | |
// | |
// More info: | |
// https://developer.apple.com/library/mac/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/index.html | |
var sys_events = Application("System Events"); |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
from flask.ext.script import Command, Option | |
class GunicornServer(Command): | |
"""Run the app within Gunicorn""" |
nnoremap yy "+yy | |
vnoremap y "+y | |
nnoremap p "+p | |
vnoremap p "+p | |
nnoremap P "+P | |
vnoremap P "+P |
# http://www.gravityhelp.com/documentation/page/Web_API#Security | |
import time | |
import base64 | |
import urllib | |
import requests | |
import json | |
import hmac | |
from hashlib import sha1 |
9/5/2013 @ 6:30pm
UX Speakeasy (VT)
9/7/2013 @ 2:00pm
Vermont Makers (FIRST Robotics Ice Cream Social)
9/12/2013 @ 6:00pm
Burlington Healthcare Innovators
9/14/2013 @ 9:30am
// Copyright 2013 Soundslice LLC. License: BSD. | |
/* HTML example: **************** | |
<figure class="vid"> | |
<video preload> | |
<source src="/videos/help/playhead.mp4" type="video/mp4"> | |
<source src="/videos/help/playhead.webm" type="video/webm"> | |
</video> | |
<p>To move the playhead, click in the timeline or drag the playhead’s diamond.</p> |
# I love tpope's solution to ctags regeneration[1]; he creates | |
# a template from which all Git repositories take their default hooks, | |
# and then uses these hooks to regenerate ctags. | |
# | |
# [1]: http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html | |
# | |
# It's an elegant solution, but what do you do about repositories that | |
# already exist? The template will only apply to newly cloned or newly | |
# initialised repositories. | |
# |