This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Quarto-based educational website for a Management Science course. The site includes lectures, interactive Python tutorials, and assignments that teach Python programming and management science concepts (Monte Carlo simulation, scheduling, routing, metaheuristics). The course is structured in three parts: Python Foundation (Lectures 1-3), Management Science Tools (Lectures 4-9), and a Consulting Competition (Lectures 10-12).
quarto renderThis renders all .qmd files in the project and generates the website in _site/.
quarto previewThis starts a local development server with live reload.
quarto render tutorials/nb_01_01_variables_data_types.qmd
quarto render lectures/lec_01_introduction.qmdThe project uses uv for Python package management:
# Install dependencies
uv sync
# Run Python scripts with uv
uv run python main.pyThe build automatically runs two post-render scripts (configured in _quarto.yml):
helpers/convert_pypercent.py- Converts Jupyter notebooks in_site/tutorials/to.pyfiles in percent formathelpers/convert_qmd_to_md.py- Moves all.mdfiles from_site/to_repo-md/maintaining directory structure
/
├── general/ # Course information (syllabus, FAQ, installation guides)
├── lectures/ # Lecture slides in Quarto reveal.js format
├── tutorials/ # Interactive Python notebooks (prefixed with nb_)
├── assignments/ # Student assignments
├── helpers/ # Post-render conversion scripts
└── _repo-md/ # Generated markdown files from rendered site
_quarto.yml- Main Quarto configuration with website structure, sidebar navigation, and format settings_brand.yml- Brand configuration for colors, typography, and fonts (Gelasio, Reddit Sans, Google Sans Code)pyproject.toml- Python dependencies (jupyter, jupytext, matplotlib, numpy, pandas)Literature.bib- Bibliography file for academic citationsstyles.scss- Custom SCSS styles for the website_metadata.yml- Directory-level metadata files (found in tutorials/, lectures/, etc.) that set default options for all files in that directory
The project uses Quarto (.qmd) files that support:
- HTML output - Primary format for the website
- Typst (PDF) output - Available via format links on pages
- Hugo markdown - For secondary distribution
- Jupyter notebooks - Tutorials also output to
.ipynbformat - reveal.js slides - Lectures render as interactive presentations
Tutorials are executable Python notebooks embedded in .qmd files using {python} code blocks.
Tutorials follow the pattern nb_XX_YY_topic.qmd:
XX= Lecture numberYY= Tutorial sequence within lecture- Example:
nb_01_01_variables_data_types.qmdis the first tutorial of lecture 1
Lectures use Quarto's reveal.js format for slides:
- Source:
lec_01_introduction.qmd - HTML output:
lec_01_introduction.html(readable format) - Slides output:
lec_01_introduction-revealjs.html(presentation format)
After rendering, the build system:
- Converts notebooks to Python scripts - Tutorial notebooks are converted to
.pyfiles in percent format for easy code distribution - Archives markdown versions - All
.mdfiles are moved to_repo-md/to provide plain markdown versions of content
This allows students to access content in multiple formats (HTML, PDF via Typst, Python scripts, Markdown).
The site uses a custom brand system defined in _brand.yml:
- Color palette: oneDark/oneLight, twoDark/twoLight, threeDark/threeLight
- Fonts: Gelasio (headings), Reddit Sans (body), Google Sans Code (monospace)
- Code highlighting: GitHub style with custom background color (
codeline: #FFEEE2)
Core dependencies (from pyproject.toml):
jupyter- Notebook infrastructurejupytext- Notebook format conversionmatplotlib- Plotting and visualizationnumpy- Numerical computingpandas- Data analysisscikit-learn- Machine learning algorithmsscipy- Scientific computingseaborn- Statistical data visualizationstatsmodels- Statistical modeling
Dev dependencies:
ipykernel- IPython kernel for Jupyterimageio- Image I/O library for reading and writing images
The project uses freeze: auto mode:
- Code cells are only re-executed when source files change
- Results are cached in
_freeze/directory - This speeds up incremental builds significantly
When modifying tutorial code blocks, the cached results in _freeze/ will be invalidated and re-executed on next render.
- Embedded chat assistant - Course assistant chatbot using a custom model proxy at
https://model-proxy.vlcek-4b4.workers.dev - Code links - Tutorials include download links to Python scripts
- Format links - HTML and PDF (Typst) versions available for all content
- MathJax - Mathematical expressions rendered via MathJax 3
- Create
tutorials/nb_XX_YY_topic.qmdfollowing the numbering convention - Add YAML frontmatter with title, subtitle, and code-links:
--- title: "Notebook X.Y - Topic Name" subtitle: "Management Science" code-links: - text: Python href: nb_XX_YY_topic.py icon: hand-thumbs-up ---
- Include Python code blocks with
{python}syntax - Add to
_quarto.ymlsidebar navigation under appropriate section - Run
quarto renderto build (the post-render script will automatically generate the.pyfile)
- Create
lectures/lec_XX_topic.qmd - Set
format: revealjsin frontmatter with custom footer - Use
---for slide breaks and#for slide titles - Add to
_quarto.ymlsidebar navigation - Run
quarto renderto generate presentation HTML
- Edit
styles.scssfor custom CSS/SCSS - Edit
_brand.ymlfor colors, fonts, and typography - Changes apply globally after running
quarto render