Skip to content

Instantly share code, notes, and snippets.

View tbonza2's full-sized avatar

Tyler Brown tbonza2

View GitHub Profile
""" Prepare for elasticsearch """
import re
import os
import json
import pandas as pd
def get_directory_paths(location):
""" Returns dict of paths to all tab-delimited files
{ filename : filepath }
@tbonza2
tbonza2 / data_tracker.md
Last active August 29, 2015 14:15
Keeping track of the data

Data Used in food grades

Keeping track of the data we're using & where it was located.

File Name Location Size Reason Used
Active_Food_Establishment_Licenses.csv [datagov][1] 0.4 M Only want to analyze active restaurants
Food_Establishment_Inspections.csv [datagov][2] 104.0 M Need to know which restaurants were inspected
@tbonza2
tbonza2 / gist:20757551443a61254aa6
Last active November 4, 2016 21:39
Saltstack mode for emacs

Saltstack mode for emacs

Earlier today I was looking for a Saltstack mode for emacs. Couldn't find one, so I posted the question on Stack overflow. Somebody had a good suggestion about using yaml-mode because a Sublime Text implementation appeared to be taking this approach.Another person thought that Saltstack's use of jinja templates would make an emacs mode easy enough to configure. These were both helpful ideas so I wanted to implement parts of each.

Reasoning

After looking around, I found that someone had configured an emacs mode for a similar situation. They needed to combine HTML and Python to use Mako templates for a project not involving Saltstack. Since Edx uses Mako t

@tbonza2
tbonza2 / gist:390c17138bfcc9951c3d
Created August 11, 2014 02:56
emacs zenburn theme
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"\
) t)
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
(load-theme 'zenburn t)