Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter Roelants peterroelants

View GitHub Profile
@peterroelants
peterroelants / linear_regression_SVI.ipynb
Last active Oct 12, 2021
NumPyro SVI linear regression
View linear_regression_SVI.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Poisson_unnormalized.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@peterroelants
peterroelants / GMM-discrete.ipynb
Last active Aug 13, 2021
Numpyro AssertionError sample(key=None)
View GMM-discrete.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View overlay_hists.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@peterroelants
peterroelants / hv_cmap_alpha.ipynb
Last active Jul 14, 2021
Holoviews Bokeh cmap alpha not working
View hv_cmap_alpha.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@peterroelants
peterroelants / Dockerfile
Last active May 2, 2021
Build minimal Python environment with Pydantic
View Dockerfile
# Build with:
# DOCKER_BUILDKIT=1 docker build --progress=plain --target pydantic_env --tag pydantic-test-env --file ./pydantic/pydantic.static.Dockerfile .
#
# Uses multi-stage builds.
#
# Stage 1: Temporarity builder
FROM python:3.9.2-slim-buster as builder
ARG PYDANTIC_VERSION=1.8.1
View jax_conda_env.yml
name: jax_deps
channels:
- conda-forge
dependencies:
- flake8
- jaxlib
- jupytext
- jupyter-sphinx
- matplotlib
- mypy
@peterroelants
peterroelants / alluxio.fuse.compose.yml
Created Mar 12, 2021
Alluxio with FUSE container setup based on Alluxio Documentation
View alluxio.fuse.compose.yml
# Alluxio Docker Deployment
# Based on "Using User-Defined Network" configuration from:
# https://docs.alluxio.io/os/user/stable/en/deploy/Running-Alluxio-On-Docker.html
version: '3.8'
networks:
alluxio-network:
name: alluxio-network
driver: bridge
@peterroelants
peterroelants / docker-compose.yml
Last active Feb 25, 2021
Alluxio glasfish error
View docker-compose.yml
# Alluxio Docker Deployment
# Based on "Using User-Defined Network" configuration from:
# https://docs.alluxio.io/os/user/stable/en/deploy/Running-Alluxio-On-Docker.html
version: '3.8'
networks:
alluxio_network:
name: alluxio_network
driver: bridge
@peterroelants
peterroelants / pip_compile_snippet.Dockerfile
Created Feb 12, 2021
Reduce python container size by compiling with pip
View pip_compile_snippet.Dockerfile
# Install python packages with pip using compilation to reduce size
# - https://towardsdatascience.com/how-to-shrink-numpy-scipy-pandas-and-matplotlib-for-your-data-product-4ec8d7e86ee4
# - https://avilpage.com/2020/02/reduce-python-package-footprint.html
# - https://stackoverflow.com/a/22942120
# - https://blog.mapbox.com/aws-lambda-python-magic-e0f6a407ffc6
# `/usr/local/bin/python3-config --cflags` should be applied automatically, the
# following flags extend these.
RUN pip install --upgrade pip \
&& export CFLAGS="${CFLAGS} -g0 -Wl,--strip-all -Os -I/usr/include:/usr/local/include" \
&& export LDFLAGS="${LDFLAGS} -L/usr/lib:/usr/local/lib" \