Skip to content

Instantly share code, notes, and snippets.

Avatar

Benoit Bovy benbovy

  • Liège (Belgium) / Berlin
  • Twitter @benbovy
View GitHub Profile
@benbovy
benbovy / environment.yml
Created Oct 13, 2021
Fastscape - Drainage area - Coarse grids
View environment.yml
name: fastscape-demo
channels:
- conda-forge
- defaults
dependencies:
- aiohttp=3.6.2=py38h0b31af3_0
- ansiwrap=0.8.4=py_0
- anyio=2.2.0=py38h50d1736_0
- appdirs=1.4.4=pyh9f0ad1d_0
- appnope=0.1.0=py38h32f6830_1001
@benbovy
benbovy / export_xr_mask_as_shp_points.ipynb
Created Oct 7, 2021
Export Xarray raster mask as point shapefile
View export_xr_mask_as_shp_points.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@benbovy
benbovy / arome_fr_analysis.ipynb
Created Jul 23, 2021
Total precipitation forecast / Meteo-France AROME model / Belgium flooding 2021-07
View arome_fr_analysis.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@benbovy
benbovy / test_pys2index.ipynb
Last active Oct 20, 2020
pys2index preliminary tests and benchmarks
View test_pys2index.ipynb
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 Aug 30, 2020
Inference of time exposure and erosion rate from 10Be data using PyMC3
View inference_pymc3_theano.ipynb
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 Jun 26, 2020
Ball Tree Xarray Index
View ball_tree_xr_accessor.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@benbovy
benbovy / test_balltree.ipynb
Created Jun 24, 2020
Nearest neighbor lookup with lat/lon coordinates using sklearn's BallTree
View test_balltree.ipynb
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 Jun 17, 2020
FastAPI flexible routes
View flexible_routes.py
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 / xsimlab_process_class_factory.ipynb
Created Jun 10, 2020
xarray-simlab process class factory
View xsimlab_process_class_factory.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View html_repr_untrusted.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.