Skip to main content

teefoml

teefoml bundles nine original machine-learning lab notebooks and provides a small, cross-platform API for displaying their source in Jupyter Notebook, JupyterLab, Google Colab, and VS Code. Displaying a lab never executes its code.

Installation

python -m pip install teefoml

Python 3.10 and newer is supported. Installation also installs IPython, NumPy, Matplotlib, pandas, and scikit-learn. (time is part of Python's standard library and is not a dependency.) TensorFlow and Keras are intentionally not installed because they are large and are only needed when executing Lab 7. Install TensorFlow separately in a supported Python environment if you want to run that lab; displaying and exporting it does not require TensorFlow.

Quick start

In a Jupyter or Colab cell:

import teefoml

teefoml.lab1()          # display Lab 1; do not execute it
teefoml.show_lab(5)     # display a numbered lab
teefoml.all_labs()      # display all labs
teefoml.list_labs()     # display and return lab titles
teefoml.help()          # display an API reminder

The display uses native IPython Markdown and syntax-highlighted code output, so source remains easy to select and copy. There is no reliable, supported API that inserts new editable cells into every Jupyter Notebook, JupyterLab, Colab, and VS Code frontend. teefoml therefore deliberately avoids frontend-specific JavaScript and uses exact notebook export as the portable editable fallback.

Labs

Lab Title Description
1 NumPy Fundamentals and Vectorization Arrays, broadcasting, reshaping, vectorization, and normalization.
2 Gradient Descent for Linear Regression Scalar linear regression and scikit-learn comparison.
3 Matrix-Based Linear Regression Multivariable gradient descent using matrix operations.
4 Logistic Regression Gradient Descent Sigmoid activation and a matrix gradient step.
5 Logistic Regression and Optimization Logistic regression, propagation, and optimization.
6 Building a Simple Neural Network Activations and a two-layer neural network from NumPy.
7 Neural Networks with TensorFlow and Keras Binary classification and MNIST multiclass models.
8 Linear Discriminant Analysis Manual LDA and scikit-learn comparison.
9 Principal Component Analysis Manual eigendecomposition and scikit-learn PCA.

Export editable notebooks

from pathlib import Path
import teefoml

path = teefoml.export_lab(5)                 # ./lab5.ipynb
paths = teefoml.export_labs(Path("my_labs")) # all nine

Exports preserve the bundled notebooks byte for byte, including code, Markdown, raw cells, metadata, comments, indentation, and cell order. Existing files are never overwritten. Open an exported file normally to edit or run its cells.

External data

The supplied Lab 7 and Lab 8 notebooks refer to diabetes.csv and LDA_1.csv respectively. Those files were not present alongside the source notebooks and are not included because their exact contents and redistribution rights could not be established. Place the matching course datasets beside an exported notebook before executing those labs. Lab 7 also downloads MNIST through Keras when that section is executed, so it requires network access on first use.

Build and publish

From the project directory:

python -m pip install --upgrade build twine
python -m pytest
python -m build
python -m twine check dist/*

Upload to TestPyPI first (you will be prompted for credentials):

python -m twine upload --repository testpypi dist/*
python -m pip install --index-url https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple/ teefoml==0.1.3

After verification, upload the same artifacts to production PyPI:

python -m twine upload dist/*

Use a PyPI API token when prompted (username __token__); never commit tokens. Publishing is intentionally not automated by this project.

License

MIT

Metadata

Release files for teefoml 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for teefoml 0.1.3
File Size Uploaded Provenance Actions
teefoml-0.1.3.tar.gz 105.2 kB Without provenance Details for teefoml-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for teefoml 0.1.3
File Interpreter ABI Platform Actions
teefoml-0.1.3-py3-none-any.whl Python 3 none any Details for teefoml-0.1.3-py3-none-any.whl

Total release size: 211.9 kB

Release files / teefoml-0.1.3.tar.gz

Download URL teefoml-0.1.3.tar.gz
Size 105.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b716e73619b401f9d65415541a2ae0b6cd09df8bb78040940e7059ef24f62919
BLAKE2b-256 checksum
How to use checksums
a771a68c9b0a200805097bee15d476e00272a6358a7894d0015a4523a80711cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / teefoml-0.1.3-py3-none-any.whl

Download URL teefoml-0.1.3-py3-none-any.whl
Size 106.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f38097172aeee3350fda68df9aad0c1bb2000da23ef590cab253f9480204c5c
BLAKE2b-256 checksum
How to use checksums
fb2fbb19367bb401d54c312f3743d06dec938d017aaa9bec6eb06551da63f2b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for teefoml 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page