Skip to content

Instantly share code, notes, and snippets.

View cottrell's full-sized avatar
💭
whooosh

David Cottrell cottrell

💭
whooosh
View GitHub Profile
@cottrell
cottrell / mutual_info.py
Last active June 1, 2021 12:00 — forked from GaelVaroquaux/mutual_info.py
Estimating entropy and mutual information with scikit-learn
'''
Non-parametric computation of entropy and mutual-information
Adapted by G Varoquaux for code created by R Brette, itself
from several papers (see in the code).
These computations rely on nearest-neighbor statistics
'''
import numpy as np
@cottrell
cottrell / discussion.py
Last active October 3, 2023 10:02
Equinox module state extraction and serialization
import dataclasses
import importlib
# begin serialization lib
import io
import json
import lzma
import pickle
from base64 import b64decode, b64encode
from types import FunctionType