Download tasks/33/tests/oracle-runtime/clone/course_page.py from TIGER-Lab/WebsiteBench: direct link, hf CLI and curl.
- Browser
- Download file 748 Bytes
-
https://huggingface.co/datasets/TIGER-Lab/WebsiteBench/resolve/main/tasks/33/tests/oracle-runtime/clone/course_page.py
- Command line
-
hf download hf://datasets/TIGER-Lab/WebsiteBench/tasks/33/tests/oracle-runtime/clone/course_page.py
-
curl -L -o course_page.py https://huggingface.co/datasets/TIGER-Lab/WebsiteBench/resolve/main/tasks/33/tests/oracle-runtime/clone/course_page.py
748 Bytes
| """Source-grounded presentation for the Neural Networks course prototype.""" | |
| from __future__ import annotations | |
| from pathlib import Path | |
| from typing import Any | |
| from jinja2 import Environment, FileSystemLoader, select_autoescape | |
| TEMPLATE_ROOT = Path(__file__).resolve().parent / "templates" | |
| _TEMPLATES = Environment( | |
| loader=FileSystemLoader(TEMPLATE_ROOT), | |
| autoescape=select_autoescape(("html", "xml")), | |
| ) | |
| def render_neural_networks_course_body( | |
| *, | |
| course: dict[str, Any], | |
| authenticated: bool, | |
| ) -> str: | |
| """Render the observed public course page with clone-local actions only.""" | |
| return _TEMPLATES.get_template("pages/course_detail.html").render( | |
| course=course, | |
| authenticated=authenticated, | |
| ) | |