Skip to content

Instantly share code, notes, and snippets.

Avatar

Collin Donahue-Oponski colllin

View GitHub Profile
@aerispaha
aerispaha / read_shapefile.py
Created Jan 14, 2017
Read a shapefile into a Pandas dataframe
View read_shapefile.py
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 Feb 28, 2021
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
View Install NVIDIA Driver and CUDA.md
View SVG-&-CSS3-lab-flask.markdown
@jrhone
jrhone / gist:5935725
Created Jul 5, 2013
Meteor Mongo Aggregation Framework using Publish
View gist:5935725
------------
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 Feb 26, 2021
Creating a Happy Git Environment on OS X
View happy_git_on_osx.md

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 Sep 4, 2011
Classes to calculate Tile coordinates
View globalmaptiles.py
#!/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 Jul 19, 2011
custom openlayers click handler compatible with touch events
View openlayers-click-handler.js
// Create click handler
OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
defaultHandlerOptions: {
'single': true,
'double': false,
'pixelTolerance': 0,
'stopSingle': false,
'stopDouble': false
},
initialize: function(options) {