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 September 4, 2025 18:46
Obtain a Unit Hydrograph for a basin using the rainfall and streamflow data
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@veekaybee
veekaybee / normcore-llm.md
Last active March 5, 2026 10:16
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@vadimkantorov
vadimkantorov / csharpfrompython.cs
Last active December 31, 2025 14:59
Run a C# function from Python using Python.NET from https://pythonnet.github.io/pythonnet/python.html Call csharpfrompython.py which first calls the compiler and then calls the functions, feature request of better compiler bindings at https://github.com/pythonnet/pythonnet/issues/2196 ; includes two examples of NumPy -> C# array marshalling
namespace CSharpFromPythonNamespace
{
public class CSharpFromPythonClass
{
public string Hi(string x)
{
return "Hi " + x;
}
public static string Hello(string x)
@mheberger
mheberger / get_watersheds_mghydro.ipynb
Last active March 3, 2025 15:18
Demo using Python to download and save watershed boundaries and rivers geodata via the mghydro.com Global Watersheds web app API
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@4wk-
4wk- / README.md
Last active February 23, 2026 14:39
Clean uninstall then reinstall of WSL on Windows 10, with systemD support

Uninstall then reinstall WSL on Windows 10 (clean way)

Background

I've been using wsl (version 2) with genie mod for years without issue, but one day, Windows 10 finally catch up on wsl Windows 11 features and gives us a way to use systemD natively.

I wanted to use the new "right way" to enable systemD on Windows Subsystem for Linux (without genie), and I also had a (probably related) infinite Windows RemoteApp error poping in.

Fixing it

A - Uninstall wsl and related stuff

  1. In powershell (as admin)
Loading
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):
@richpsharp
richpsharp / example_stream_subwatershed_script.py
Created February 13, 2021 21:11
Demo of how to extract streams and subwatersheds
"""Tracer for floodplain extraction function with custom parameters."""
import logging
import os
import sys
import pygeoprocessing
import pygeoprocessing.routing
import numpy
logging.basicConfig(
@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