Instantly share code, notes, and snippets.

View environment.yml
# Conda environment file -- these packages are required for this script to work
name: craigslist
dependencies:
- lxml
- pip
- python=3.4*
- requests
- pip:
- aiohttp
- pyquery
View gist:29a64ba7f3c07cbd5381

Newb's Mind, Expert's Mind

Expertise syndrome is a silent killer of knowledge in information-based industries – whether that’s a news room or a tech shop. Remembering what it was like to use your tools when you didn't know what you didn't know makes it harder for you to communicate with people who are starting out. How do you put yourself in the beginner's mind? Can doing that help you create the next generation of experts in your community? This talk explores those themes and helps you find and implement strategies to share your knowledge in a way that's accessible to everyone, regardless of where they are on their journey.

In A Tweet

Newb's Mind, Expert Mind: How to teach beginners by changing the way you think.

How does your submission contribute to the diversity of the conference?

View gist:cc27a27a50797d9712c4
X.1,X.2
Wall Street bonuses in 2014,28.5
Income of all Americans working full-time at minimum wage in 2014,14
View React-Todo-Example-in-CoffeeScript.markdown
View gunicorn
import os
from os.path import join
from blaze.server import Server
from bambooclient import Client, autoload
def make_app():
basedir = os.environ.get('BAMBOO_BASEDIR', os.getcwd())
data_filename = os.environ.get('BAMBOO_DATAFILE', False)
View keybase.md

Keybase proof

I hereby claim:

  • I am tswicegood on github.
  • I am tswicegood (https://keybase.io/tswicegood) on keybase.
  • I have a public key whose fingerprint is 791B 1944 7650 B4A5 F612 20E6 B4DC 8BF7 51C8 7987

To claim this, I am signing this object:

View gist:9498687
$ traceroute api.dropbox.com
traceroute to api.v.dropbox.com (108.160.166.253), 64 hops max, 52 byte packets
1 33.sub-66-174-43.myvzw.com (66.174.43.33) 4241.883 ms 2174.343 ms 71.135 ms
2 49.sub-69-83-103.myvzw.com (69.83.103.49) 57.548 ms 3588.356 ms 3891.173 ms
3 194.sub-69-83-103.myvzw.com (69.83.103.194) 1235.232 ms 76.562 ms 58.914 ms
View pg_postgis_20_92.sh
#!/bin/bash
#
# Install Postgres 9.2, PostGIS and create PostGIS template on an Ubuntu 12.04 Server
# add official postgresql.org ubuntu repos (http://wiki.postgresql.org/wiki/Apt)
# Create /etc/apt/sources.list.d/pgdg.list. The distributions are called codename-pgdg.
echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg2.list
# Import the repository key from http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc, update the package lists, and start installing packages:
View foo.py
setattr(self, field, getattr(utils, '%s%s' % (prefix, field))(self))
View gist:5644776
# using lambdas
def signed_in_both_chambers(self, **kwargs):
signed = lambda a: 'Signed in the %s' % a
return (self.filter(models.Q(bill_type='SB') | models.Q(bill_type='HB'))
.filter(actions__description=signed('House'))
.filter(actions__description=signed('Senate')))
# refactored into these methods
def has_action(self, action):
"""Filter QuerySet by a given action"""