Skip to content

Instantly share code, notes, and snippets.

View erans's full-sized avatar
💭
Hiring developers in Oakland, thje Bay area and anywhere in the US!

Eran Sandler erans

💭
Hiring developers in Oakland, thje Bay area and anywhere in the US!
View GitHub Profile
@erans
erans / kestrel.sh
Created June 28, 2011 19:04
Twitter’s Kestrel init script for Ubuntu 10.04 Lucid
#!/bin/sh
#
# kestrel init.d script.
#
# All java services require the same directory structure:
# /usr/local/$APP_NAME
# /var/log/$APP_NAME
# /var/run/$APP_NAME
APP_NAME="kestrel"
@erans
erans / get_lat_lon_exif_pil.py
Created May 20, 2011 21:16
Get Latitude and Longitude from EXIF using PIL
from PIL import Image
from PIL.ExifTags import TAGS, GPSTAGS
def get_exif_data(image):
"""Returns a dictionary from the exif data of an PIL Image item. Also converts the GPS Tags"""
exif_data = {}
info = image._getexif()
if info:
for tag, value in info.items():
decoded = TAGS.get(tag, tag)