I hereby claim:
- I am davidbody on github.
- I am davidbody (https://keybase.io/davidbody) on keybase.
- I have a public key whose fingerprint is B08E 3971 4F4E E554 080A 51E5 5B74 76EF 8E00 7782
To claim this, I am signing this object:
# project/management/commands/showurls.py | |
# Put a __init__.py file in project/management/ and project/management/commands/ | |
from django.conf import settings | |
from django.core.management.base import BaseCommand, CommandError | |
from django.urls import URLPattern, URLResolver | |
class Command(BaseCommand): | |
help = 'Shows all urls for the current project' |
def memoize(func): | |
cache = {} | |
def wrapper(n): | |
if not n in cache: | |
cache[n] = func(n) | |
return cache[n] | |
return wrapper | |
@memoize | |
def fib(num): |
# https://fivethirtyeight.com/features/so-you-want-to-tether-your-goat-now-what/ | |
# James Jones's Python solution translated to Julia | |
using Formatting | |
function randPoint() | |
randr = sqrt(rand()) | |
theta = rand() * 2 * π | |
randr * cos(theta), randr * sin(theta) | |
end |
library(rgdal) | |
library(broom) | |
library(ggplot2) | |
setwd("~/work/data/iowa-election-results/") | |
# Download the shapefile data if we don't already have it | |
if (!file.exists("./data")) { | |
dir.create("./data") | |
if (!file.exists("./data/pcts_04172014_0908am.zip")) { |
module MyApp | |
def self.api_keys | |
@api_keys ||= YAML::load_file("#{Rails.root}/config/api-keys.yml")[Rails.env] | |
end | |
end |
google-apis |
I hereby claim:
To claim this, I am signing this object: