I hereby claim:
- I am cshoe on github.
- I am cshoe (https://keybase.io/cshoe) on keybase.
- I have a public key whose fingerprint is C6FD 526A 4254 CC42 2427 0747 0862 C043 DAD3 9ACC
To claim this, I am signing this object:
class Foo(object): | |
def __init__(self, some_value): | |
# this is proof that your setter is worthless. | |
# you're not even using it... | |
self.some_value = some_value | |
# If you're getters/setters add no real value | |
# i.e. a default, stop it. | |
def set_some_value(self, val): |
import timeit | |
def symmetric_difference_test(): | |
""" | |
""" | |
requested = set([1,3,5,7,9,11,13,15,17,19,21]) | |
found = set([1,3,5,11,13,15,17,19]) | |
sym_diff = found.symmetric_difference(requested) |
# -*- coding: utf-8 -*- | |
import json | |
import urllib | |
import requests | |
CONTENT = """ | |
<html lang="en" dir="ltr" class="client-js"><head> | |
<title>Cryptography - Wikipedia, the free encyclopedia</title> |
from readability import ReaderClient | |
rdb_client = ReaderClient('my_reader_token', 'my_reader_secret', 'user_key', 'user_secret') | |
bookmarks_response = rdb_client.get_bookmarks(favorite=True) | |
print bookmarks_response.content | |
>>> {'bookmarks': [{'user_id': 1039419, 'read_percent': u'0.00', u'tags': [], u'date_updated': u'2013-05-31 08:22:57', u'favorite': True, u'archive': False, u'date_archived': None, u'date_opened': None, u'article': … } |
FROM ubuntu:12.04 | |
MAINTAINER Chris Schomaker <schomaker.c@gmail.com> | |
# add salt repository | |
RUN sudo apt-get update | |
RUN sudo apt-get install -y python-software-properties | |
RUN sudo add-apt-repository -y ppa:saltstack/salt | |
RUN sudo apt-get update |
import sys | |
from xml.etree import ElementTree | |
from jinja2 import Template | |
template_string = """{\\rtf1\\ansi\\ansicpg1252\cocoartf1265\cocoasubrtf190 | |
{\\fonttbl\\f0\fswiss\\fcharset0 ArialMT;\\f1\\froman\\fcharset0 Times-Roman;} | |
{\colortbl;\\red255\green255\\blue255;} |
I hereby claim:
To claim this, I am signing this object:
# As mentioned, this is a bit verbose but I like the separation of concerns. | |
# Basically, you have two functions -- one that does meaningful work and | |
# another that just serves as the "glue" to connect the Django signal | |
# infrastructure to your function. | |
from django.dispatch import receiver | |
@receiver | |
def glue_funtion(sender, **kwargs): | |
""" |
I hereby claim:
To claim this, I am signing this object:
import time | |
from contextlib import contextmanager | |
@contextmanager | |
def timed(metric, tags=None): | |
start = time.time() | |
try: | |
yield tags | |
finally: | |
print tags |