This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To run a python program (such as nosetests) in GDB, do the following: | |
$ gdb --args python -m nose | |
Then at the gdb shell: | |
> start | |
> continue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import collections | |
from osgeo import gdal | |
RasterStats = collections.namedtuple('RasterStats', ['min', 'max']) | |
def get_raster_values_from_attr_table(filepath, band_index): | |
gdal_dataset = gdal.OpenEx(filepath, gdal.OF_RASTER) | |
band = gdal_dataset.GetRasterBand(1) | |
attr_table = band.GetDefaultRAT() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This a file in a gist. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Module for preprocessing operations.""" | |
# Including all import statements from the original file, in case that matters | |
# Original file available (raw) at http://adept.invest-natcap.googlecode.com/hg/adept/preprocessing.py | |
import os | |
import logging | |
import tempfile | |
import shutil | |
import math | |
import json |
NewerOlder