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, scikit-learn, and TensorFlow, which were detected in the notebooks. (time is part of Python's standard library and is not a dependency.) TensorFlow is installed on Python 3.10–3.13, the versions supported by TensorFlow, and supplies its matching Keras dependency automatically. The display and export API remains installable on newer Python versions, but executing Lab 7 requires a TensorFlow-supported interpreter.

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.2

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.2

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.2
File Size Uploaded Provenance Actions
teefoml-0.1.2.tar.gz 105.4 kB Without provenance Details for teefoml-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 212.1 kB

Release files / teefoml-0.1.2.tar.gz

Download URL teefoml-0.1.2.tar.gz
Size 105.4 kB
Tags Source
SHA-256 checksum
How to use checksums
28020acda99ece45fc31be3f8cab7558c70ab73aad44c54da4eac1463e039680
BLAKE2b-256 checksum
How to use checksums
d17e6ee44cb2bf2391e4e7bd5dca2564444243ccdb99af258613bc53d8206e08
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.2-py3-none-any.whl

Download URL teefoml-0.1.2-py3-none-any.whl
Size 106.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01f3d6c7bbd2d03edfcb5739e12d327e4b131a7ec7c688765817cd624daac305
BLAKE2b-256 checksum
How to use checksums
f23ba1cadfb0a42454a47b4b5ea0ccae1d41b317c14124c325a94518ae5836ed
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.2

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