Skip to content

Instantly share code, notes, and snippets.

View dylanvee's full-sized avatar

Dylan Vassallo dylanvee

  • San Francisco, CA
  • 18:23 (UTC -08:00)
View GitHub Profile
@dylanvee
dylanvee / models.py
Created January 20, 2011 02:28
Django model definitions for Collector, Observation, and USDA Query
from django.db import models
# Collectors run for each county both when a new user requests data and periodically for existing users.
class Collector(models.Model):
name = models.CharField(max_length=100)
priority = models.IntField()
# Collectors create Observations
class Observation(models.Model):
scientific_name = models.CharField(max_length=100)
@dylanvee
dylanvee / json_example.py
Created March 23, 2011 22:08
Demo of the simplejson library
#!/usr/local/bin/python
import simplejson
plant_of_the_week = {
"name":"American pasqueflower",
"haiku":"Beautifully purple...",
"link":"http://www.neoninc.org/..."
}
@dylanvee
dylanvee / gist:985866
Created May 22, 2011 20:38
brew --config
HOMEBREW_VERSION: 0.8
HEAD: c6aa5b252ea88595a8867edb5d09a1ac5818e318
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: dual-core 64-bit penryn
OS X: 10.6.7
Kernel Architecture: i386
Ruby: 1.8.7-174
@dylanvee
dylanvee / ushcn_to_mysql.py
Created July 6, 2011 23:26
mysql-ctypes test case
#!/usr/local/bin/python
# ushcn_to_mysql.py - A script for importing USHCN data into MySQL
# Copyright (c) 2010, Center for Embedded Networked Sensing (CENS).
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
@dylanvee
dylanvee / instapaper_traceroute.txt
Created July 15, 2011 05:01
traceroute instapaper.com
dmv-laptop:~ dylan$ traceroute instapaper.com
traceroute to instapaper.com (184.172.0.213), 64 hops max, 52 byte packets
1 192.168.0.1 (192.168.0.1) 3.278 ms 1.216 ms 1.907 ms
2 cpe-98-149-160-1.socal.res.rr.com (98.149.160.1) 9.222 ms 10.589 ms 8.446 ms
3 gig13-28.vnnyca2-rtr1.socal.rr.com (76.167.5.121) 11.555 ms 12.110 ms 31.020 ms
4 ae8.vnnyca2-rtr1.socal.rr.com (66.75.147.22) 16.769 ms 13.779 ms 12.452 ms
5 be13-lsanca4-rtr1.socal.rr.com (66.75.147.3) 34.047 ms 21.723 ms 24.207 ms
6 107.14.19.32 (107.14.19.32) 13.998 ms 15.883 ms 20.619 ms
7 ae-0-0.pr0.lax00.tbone.rr.com (66.109.6.135) 18.119 ms
107.14.19.138 (107.14.19.138) 14.789 ms 15.044 ms
@dylanvee
dylanvee / gist:1103246
Created July 24, 2011 23:40
brew install -v beanstalkd
==> Downloading http://xph.us/dist/beanstalkd/beanstalkd-1.4.6.tar.gz
File already downloaded in /Users/dylan/Library/Caches/Homebrew
/usr/bin/tar xf /Users/dylan/Library/Caches/Homebrew/beanstalk-1.4.6.tar.gz
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/beanstalk/1.4.6 --with-event=/usr/local
./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/beanstalk/1.4.6 --with-event=/usr/local
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
GIT
remote: git://github.com/dylanvee/em-postgresql-adapter.git
revision: b9b21255d145d8bf0afe284b0219f3c5835461ca
specs:
em-postgresql-adapter (0.1)
pg (>= 0.8.0)
GEM
remote: http://rubygems.org/
remote: http://rubygems.org/
source :rubygems
source :gemcutter
group :app do
gem 'sinatra'
gem 'sinatra-synchrony'
gem 'faye'
gem 'koala'
end
@dylanvee
dylanvee / gist:1163869
Created August 22, 2011 23:01 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job: Undergrad researcher at the UCLA Center for Embedded Networked Sensing. I work in the area of participatory sensing, which uses mobile phones as a distributed sensor network for performing research in areas such as ecology and health.
Favorite Python project: My summer project at UCLA CENS was to add a prediction model to our research project that employs volunteer citizen scientists who track the growth of their plants over time to learn about changes in microclimates. Using my (Python/Django + historical weather data + custom algorithm) system, participants can not only contribute data to our research, but they can now learn more about the lifecycles of their plants/crops.
Favorite Conference: I'm an undergraduate student, so this would be my first conference.
Python Experience Level: Intermediate/advanced
@dylanvee
dylanvee / ir_black.bbcolors
Created September 28, 2011 17:11 — forked from pgib/bbedit_colours.sh
IR_Black theme for TextWrangler
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>(null)_Other</key>
<string>rgba(0.866667,0.031373,0.023529,1.0)</string>
<key>(null)_Spaces</key>
<string>rgba(0.498039,0.498039,0.498039,1.0)</string>
<key>BackgroundColor</key>
<string>rgba(0.122179,0.122179,0.122179,1.0)</string>