Skip to content

Instantly share code, notes, and snippets.

View danabauer's full-sized avatar

Dana Bauer danabauer

  • Philadelphia
  • 21:34 (UTC -04:00)
View GitHub Profile
@coderanger
coderanger / holidays.py
Created March 23, 2013 22:49
Find streaks of days that overlap no holidays
# coding=utf-8
import datetime
from dateutil.parser import parse
# From http://www.huffingtonpost.com/2013/01/01/religious-holidays-2013_n_2372650.html
raw_holidays = """
Baha'i Holidays 2013:
Jan 20 - World Religion Day
Mar 2-20 - Baha'i Fast
Mar 20 - Nowruz (Baha'i, Zoroastrian, Iranian New Year)
@rxaviers
rxaviers / gist:7360908
Last active April 6, 2026 10:05
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
[rack] pug:devsite jesse$ time nova boot trash2 --key-name "my_key" --flavor performance1-1 --image dee7f62b-cbb1-4fdc-8dc5-33e408d8c599 --poll
+------------------------+--------------------------------------------------+
| Property | Value |
+------------------------+--------------------------------------------------+
| status | BUILD |
| updated | 2013-11-08T01:09:40Z |
| OS-EXT-STS:task_state | scheduling |
| key_name | my_key |
| image | Ubuntu 13.04 (Raring Ringtail) (Beta PVHVM Mode) |
| hostId | |
@barnabemonnot
barnabemonnot / caterpillar.js
Created November 24, 2013 00:17
This is a Gist to accompany my article Dynamic D3.js with a simple caterpillar example (http://blablarnab.com/wordpress/2013/11/23/dynamic-d3-js-with-a-simple-caterpillar-example/). It shows how to dynamically update a force layout with D3.js, making real-time applications easier to configure by clearly separating the handling of the data with i…
var vv = window,
w = vv.innerWidth,
h = vv.innerHeight;
var svg = d3.select("#animviz")
.append("svg")
.attr("width", w)
.attr("height", h);
svg.append("g").attr("class", "links");

This is my default career advice for people starting out in geo/GIS, especially remote sensing, adapted from a response to a letter in 2013.

I'm currently about to start a Geography degree at the University of [Redacted] at [Redacted] with a focus in GIS, and I've been finding that I have an interest in working with imagery. Obviously I should take Remote Sensing and other similar classes, but I'm the type of person who likes to self learn as well. So my question is this: What recommendations would you give to a student who is interested in working with imagery? Are there any self study paths that you could recommend?

I learned on my own and on the job, and there are a lot of important topics in GIS that I don’t know anything about, so I can’t give comprehensive advice. I haven’t arrived anywhere; I’m just ten minutes ahead in the convoy we’re both in. Take these recommendations critically.

Find interesting people. You’ll learn a lot more from a great professor (or mentor, or friend, or conference) o

@peterkuma
peterkuma / server.py
Created February 10, 2014 14:22
A flask server for serving all JPEG images in a local directory and subdirectories. Uses unveil.js for lazy-loading of images. Thumbnails are created on the fly by PIL.
#!/bin/python
import os
from flask import Flask, Response, request, abort, render_template_string, send_from_directory
import Image
import StringIO
app = Flask(__name__)
WIDTH = 1000
@rgbkrk
rgbkrk / novaswift.sh
Created March 4, 2014 02:28
Nova and Swift cred layout for Rackspace
# Nova Client Settings
OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0/
OS_VERSION=2.0
OS_AUTH_SYSTEM=rackspace
OS_REGION_NAME=IAD
OS_SERVICE_NAME=cloudserversOpenStack
OS_TENANT_NAME=<TENANT_ID>
OS_NO_CACHE=1
OS_USERNAME=<USERNAME>
OS_PASSWORD=<API_KEY>
@mtayseer
mtayseer / print_pkg_deps.py
Last active August 29, 2015 14:01
Print a list of all installed Python packages & their dependencies
import pkg_resources, pprint
requires = {p.key: [r.key for r in p.requires()] for p in pkg_resources.working_set}
def graph(pkg):
if not requires[pkg]:
return {pkg: {}}
return {pkg: {k: v for p in requires[pkg] for k, v in graph(p).items() }}
@onyxfish
onyxfish / ordered_json.py
Created May 29, 2014 17:25
Usage of object_pairs_hook to load JSON with guaranteed key order
#!/usr/bin/env python
from collections import OrderedDict
import json
write_data = OrderedDict([
('a', '1'),
('b', '2'),
('c', '3')
])