Skip to content

Instantly share code, notes, and snippets.

View blackfist's full-sized avatar

Kevin Thompson blackfist

View GitHub Profile
@blackfist
blackfist / sample strings.txt
Last active January 2, 2016 01:39
just fucking around
http://www.utphysicians.com/21756/uthealth-informs-patients-incident-related-patient-information/ (20130830),http://healthitsecurity.com/2013/08/29/ut-physicians-informs-patients-of-data-breach/ (20130830)
https://oag.ca.gov/system/files/Final%20version%20of%20breach%20notification%20in%20PDF%20format%20%2800751822%29_0.PDF http://www.phiprivacy.net/burglar-snatches-laptop-with-patient-medical-records-from-san-jose-internists-office/
http://doj.nh.gov/consumer/security-breaches/documents/waste-management-20070403.pdf
@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.
{
"actor_id": "41D3AF17-147D-4DCC-ABE6-684174325D66",
"country": [
{
"country": "CN",
"source": [
1,
2
]
},
@blackfist
blackfist / assignment.md
Created November 13, 2013 14:43
pandoc and latex template to create an APA formatted term paper. Took me forever to make this since I had never played with latex before. Hopefully it isn't too awful. To make the finished paper you need to type the following pandoc --template=template.tex -o output.tex assignment.md xelatex output.tex biber output xelatex output.tex xelatex out…

title: 'Making shit work with markdown to pandoc to pdflatex to biber and back' author: 'Kevin Thompson' shorttitle: 'Making shit work' abstract: | don't forget to indent these paragraphs

if you don't it seem to get pissed about long sentences. ...

@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 / gist:7219548
Created October 29, 2013 17:57
Using Alanis Morissette to Improve the Effectiveness of Wife Trolling

At any given time I have several research projects going on, but none of them give me greater pleasure than the cutting-edge research I've done in the field of Wife Trolling, the subtle art of irritating your significant other as way to express your love. Here at the Southern Minnesota Research Center I spend countless hours experimenting with new ways to troll my research subject (A.K.A my wife). Recently I've made a breakthrough discovery that I need to share in blog format since Wife Trolling doesn't have a journal (yet).

The Lethal Combination

This new effective technique is based on several assumptions which may not always hold true for any given wife, but are generalizable across the population of North American wives.

  • Women love Alanis Morissette
  • Alanis Morissette has an irritating voice
  • Wives like to remind their husbands of various things they need to do or have forgotten to do. The street term for this is 'nagging' although I prefer the technical term 'feedback.'

The technique

This mor

@blackfist
blackfist / keyczar.py
Created October 14, 2013 02:01
Keyczar example
from keyczar import keyczar
s = 'secret string'
location = '/tmp/kz'
crypter = keyczar.Crypter.Read(location)
s_encrypted = crypter.Encrypt(s)
s_decrypted = crypter.Decrypt(s_encrypted)
print s
print s_encrypted
print s_decrypted
@blackfist
blackfist / internal-misuse.py
Created October 8, 2013 20:19
Takes a CSV file and creates json output
import json
import uuid
import copy
import csv
from datetime import datetime
# putIncident(i, 'blackfist')
def putIncident(i, analyst="blackfist"):
i['plus']['analyst'] = analyst
i['plus']['created'] = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')
@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 / travel-plans.r
Created September 26, 2013 20:47
simple script I use to estimate travel expense for a trip. Modify as needed.
library(mc2d)
flight_min = 323
flight_max = 660
flight_ml - 477
admission = 103.49
hotel_min = 177
hotel_max = 310