Skip to content

Instantly share code, notes, and snippets.

View br0nstein's full-sized avatar

Aaron Braunstein br0nstein

View GitHub Profile

Keybase proof

I hereby claim:

  • I am br0nstein on github.
  • I am braunsteindremio (https://keybase.io/braunsteindremio) on keybase.
  • I have a public key whose fingerprint is D201 86A7 3425 B97A F140 4672 EB7A 4D6C 5E82 8A5C

To claim this, I am signing this object:

@br0nstein
br0nstein / locations_tag.py
Created April 25, 2014 12:49
Generates a JSON file of all location names in each text file in a given directory
import os
import sys
import json
import ner # pyner
def locations_tag(directory):
"""
Finds location terms in all text files in a given directory
Input:

Upon getting to work and trying to follow our schedule, we have realized that we planned to have too many things due in a very short period of time. We are in the process of adjusting the schedule and replanning what needs to be done. However, the three of us have been working on a few different tasks during the break.

Clare has been working on a draft of the close reading. Her rough draft includes an introduction, analysis of Arkansas, discussion of the advantages of the digital, and conclusion. The analysis of Arkansas will act as a prototype of what she plans to do with the conclusions she is reaching about Mississippi and Texas, although her data collection requires more time than previously realized. She plans on diversifying advertisement examples, as her current examples are from a few select years. We will discuss suggestions for the progress of the essay with Dr. McDaniel.

Aaron wrote a python script called placetagger.py that tags locations in each advertisement. He ran the cleaned advertisements

@br0nstein
br0nstein / dice_image.py
Last active August 29, 2015 13:56
Script to generate a series of crops of a source image
import Image
import random
def dice_image(input_image, width, height, num_pics):
"""
Dice_image creates num_pics images from a source image. It passes
a window of specified size over the image, crops and
exports new images.
Inputs: