Skip to content

Instantly share code, notes, and snippets.

View colllin's full-sized avatar

Collin Kindrom colllin

View GitHub Profile
@aerispaha
aerispaha / read_shapefile.py
Created January 14, 2017 19:09
Read a shapefile into a Pandas dataframe
def read_shapefile(shp_path):
"""
Read a shapefile into a Pandas dataframe with a 'coords' column holding
the geometry information. This uses the pyshp package
"""
import shapefile
#read file, parse out the records and shapes
sf = shapefile.Reader(shp_path)
fields = [x[0] for x in sf.fields][1:]
@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active April 23, 2024 02:03
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@wintercounter
wintercounter / gist:49863501f5085e0c3300
Created August 30, 2014 18:28
MutationObserver Polyfill
(function() {
var MutationObserver;
if (window.MutationObserver != null) {
return;
}
MutationObserver = (function() {
function MutationObserver(callBack) {
this.callBack = callBack;
@joeyinbox
joeyinbox / SVG-&-CSS3-lab-flask.markdown
Last active August 29, 2015 13:56
A Pen by Joey Clouvel.
@jrhone
jrhone / gist:5935725
Created July 5, 2013 16:37
Meteor Mongo Aggregation Framework using Publish
------------
CLIENT
------------
Calories = new Meteor.Collection("calories")
Deps.autorun( ->
try
Meteor.subscribe('count_by_day', Meteor.user().services.facebook.email)
catch err
@trey
trey / happy_git_on_osx.md
Last active February 18, 2024 10:46
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@tucotuco
tucotuco / globalmaptiles.py
Created September 4, 2011 21:56
Classes to calculate Tile coordinates
#!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL2Tiles, Google Summer of Code 2007 & 2008
# Global Map Tiles Classes
# Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326,
# generate a simple HTML viewers based on Google Maps and OpenLayers
# Author: Klokan Petr Pridal, klokan at klokan dot cz
# Web: http://www.klokan.cz/projects/gdal2tiles/
@cspanring
cspanring / openlayers-click-handler.js
Created July 19, 2011 02:43
custom openlayers click handler compatible with touch events
// Create click handler
OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
defaultHandlerOptions: {
'single': true,
'double': false,
'pixelTolerance': 0,
'stopSingle': false,
'stopDouble': false
},
initialize: function(options) {