Skip to content

Instantly share code, notes, and snippets.

View tommct's full-sized avatar

Tom McTavish tommct

View GitHub Profile
@tommct
tommct / Install_Python.md
Last active April 29, 2024 18:29
Install Python MacOS 14, Pyenv
@tommct
tommct / transformercontext.py
Created July 2, 2021 17:18
Allows for the retrieval of all or parts of the transformations in a sklearn Pipeline, as well as the ability to dynamically bypass parts of the pipeline.
import contextlib
from functools import partial
from sklearn.pipeline import Pipeline
@contextlib.contextmanager
def intermediate_transforms(pipe: Pipeline, keys: list=[], bypass_list: list=[]):
"""Allows for the retrieval of all or parts of the transformations in a
sklearn Pipeline, as well as the ability to dynamically bypass parts of
the pipeline.
@tommct
tommct / interactive_display_pandas.ipynb
Created June 11, 2022 22:32
Update the display of a Pandas DataFrame interactively in a Jupyter Notebook using Jupyter Widgets
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tommct
tommct / Matrix Multiplication Review.ipynb
Last active May 13, 2023 00:25
Intuitions into what matrix multiplications are really and why we employ them in machine learning.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.