{"id":15057280,"url":"https://github.com/beyondsimulations/applied-optimization","last_synced_at":"2025-09-21T01:14:38.342Z","repository":{"id":256914183,"uuid":"849941685","full_name":"beyondsimulations/Applied-Optimization","owner":"beyondsimulations","description":"This repo contains the lecture and tutorials for the course: Applied Optimization","archived":false,"fork":false,"pushed_at":"2025-04-14T10:06:54.000Z","size":394406,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T11:06:28.737Z","etag":null,"topics":["introduction-to-programming","julia-language","mathematical-modelling","operations-research"],"latest_commit_sha":null,"homepage":"https://beyondsimulations.github.io/Applied-Optimization/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-sa-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beyondsimulations.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-30T15:01:18.000Z","updated_at":"2025-04-13T09:17:01.000Z","dependencies_parsed_at":"2024-09-13T21:56:57.001Z","dependency_job_id":"41dad189-e364-4629-8b21-9cec7dfe870f","html_url":"https://github.com/beyondsimulations/Applied-Optimization","commit_stats":null,"previous_names":["beyondsimulations/applied-optimization"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondsimulations%2FApplied-Optimization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondsimulations%2FApplied-Optimization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondsimulations%2FApplied-Optimization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondsimulations%2FApplied-Optimization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beyondsimulations","download_url":"https://codeload.github.com/beyondsimulations/Applied-Optimization/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248868768,"owners_count":21174757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["introduction-to-programming","julia-language","mathematical-modelling","operations-research"],"created_at":"2024-09-24T22:04:34.025Z","updated_at":"2025-09-21T01:14:38.325Z","avatar_url":"https://github.com/beyondsimulations.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Applied Optimization\n\nThis repository contains the lecture materials and tutorials for the course \"Applied Optimization\" currently taught at the University of Hamburg. The course focuses on practical optimization techniques using the Julia programming language.\n\n## Course Overview\n\nThe course covers applied optimization methods with hands-on tutorials and real-world examples. Students learn to solve optimization problems using Julia and various optimization packages.\n\n## Project Structure\n\n### Content Directories\n\n- **`lectures/`** - Course lecture materials\n  - Lecture content in Quarto markdown (`.qmd`) files\n  - Rendered HTML versions for web viewing\n  - Presentation slides (`*-presentation.html`) for classroom use\n  - Supporting images and files\n\n- **`tutorials/`** - Interactive tutorials and exercises\n  - Step-by-step Julia tutorials in `.qmd` format\n  - Hands-on exercises covering optimization concepts\n  - Data files and supporting materials in `data/` and `images/`\n\n- **`general/`** - General course information and resources\n\n### Technical Directories\n\n- **`helpers/`** - Post-processing automation scripts (see [Helper Functions](#-helper-functions))\n- **`_site/`** - Generated website output (created by Quarto)\n- **`_repo-md/`** - Processed markdown files (created by helper scripts)\n- **`_freeze/`** - Quarto's computational cache\n- **`site_libs/`** - Website dependencies and libraries\n\n### Configuration Files\n\n- **`_quarto.yml`** - Main Quarto configuration and build settings\n- **`_brand.yml`** - Website branding and styling\n- **`Project.toml`** - Julia project dependencies\n- **`Pipfile`** - Python dependencies for helper scripts\n- **`jupytext.toml`** - Jupytext configuration for notebook conversion\n\n## 🔧 Build Process\n\nThe project uses [Quarto](https://quarto.org/) as the main build system with automated post-processing:\n\n1. **Render Phase**: Quarto processes `.qmd` files into HTML, creating the website in `_site/`\n2. **Post-Render Phase**: Helper scripts automatically process the generated content\n\nThe build pipeline is configured in `_quarto.yml`:\n\n```yaml\nproject:\n  type: website\n  post-render:\n    - helpers/convert_pypercent.py\n    - helpers/convert_qmd_to_md.py\n    - helpers/create_pdf.py\n```\n\n## Helper Functions\n\nThe `helpers/` directory contains automation scripts that run after each build:\n\n### `convert_pypercent.py`\n**Purpose**: Converts Jupyter notebooks to Julia percent format\n\n- **Input**: All `.ipynb` files in `_site/tutorials/`\n- **Output**: Corresponding `.jl` files in percent format\n- **Technology**: Uses Jupytext for format conversion\n- **Usage**: Enables easy editing of tutorials in Julia-native format\n\n**How it works**:\n1. Finds all notebook files in the tutorials directory\n2. Reads each notebook using Jupytext\n3. Converts to Julia percent format (`.jl` files with `# %%` cell separators)\n4. Saves alongside original notebooks\n\n### `convert_qmd_to_md.py`\n**Purpose**: Extracts and organizes rendered markdown files\n\n- **Input**: All `.md` files in `_site/`\n- **Output**: Organized copy in `_repo-md/` maintaining directory structure\n- **Usage**: Creates a clean markdown repository for version control or external processing\n\n**How it works**:\n1. Recursively finds all `.md` files in the rendered site\n2. Recreates the directory structure in `_repo-md/`\n3. Moves files while preserving relative paths\n4. Provides organized markdown output separate from HTML site\n\n### `convert-pdf.py`\n**Purpose**: Converts PDF files to SVG format (manual use)\n\n- **Input**: PDF files in specified directory\n- **Output**: SVG files with naming convention\n- **Technology**: Uses `pdf2svg` command-line tool\n- **Usage**: Manual execution for converting diagrams or figures\n\n## Getting Started\n\n### Prerequisites\n\n1. **Julia** - For running computational content\n2. **Python** - For helper scripts and Quarto\n3. **Quarto** - For building the website\n\n### Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/beyondsimulations/Applied-Optimization.git\n   cd Applied-Optimization\n   ```\n\n2. Install Julia dependencies:\n   ```bash\n   julia --project=. -e 'using Pkg; Pkg.instantiate()'\n   ```\n\n3. Install Python dependencies:\n   ```bash\n   uv sync\n    ```\n\n### Building the Site\n\nTo build the complete website with all post-processing:\n\n```bash\nquarto render\n```\n\nThis will:\n- Render all `.qmd` files to HTML\n- Execute the post-render helper scripts\n- Generate PDFs, Julia files, and organized markdown\n- Create the complete website in `_site/`\n\n### Development\n\nFor development with live preview:\n\n```bash\nquarto preview\n```\n\nNote: Post-render scripts only run on full renders, not during preview mode.\n\n## Content Creation\n\n### Adding New Lectures\n\n1. Create a new `.qmd` file in `lectures/` following the naming convention: `lecture-XX-topic.qmd`\n2. For presentations, create a corresponding `lecture-XX-presentation.html` file\n3. Run `quarto render` to process and generate PDFs automatically\n\n### Adding New Tutorials\n\n1. Create tutorial files in `tutorials/` following the pattern: `tutorial-XX-YY-topic.qmd`\n2. Include any data files in `tutorials/data/`\n3. The build process will automatically generate Julia percent format versions\n\n### Working with Julia Code\n\n- All computational content is executed during rendering\n- Julia environment is managed through `Project.toml`\n- Code execution is cached by Quarto for faster subsequent builds\n\n## Contributing\n\n1. Fork the repository\n2. Create content following the established naming conventions\n3. Test your changes with `quarto render`\n4. Submit a pull request\n\n## License\n\nThis project is licensed under the terms specified in the LICENSE file.\n\n## Links\n\n- **Course Website**: https://beyondsimulations.github.io/Applied-Optimization\n- **Source Repository**: https://github.com/beyondsimulations/Applied-Optimization\n- **Quarto Documentation**: https://quarto.org/\n- **Julia Language**: https://julialang.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondsimulations%2Fapplied-optimization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeyondsimulations%2Fapplied-optimization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondsimulations%2Fapplied-optimization/lists"}