Skip to content

Instantly share code, notes, and snippets.

@schwehr
schwehr / gist:4535854
Last active December 11, 2015 03:09
Quick tutorial for J.B. on fink and python
fink selfupdate
fink install python
fink install ipython2.7
fink install shapely-py27
fink install matplotlib-py27 scipy-py27 pandas-py27 # Good science packages
dpkg -L shapely-py27 # see all the files installed by fink for shapely
dpkg -L shapely-py27 | grep wkb
# /sw/lib/python2.7/site-packages/shapely/wkb.py
# /sw/lib/python2.7/site-packages/shapely/wkb.pyc
@schwehr
schwehr / gist:4645485
Created January 27, 2013 00:26
Trying to build grib_api 1.10.0 on mac osx 10.8
./grib_api-1.10.0/configure --with-jasper=/sw --prefix=/Users/schwehr/Desktop/grib/test-install
make -j 3
Making all in src
Makefile:1406: dummy.am: No such file or directory
make[1]: *** No rule to make target `dummy.am'. Stop.
make: *** [all-recursive] Error 1
# found all dummy.am files and copied them into the VPATH build directory tree. Then that issue went away.
@schwehr
schwehr / opencv-learning.ipynb
Created February 1, 2013 21:40
OpenCV IPython Notebook looking at contours and what you can do with the shape morphology functions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@schwehr
schwehr / mbcookbook.ipynb
Last active June 8, 2023 18:39
Working through the mbsystem cookbook as an IPython Notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@schwehr
schwehr / mbcookbook2.ipynb
Created February 4, 2013 15:30
Beginning of Chapter 4 of the MB Cookbook... using MB System for multibeam sonar data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@schwehr
schwehr / sklearn.ipynb
Created February 10, 2013 07:16
scikit-learn from watching Jake's (http://jakevdp.github.com/) PyData 2012 video: http://youtu.be/cHZONQ2-x7I
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@schwehr
schwehr / sklearn.ipynb
Created February 10, 2013 07:21
sklearn.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@schwehr
schwehr / gist:4748768
Created February 10, 2013 07:29
Getting the newest versions of the key python libraries before I did Jake's PyData 2012 tutorial.
sudo apt-get install python-virtualenv
virtualenv --system-site-packages sklearn-ve
source sklearn-ve/bin/activate
# What is out of date?
pip install yolk
yolk -U
# ipython 0.12.1 (0.13.1)
# matplotlib 1.1.1rc (1.2.0)
# numpy 1.6.1 (1.6.2)
@schwehr
schwehr / sklearn_tutorial.py
Created February 10, 2013 07:38
sklearn python from going through Jake's video
import numpy as np
X = np.random.random((100, 4))
X.shape
from sklearn import datasets
data = datasets.load_iris()
iris = datasets.load_iris()
@schwehr
schwehr / gdal_geotiff_metadata.ipynb
Created February 22, 2013 19:57
Using gdal to read/write the metadata fields for a geotiff and for specific bands within the geotiff.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.