Skip to content

Instantly share code, notes, and snippets.

View blackfist's full-sized avatar

Kevin Thompson blackfist

View GitHub Profile
@CamDavidsonPilon
CamDavidsonPilon / 538.json
Last active November 28, 2021 07:37
Use the two files below to mimic graphs on 538. www.dataorigami.net/blogs/fivethirtyeight-mpl
{
"lines.linewidth": 2.0,
"examples.download": true,
"patch.linewidth": 0.5,
"legend.fancybox": true,
"axes.color_cycle": [
"#30a2da",
"#fc4f30",
"#e5ae38",
"#6d904f",
@blackfist
blackfist / new-year-2014.md
Last active January 1, 2016 15:59
News years resolutions for 2014

New Years Resolutions for 2014 (work in progress)

Here are some things that I would like to accomplish in 2014. This list might be too long (as I keep adding to it) and might need to get sorted into minimum goals and stretch goals. Something else I might want to consider is how can I add a system to this, so that rather than setting a specific goal, I have a system that helps me achieve things I want.

Minimum Goals

  • Achieve 600 hours of instruction in Mandarin (380 hours on top of the 220 I have now).
    • Self study for one hour most days
    • Engage in at least one face-to-face conversation either in person or on the internet every week
    • The extra hours from conversation should make up for any missed days of self-study.
  • Read and complete the examples in The Art of R Programming and Machine Learning for Hackers.
  • spend at least 40 hours studying x86 assembly language.
@dbarlett
dbarlett / dnb.py
Created November 10, 2013 21:46
Sample code for authenticating and requesting data from D&B Direct API. Tested with Python 2.7.5 and Requests 2.0.1.
#!/usr/bin/env python
"""Sample code for authenticating and requesting data from D&B Direct API. See
http://developer.dnb.com/ for more information.
"""
import requests # pip install requests
# Register at http://developer.dnb.com/register-v2
DNB_USERNAME = ""
@blackfist
blackfist / vcdb_quality_sample.py
Last active December 27, 2015 09:39
Takes a random sample from the VCDB dataset for quality checking.
import json
import os
from collections import defaultdict
from random import sample
population = defaultdict(list)
sample_size = 2
final_sample = defaultdict(list)
# i = getIncident('blahblahblah.json')
@blackfist
blackfist / vcdb.py
Last active December 24, 2015 22:39
Common stuff that I use in VCDB maintenance
import json
import os
from datetime import datetime
import uuid
# i = getIncident('blahblahblah.json')
def getIncident(inString):
return json.loads(open(inString).read())
# updateIncident(i, 'blahblahblah.json', True)
@blackfist
blackfist / Mandarin Notes.md
Last active December 22, 2015 01:09
Mandarin words and phrases that I'd like to remember.

My name

  • 凯文 - Kǎi wén

Questions

  • None right now

Phrases

  • 最近有什麼事嗎 - Zuìjìn yǒu shé me shì ma - What's new with you?
  • 我明天早上很早就走 (wŏ míngtiān zăoshàng hĕn zăo jiù zŏu) - I'm leaving very early tomorrow morning.
  • 很高兴跟你讲话 - Hěn gāoxìng gēn nǐ jiǎnghuà - It was nice speaking with you