Skip to content

Instantly share code, notes, and snippets.

View chafreaky's full-sized avatar
👋

chafreaky chafreaky

👋
View GitHub Profile
@chafreaky
chafreaky / merge_csv.py
Last active May 2, 2017 11:31
Scans for all zipped files within a directory (recursively), opens archives and reads the csv files inside the archives. Append all csv files into a single one named 'output.csv'. Useful for creating a single file from thousands of different csv files. Skips headers.
import os
import fnmatch
import zipfile
import StringIO
import csv
print('Scanning for files ...')
count = 0
for r, d, f in os.walk(os.path.dirname(os.path.abspath(__file__))):
for fn in fnmatch.filter(f, '*.zip'):
# coding=UTF-8
import nltk
from nltk.corpus import brown
# This is a fast and simple noun phrase extractor (based on NLTK)
# Feel free to use it, just keep a link back to this post
# http://thetokenizer.com/2013/05/09/efficient-way-to-extract-the-main-topics-of-a-sentence/
# Create by Shlomi Babluki
# May, 2013
@dandrews
dandrews / AngelList Markets
Created April 11, 2013 19:48
All AngelList Markets tags, sorted alphabetically. Scraped from https://angel.co/markets on 4/11/2013.
Accounting
Active Lifestyle
Ad Targeting
Adult
Advanced Materials
Adventure Travel
Advertising
Advertising Exchanges
Advertising Networks
Advertising Platforms
@robrighter
robrighter / gist:897565
Created April 1, 2011 00:59
Walk a JSON/Javascript tree to grab all values for a given key
function traverse(obj,func, parent) {
for (i in obj){
func.apply(this,[i,obj[i],parent]);
if (obj[i] instanceof Object && !(obj[i] instanceof Array)) {
traverse(obj[i],func, i);
}
}
}
function getPropertyRecursive(obj, property){