Skip to content

Collection of marimo tutorials which encompass notebook/app examples in varying domains - CS/AI/ML

License

Notifications You must be signed in to change notification settings

Haleshot/marimo-tutorials

Repository files navigation

marimo-tutorials Community Banner

Interactive Tutorials and Notebooks for marimo

Open in marimo License: MIT Contributing Code of Conduct GitHub stars discord

marimo-tutorials

Welcome to marimo-tutorials, a comprehensive collection of interactive notebooks and tutorials showcasing the power and versatility of marimo, an innovative Python notebook framework. This repository serves as a hub for learning, exploration, and community engagement across various domains of computer science, data science, AI, and more.

Table of Contents

About

marimo-tutorials is designed to provide a rich learning experience for both beginners and advanced users of marimo. Our collection spans multiple disciplines, offering hands-on examples, in-depth tutorials, and real-world applications of marimo's capabilities.

Repository Structure

marimo-tutorials/
│
├── .github/
├── apps/
├── docs/
├── env/
├── marimo-tutorials/
│   ├── artificial-intelligence/
│   │   └── recommendation-systems/
│   │       └── collaborative-filtering/
│   ├── assets/
│   ├── computer-science/
│   ├── Data-Science/
│   ├── Evolutionary-Computing/
│   ├── signal-image-processing/
│   │   ├── image-processing/
│   │   └── signal-processing/
│   ├── Software-Engineering/
│   └── Tutorials/
├── __pycache__/
├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── init.py
├── LICENSE
├── preprocessed_books.csv
├── README.md
└── requirements.txt

Each subdirectory within marimo-tutorials/ contains domain-specific notebooks, along with their respective README files and assets.

Getting Started

To get started with the notebooks in this repository, you'll need to have marimo installed. We recommend using uv for managing dependencies and running notebooks in isolated environments.

  1. Install uv if you haven't already:

    pip install uv
  2. Clone this repository:

    git clone https://github.com/Haleshot/marimo-tutorials.git
    cd marimo-tutorials
  3. To run a notebook with its dependencies in an isolated environment:

    uvx marimo run --sandbox path/to/notebook.py
  4. To edit a notebook:

    uvx marimo edit --sandbox path/to/notebook.py

Isolated Environments with marimo

As highlighted in the marimo blog, it's now possible to create marimo notebooks that have their package requirements serialized into them as a top-level comment. Given a notebook with inlined requirements, marimo can run it in an isolated virtual environment with a single command:

marimo edit --sandbox notebook.py

This creates a fresh virtual environment, or sandbox, and installs the dependencies before opening the notebook. marimo's opt-in package management features can even track imports and automatically add them to your notebook's inlined requirements. This means you can create and share standalone notebooks without shipping requirements.txt files alongside them.

Featured Notebooks

Here are some featured notebooks from our collection:

Artificial Intelligence

Collaborative Filtering Machine Learning

Data Science

Exploratory Data Analysis

Signal and Image Processing

Image Processing Signal Processing

Community Spotlights

While this repository hosts a variety of tutorials and notebooks, the official community spotlights are featured in a separate repository: marimo-team/spotlights.

Note

The spotlights repository features a project or marimo notebook from the community every Thursday. If you've created a notebook in this repository that you believe would be a good fit for the community spotlight, feel free to open an issue in the spotlights repository.

Notebook Structure

All notebooks in this repository follow a uniform structure defined in the init.py file. This structure ensures consistency across tutorials and makes it easier for users to navigate and understand the content. Key elements of this structure include:

  • Standard import statements
  • Configuration settings
  • Helper functions
  • Main content sections
  • Interactive elements

By adhering to this template, contributors can focus on creating high-quality content while maintaining a consistent user experience across all tutorials.

Contributing

We welcome contributions from the community! Whether it's adding new tutorials, improving existing ones, or suggesting new features, your input is valuable. Please read our CONTRIBUTING.md for guidelines on how to contribute.

License

This project is licensed under the MIT License.

Contact

For questions, suggestions, or support, please open an issue in this repository or reach out to us (maintainers) through our community channels:

marimo socials: