Recommended reading for Django best practices: http://django.2scoops.org/
Background reading on Forms: http://diveintohtml5.info/forms.html
- style differences:
#!/bin/bash | |
# | |
# Install Postgres 9.1, PostGIS 2.0 and pgRouting on a clean Ubuntu 12.04 install (64 bit) | |
# updated to PostGIS 2.0.1 | |
# basics | |
apt-get install python-software-properties | |
apt-add-repository ppa:sharpie/for-science # To get GEOS 3.3.3 | |
# install the following pacakages |
Stop number | Name without locality | Locality | Locality number | Code | Name | NaPTAN stop class | NaPTANId | Easting | Northing | |
---|---|---|---|---|---|---|---|---|---|---|
1 | Pearse Street (Pearse Avenue) | Sallynoggin | E0825024 | ->NE2 | Stop No. 3234 | BCT | 8250DB003234 | 724091 | 726427 | |
1 | Pearse Street (Pearse Avenue) | Sallynoggin | E0825024 | ->SW1 | Stop No. 3210 | BCT | 8250DB003210 | 724087 | 726412 | |
2 | Lr. Drumcondra Road | Drumcondra (Dublin) | E0822021 | 1 | Drumcondra Road Lower | BCT | 825000101 | 715947 | 736197 | |
2 | Lr. Drumcondra Road | Drumcondra (Dublin) | E0822021 | 2 | Drumcondra Road Lower | BCT | 8250B1001201 | 715929 | 736199 | |
3 | Clontarf Road Junction Strandville Avenu | Clontarf | E0822038 | 1 | Stop No. 1741 | BCT | 8220DB001741 | 718428 | 736222 | |
4 | College Green | Dublin City South | E0822091 | 1 | Taxi Rank | TXR | 8220TR000078 | 715797 | 734107 | |
4 | College Green | Dublin City South | E0822091 | 2 | Stop No. 1359 | BCT | 8220DB001359 | 715770 | 734095 | |
4 | College Green | Dublin City South | E0822091 | 3 | College Green | BCT | 825000157 | 715769 | 734095 | |
4 | College Green | Dublin City South | E0822091 | 4 | Stop No. 4522 | BCT | 8220DB004522 | 715821 | 734081 |
/* | |
Feb 5, 2013 | |
Original source from here: http://punkish.org/Voronoi-Diagrams-In-PostGIS | |
Updated old PostGIS function names to work with PostGIS2.0 (buffer, intersect, intersection and srid) | |
-djq | |
This function uses the deldir library in R to generate voronoi polygons for | |
an input set of points in a PostGIS table. | |
Original function by Mike Leahy mgleahy at alumni.uwaterloo.ca |
Recommended reading for Django best practices: http://django.2scoops.org/
Background reading on Forms: http://diveintohtml5.info/forms.html
#!/bin/sh | |
####################################################### | |
# UNIX TREE # | |
# Version: 2.3 # | |
# File: ~/apps/tree/tree.sh # | |
# # | |
# Displays Structure of Directory Hierarchy # | |
# ------------------------------------------------- # | |
# This tiny script uses "ls", "grep", and "sed" # | |
# in a single command to show the nesting of # |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>Testing Pie Chart</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.4.5"></script> | |
<!-- Source for example located at: http://bl.ocks.org/1203641 --> |
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "AWS CloudFormation Template: This template installs a single-instance with dev environment for elastic beanstalk as well as Jenkins server. This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you create a stack from this template.", | |
"Parameters" : { | |
"EC2Tag" : { | |
"Description" : "EC2 tag name", | |
"Type" : "String" | |
}, |
Elephant Seals: | |
https://vimeo.com/93175979 | |
Love Is Making Its Way Back Home (Josh Ritter): | |
https://www.youtube.com/watch?v=dzMN0TTpblg | |
from django.contrib.gis.geos import GEOSGeometry | |
# sample data | |
geom_1 = GEOSGeometry('POLYGON((-71.8 42.1,-70.6 42.1,-70.5 41.2,-71.8 41.2,-71.8 42.1))') | |
geom_2 = GEOSGeometry('POLYGON((-71.12 42.23,-71.48 42.34,-71.52 42.55,-71.12 42.23))') | |
geom_3 = GEOSGeometry('POLYGON((-73.12 42.23,-71.48 42.34,-71.52 42.55,-73.12 42.23))') | |
polygons = [geom_1, geom_2, geom_3] | |
# get first polygon | |
polygon_union = polygons[0] |
Verifying that +djq is my openname (Bitcoin username). https://onename.com/djq |