-
brew install macvim
or atom
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 pandas as pd | |
import datetime | |
DATA_INPUT = 'data/nonpivoted_data.csv' | |
EPISODE_INPUT = 'data/toy_relabeled_episodes.csv' | |
def date(string): |
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 square(number): | |
number = int(number) | |
return number**2 |
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 findall(haystack, needle): | |
i = 0 | |
while True: | |
j = haystack.find(needle, i) | |
if j is -1: | |
break | |
yield j | |
i = j + 1 |
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
#!/bin/sh | |
R -e 'library(Rserve)' -e 'Rserve(args="--vanilla")' |
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
#!/usr/bin/env python | |
"""\ | |
A short explanation of dependency injection and how to use to make testing | |
easier. | |
Maybe this should be a mocking guide, because everything's going to be a mock | |
object. |
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 nltk | |
from nltk.corpus import brown | |
fd = nltk.FreqDist(brown.words(categories='news')) | |
cfd = nltk.ConditionalFreqDist(brown.tagged_words(categories='news')) | |
avgs = [] |
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
#!/usr/bin/env python | |
"""Run a command and generate an alert when it's done.""" | |
import argparse | |
import subprocess | |
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
#!/usr/bin/env python | |
# Dependencies: | |
# - pip install lxml | |
# - pip install cssselect | |
# - pip install requests | |
import collections | |
import csv |
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
#!/bin/bash | |
USAGE=<<EOF | |
cabal-brew PACKAGE VERSION | |
EOF | |
CABAL=cabal | |
package="$1" | |
keg="cabal-$package" | |
version="$2" |