Skip to content

Instantly share code, notes, and snippets.

View AndreLester's full-sized avatar

André Kruger AndreLester

  • Private
  • Swellendam, South Africa
View GitHub Profile
@bennyistanto
bennyistanto / UnitHydrographs.ipynb
Last active April 4, 2024 21:44
Obtain a Unit Hydrograph for a basin using the rainfall and streamflow data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mheberger
mheberger / get_watersheds_mghydro.ipynb
Last active October 25, 2023 15:16
Demo using Python to download and save watershed boundaries and rivers geodata via the mghydro.com Global Watersheds web app API
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phargogh
phargogh / routing-example.py
Last active August 29, 2023 05:41
Example of pygeoprocessing-based D8 routing, including watershed delineation.
import os
import shutil
import numpy
import pygeoprocessing
import pygeoprocessing.routing
from osgeo import gdal
def doit(dem_path, flow_dir_weights, watershed_source_vector, workspace):
@ThomasG77
ThomasG77 / README.md
Last active April 8, 2024 20:17
Run PyQGIS in Jupyter Notebook
@alexeygrigorev
alexeygrigorev / tqdm_pool.py
Created December 6, 2018 15:36
Track progress of ProcessPoolExecutor with tqdm
from glob import glob
import multiprocessing
from concurrent.futures import ProcessPoolExecutor
import cv2
from PIL import Image
import imagehash
from tqdm import tqdm
@astrojuanlu
astrojuanlu / navier_plate_fenics.py
Last active May 3, 2024 21:21
Navier plate in Python with FEniCS
# coding: utf-8
"""Simply supported rectangular plate on its four edges with FEniCS
Author: Juan Luis Cano Rodríguez <juanlu@pybonacci.org>
References
----------
* Timoshenko, Stephen, and S. Woinowsky-Krieger. "Theory of Plates and Shells".
New York: McGraw-Hill, 1959.
@darrell
darrell / voronoi.sql
Last active November 22, 2020 03:03
Code to generate Voronoi diagrams in PostGIS using Python. Many thanks to everyone who contributed to this code. Original blog post describing the work is here: http://geogeek.garnix.org/2012/04/faster-voronoi-diagrams-in-postgis.html
CREATE OR REPLACE FUNCTION voronoi(table_name text,geom_col text) returns SETOF record as $$
#############################################################################
#
# Voronoi diagram calculator/ Delaunay triangulator
# Translated to Python by Bill Simons
# September, 2005
#
# Additional changes by Carson Farmer added November 2010
#