Skip to content

Instantly share code, notes, and snippets.

View benbovy's full-sized avatar

Benoit Bovy benbovy

View GitHub Profile
@benbovy
benbovy / tree.ipynb
Created May 17, 2019 15:50
Phylo trees
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@benbovy
benbovy / integrate_fastscapelib_fortran.ipynb
Last active May 31, 2019 13:51
Wrap fastscapelib-fortran as xarray-simlab components
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@benbovy
benbovy / drainage_area_prototype2_comments.ipynb
Created August 30, 2019 15:29
Flow accumulation with Dask
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@benbovy
benbovy / npzd_xsimlab.ipynb
Last active January 26, 2020 19:34
A simple yet extensible NPZD slab model implemented with xarray-simlab
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@benbovy
benbovy / xsimlab_process_class_factory.ipynb
Created June 10, 2020 08:26
xarray-simlab process class factory
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@benbovy
benbovy / flexible_routes.py
Last active June 17, 2020 15:24
FastAPI flexible routes
from typing import Callable, Dict, Union
from fastapi import APIRouter, Depends, FastAPI, HTTPException
import xarray as xr
DatasetOrCollection = Union[xr.Dataset, Dict[str, xr.Dataset]]
def _get_dataset_dependency(obj: DatasetOrCollection) -> Callable:
@benbovy
benbovy / test_balltree.ipynb
Created June 24, 2020 14:58
Nearest neighbor lookup with lat/lon coordinates using sklearn's BallTree
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@benbovy
benbovy / ball_tree_xr_accessor.ipynb
Last active July 31, 2022 20:58
Ball Tree Xarray Index
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@benbovy
benbovy / inference_pymc3_theano.ipynb
Created August 30, 2020 19:09
Inference of time exposure and erosion rate from 10Be data using PyMC3
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.