Skip to content

Instantly share code, notes, and snippets.

View dandye's full-sized avatar

DanDye dandye

View GitHub Profile
@dandye
dandye / gist:8699831
Created January 29, 2014 23:57
Next PyBulls Meeting
{
"metadata": {
"name": "Next PyBulls Meeting"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@dandye
dandye / gist:8699875
Last active August 29, 2015 13:55
Next Python Meeting
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@dandye
dandye / gist:10559548
Created April 12, 2014 22:16
Is _Perl_better_than_Python
EXTERIOR: DAGOBAH -- DAY
With Yoda strapped to his back, Luke climbs up one ofthe many thick vines that grow in the swamp until hereaches the Dagobah statistics lab.
Panting heavily, hecontinues his exercises -- grepping, installing newpackages, logging in as root, and writing replacements fortwo-year-old shell scripts in Python.
YODA: Code! Yes. A programmer's strength flows from code maintainability.
But beware of Perl. Terse syntax... more than one way to do it... default variables.
The dark side of code maintainability are they.
@dandye
dandye / gist:1383b5f23b9f30e4de4c
Created May 7, 2014 01:34
Intro to Open Source Geospatial with Python
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@dandye
dandye / gist:ab99ac9f7e2398c37fbe
Created May 29, 2014 02:08
Time Series analysis for CHNEP Step0
{
"metadata": {
"name": "step0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@dandye
dandye / gist:771bfe02ca9006309ada
Created May 30, 2014 02:21
CHNEP Time Series step3
{
"metadata": {
"name": "step3"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@dandye
dandye / sproc_search
Created June 27, 2014 13:48
Search all SQL Server stored procedures and views within current database for specific text.
@dandye
dandye / merge_matched
Created June 27, 2014 18:37
merge_matched
MERGE table_a AS trg
USING table_b AS src
ON (trg.ID = src.ID)
WHEN MATCHED
THEN UPDATE SET trg.f1 = src.f1
#ddye@ubuntu:~# cd /usr/local/otm/
#ddye@ubuntu:/usr/local/otm# source env/bin/activate
#(env)ddye@ubuntu:/usr/local/otm# cd app/opentreemap/
#(env)ddye@ubuntu:/usr/local/otm/app/opentreemap# python manage.py shell
#Python 2.7.3 (default, Feb 27 2014, 19:58:35)
#[GCC 4.6.3] on linux2
#Type "help", "copyright", "credits" or "license" for more information.
#(InteractiveConsole)
#>>>
from django.db import models
@dandye
dandye / gist:c5c3251b6e26d9058592
Last active August 29, 2015 14:05
OpenTreeMap2 create bbox for instance
select ST_Transform(ST_MPolyFromText(
'MULTIPOLYGON(((-82.4048638930815 27.5218423579402,
-82.5226783079082 27.5218423579402,
-82.5226783079082 28.4201576420597,
-82.4048638930815 28.4201576420597,
-82.4048638930815 27.5218423579402)))', 4326), 3857);