A plot of US government spending over time with an animate pie chart showing the annual percentage breakdown by spending category.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MRN, ACCN, and Study Date | |
# sl:mrn,accn,stdt | |
# MRN, ACCN | |
sl:mrn,accn | |
# MRN, Report Date | |
# sl:mrn,rptdt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<style> | |
svg { | |
background-color: #444455; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import multiprocessing | |
import time | |
import logging | |
logging.basicConfig( | |
level=logging.DEBUG, | |
format='(%(processName)-10s) %(message)s', | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import threading | |
import time | |
import logging | |
logging.basicConfig( | |
level=logging.DEBUG, | |
format='(%(threadName)-10s) %(message)s', | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from utils import get_gmm_modes | |
data = np.array([3643, 4699, 91, 144, 13, 3662, 3870, 4360, 90, | |
62, 8100, -48, 3679, 4479, 115, 4105, 69, -22, | |
-55, 4339, 87, -24, 4273, 142, 4956, 4256, 4162, | |
134, 4090, 86, 4100, 4366, 150, 4600, -63, 4346, | |
136, 4531, 3966, 4394, 67, 58, -48, 3793, 4239, | |
4239, 88, 4514, 99, 4399, 4212, 144, 12, 3768, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import datetime, time | |
import sha, hmac | |
import email.utils | |
import requests | |
bucket_name = 'kick' | |
aws_access_id = "ABCDEFGHIJKLMNOPQ123" | |
aws_secret_access_key = "some-secret-amazon-aws-secret-access-key" | |
url = 'http://' + bucket_name + '.s3.amazonaws.com/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_children(d, i): | |
l = list() | |
l.append(d['name']) | |
d['id'] = i | |
if 'children' in d: | |
for child in d['children']: | |
l.extend(find_children(child, i + len(l))) | |
return l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# on Unix make a 10MB bin file using: | |
# dd if=/dev/random of=10meg.bin bs=1024 count=$[1024*10] | |
from timeit import timeit | |
count = 50 | |
setup = ''' | |
import os | |
import numpy as np | |
from struct import calcsize, unpack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import httplib | |
from httplib import HTTPException | |
import json | |
DEBUG = False | |
BOUNDARY = '--------Boundary' | |
def post_stuff(host, post_url, field_dict): |
NewerOlder