Skip to content

Instantly share code, notes, and snippets.

Avatar

Nathan Woodrow NathanW2

View GitHub Profile
View gist:4029400
from qgis.core import *
from qgis.gui import *
from PyQt4.QtCore import *
from PyQt4.QtGui import QApplication
from PyQt4.QtXml import *
import sys
import xml.etree.ElementTree as ET
app = QgsApplication([], True)
@jkp
jkp / websocketserver.py
Created Jul 18, 2012
A simple WebSockets server with no dependencies
View websocketserver.py
import struct
import SocketServer
from base64 import b64encode
from hashlib import sha1
from mimetools import Message
from StringIO import StringIO
class WebSocketsHandler(SocketServer.StreamRequestHandler):
magic = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'
@sgillies
sgillies / geo_interface.rst
Last active Oct 19, 2020
A Python Protocol for Geospatial Data
View geo_interface.rst

Author: Sean Gillies Version: 1.0

Abstract

This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.

Introduction

View git-svn-diff.sh
#!/bin/bash
#
# git-svn-diff originally by (http://mojodna.net/2009/02/24/my-work-git-workflow.html)
# modified by mike@mikepearce.net
# modified by aconway@[redacted] - handle diffs that introduce new files
#
# Generate an SVN-compatible diff against the tip of the tracking branch
# Get the tracking branch (if we're on a branch)
TRACKING_BRANCH=`git svn info | grep URL | sed -e 's/.*\/branches\///'`
You can’t perform that action at this time.