In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
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:] |
View SVG-&-CSS3-lab-flask.markdown
SVG & CSS3 lab flask
SVG lab flask with CSS3 animated bubbles and swirls
A Pen by Joey Clouvel on CodePen.
View programmer-films.md
1
std::set phoenix;
phoenix.key_comp();
http://www.imdb.com/title/tt0373889
2
View gist:5935725
------------ | |
CLIENT | |
------------ | |
Calories = new Meteor.Collection("calories") | |
Deps.autorun( -> | |
try | |
Meteor.subscribe('count_by_day', Meteor.user().services.facebook.email) | |
catch err |
View happy_git_on_osx.md
Creating a Happy Git Environment on OS X
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
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/ |
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) { |