Just a standard python install should be fine, so long as you have numpy
available.
Alternatively, a local conda environment would work well for this:
mandoc -Tmarkdown /usr/share/man/man1/sed.1 | pandoc -f markdown -t epub --metadata title="Man 1 Sed" > man1sed.epub |
import os | |
import pygeoprocessing | |
import numpy | |
from osgeo import gdal, osr | |
_PROJECTION_SRS = osr.SpatialReference() | |
_PROJECTION_SRS.ImportFromEPSG(26910) # UTM Zone 10N | |
PROJECTION_WKT = _PROJECTION_SRS.ExportToWkt() | |
# taken from https://spatialreference.org/ref/epsg/26910/ | |
ORIGIN = (224215.8977, 3810589.9220) |
import timeit | |
SETUP = 'import numpy' | |
SHAPE = 10000 | |
ZEROS = ( | |
'a=numpy.zeros(10000, dtype={dtype}); ' | |
'b=numpy.zeros(10000, dtype={dtype}); x=a+b') | |
ONES = ( | |
'a=numpy.zeros(10000, dtype={dtype}); ' | |
'b=numpy.zeros(10000, dtype={dtype}); x=a+b') |
import time | |
import os | |
from natcap.invest import stormwater | |
import pygeoprocessing | |
from osgeo import gdal, osr | |
import numpy | |
import numpy.random | |
import json | |
import sys | |
import os | |
import importlib | |
import pkgutil | |
import natcap.invest | |
module_stack = list(pkgutil.iter_modules( | |
natcap.invest.__path__, natcap.invest.__name__ + '.')) |
" Example usage: | |
" Launch a new vim session by (bash) $ find src -name "*py" | xargs grep -l ARGS_SPEC\ = | xargs vim | |
" argdo formati18n.vim | |
execute '%s/"about": (/"about": _(/g' | |
execute '%s/"name": "\(\p\+\)"/"name": _("\1")/g' | |
execute '%s/"model_name": "\(\p\+\)"/"model_name": _("\1")/g' | |
execute "normal! 3Giimport gettext\r\<Esc>" | |
" The & looks to add the original matched pattern. |
import numpy | |
import scipy.signal | |
# 1's represent pixels that are an impervious landcover. | |
# Derived from the landcover classification. | |
impervious_mask = numpy.array([ | |
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | |
[0, 0, 1, 0, 0, 0, 0, 0, 0, 0], | |
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | |
[0, 0, 0, 0, 0, 1, 0, 0, 0, 0], |
sphinx | |
rstcheck | |
taskgraph |
import sympy.parsing.latex | |
CARBON_EQ_21 = r"V\frac{sequest_x}{yr\_fut-yr\_cur}\sum^{yr\_fut-yr\_cur-1}_{t=0}\frac{1}{\left(1+\frac{r}{100}\right)^t\left(1+\frac{c}{100}\right)^t}" | |
CARBON_EQ_21_SIMPLE = r"V\frac{s}{fut-cur}\sum^{fut-cur-1}_{t=0}\frac{1}{\left(1+\frac{r}{100}\right)^t\left(1+\frac{c}{100}\right)^t}" | |
def replace(string): | |
return string.replace(r'\_', r'\textunderscore') |