SD5913 - Programming for Artists and Designers
Jupyter Notebook
14
117 commits
updated Nov 26, 2025
Welcome to the repository for SD5913! This repo contains weekly exercises, projects, and examples for the Programming for Artists and Designers class.
The repository is organized by weeks, with each folder containing the code and resources for that week's topics:
/week01, /week02, ... - Weekly content and exercises
/extra - Additional code examples and resources
Clone the repo:
git clone https://github.com/venetanji/pfad
Update the repo:
git pull
Install requirements for a specific week:
cd pfad/week##/
pip install -r requirements.txt
In Week 01, we explore the basics of web scraping using Python. The main script connects to the Hong Kong Observatory website to fetch tide data. Key concepts covered include:
python-dotenvrequests librarylxmlThis week establishes fundamental data collection techniques that will be used throughout the course.
Week 02 focuses on data visualization, basic data processing, and utility scripts in Python. The folder includes:
draw_svg.py: Script for drawing SVG graphics programmatically.multi_city_temp.py: Handles temperature data for multiple cities, likely involving data parsing and visualization.plot_tides.py: Plots tide data, building on the data collection from Week 01.scraping_utils.py: Utility functions for web scraping and data handling.tides_csv.py: Processes and saves tide data to CSV format.week02_notebook.ipynb: Jupyter notebook with interactive code and explanations for the week's topics.requirements.txt: Lists required Python packages for this week's exercises.There is also a python_foundations/ subfolder with foundational Jupyter notebooks covering:
These resources help reinforce core Python concepts and introduce data visualization techniques.
Week 03 explores fractal geometry and mathematical art using Python. Topics include:
This week demonstrates how code can generate beautiful, complex patterns from simple mathematical rules.
Week 04 introduces building interactive applications with Streamlit. The exercises cover:
Students learn to create user-facing applications that can accept and respond to user input.
Week 05 focuses on programmatic image generation using Python. Topics include:
This week lays the foundation for computational image creation and manipulation.
Week 06 explores audio generation and processing with Python. Covered topics:
Students learn to create and manipulate audio programmatically, opening possibilities for sound art.
Week 07 introduces AI-powered applications using LangGraph and Ollama. Topics covered:
This week demonstrates how to build intelligent, interactive AI systems.
Week 08 explores real-time computer vision using MediaPipe. Content includes:
Students learn to create applications that understand and respond to visual input.
Week 09 introduces building web APIs using FastAPI. Topics covered:
This week teaches how to create backend services that can be consumed by web and mobile applications.
Week 10 builds on Streamlit knowledge with more complex applications:
Students learn to build production-ready applications with databases and user management.
Week 11 explores two powerful tools for artists and data scientists:
This week bridges the gap between 3D art and data science.
Week 12 ties Streamlit, LangChain, and the Model Context Protocol (MCP) together:
app.py hosts a Streamlit chat UI that streams updates from a LangChain create_agent graph.bot.py targets a local OpenAI-compatible endpoint (LM Studio, Ollama, etc.) so you can drive lightweight models without cloud calls.tools.py shows how MultiServerMCPClient connects to the provided comfyui-mcp-server/, letting the agent trigger remote ComfyUI image workflows as tools.This week is all about wiring creative tools into an agent loop rather than focusing on UI polish.
Week 13 strips things down to a single semester.py script that replays the original pseudo-code loop with a tiny harness:
from __future__ import annotations postpones evaluation of type hints so factory/class methods can annotate Problem before Python knows the class itself; this keeps the file Python 3.12-friendly without using string literal annotations everywhere.@dataclass decorator builds the Problem boilerplate (__init__, __repr__, comparisons) automatically, so you only declare the fields that matter (difficulty, solved flag, attempts).SemesterClock, Student, Code) keep control flow safe while random checks mimic the original chaotic semester narrative.It is a quick reminder that solid fundamentals—clean dataclasses, future-ready annotations, and small test doubles—make bigger creative projects easier to reason about.
The /extra folder contains additional code examples and experimental projects that might be helpful for your assignments:
Feel free to explore these examples for inspiration or as starting points for your own projects!
SD5913 - Programming for Artists and Designers
Jupyter Notebook
14
117 commits
updated Nov 26, 2025
Welcome to the repository for SD5913! This repo contains weekly exercises, projects, and examples for the Programming for Artists and Designers class.
The repository is organized by weeks, with each folder containing the code and resources for that week's topics:
/week01, /week02, ... - Weekly content and exercises
/extra - Additional code examples and resources
Clone the repo:
git clone https://github.com/venetanji/pfad
Update the repo:
git pull
Install requirements for a specific week:
cd pfad/week##/
pip install -r requirements.txt
In Week 01, we explore the basics of web scraping using Python. The main script connects to the Hong Kong Observatory website to fetch tide data. Key concepts covered include:
python-dotenvrequests librarylxmlThis week establishes fundamental data collection techniques that will be used throughout the course.
Week 02 focuses on data visualization, basic data processing, and utility scripts in Python. The folder includes:
draw_svg.py: Script for drawing SVG graphics programmatically.multi_city_temp.py: Handles temperature data for multiple cities, likely involving data parsing and visualization.plot_tides.py: Plots tide data, building on the data collection from Week 01.scraping_utils.py: Utility functions for web scraping and data handling.tides_csv.py: Processes and saves tide data to CSV format.week02_notebook.ipynb: Jupyter notebook with interactive code and explanations for the week's topics.requirements.txt: Lists required Python packages for this week's exercises.There is also a python_foundations/ subfolder with foundational Jupyter notebooks covering:
These resources help reinforce core Python concepts and introduce data visualization techniques.
Week 03 explores fractal geometry and mathematical art using Python. Topics include:
This week demonstrates how code can generate beautiful, complex patterns from simple mathematical rules.
Week 04 introduces building interactive applications with Streamlit. The exercises cover:
Students learn to create user-facing applications that can accept and respond to user input.
Week 05 focuses on programmatic image generation using Python. Topics include:
This week lays the foundation for computational image creation and manipulation.
Week 06 explores audio generation and processing with Python. Covered topics:
Students learn to create and manipulate audio programmatically, opening possibilities for sound art.
Week 07 introduces AI-powered applications using LangGraph and Ollama. Topics covered:
This week demonstrates how to build intelligent, interactive AI systems.
Week 08 explores real-time computer vision using MediaPipe. Content includes:
Students learn to create applications that understand and respond to visual input.
Week 09 introduces building web APIs using FastAPI. Topics covered:
This week teaches how to create backend services that can be consumed by web and mobile applications.
Week 10 builds on Streamlit knowledge with more complex applications:
Students learn to build production-ready applications with databases and user management.
Week 11 explores two powerful tools for artists and data scientists:
This week bridges the gap between 3D art and data science.
Week 12 ties Streamlit, LangChain, and the Model Context Protocol (MCP) together:
app.py hosts a Streamlit chat UI that streams updates from a LangChain create_agent graph.bot.py targets a local OpenAI-compatible endpoint (LM Studio, Ollama, etc.) so you can drive lightweight models without cloud calls.tools.py shows how MultiServerMCPClient connects to the provided comfyui-mcp-server/, letting the agent trigger remote ComfyUI image workflows as tools.This week is all about wiring creative tools into an agent loop rather than focusing on UI polish.
Week 13 strips things down to a single semester.py script that replays the original pseudo-code loop with a tiny harness:
from __future__ import annotations postpones evaluation of type hints so factory/class methods can annotate Problem before Python knows the class itself; this keeps the file Python 3.12-friendly without using string literal annotations everywhere.@dataclass decorator builds the Problem boilerplate (__init__, __repr__, comparisons) automatically, so you only declare the fields that matter (difficulty, solved flag, attempts).SemesterClock, Student, Code) keep control flow safe while random checks mimic the original chaotic semester narrative.It is a quick reminder that solid fundamentals—clean dataclasses, future-ready annotations, and small test doubles—make bigger creative projects easier to reason about.
The /extra folder contains additional code examples and experimental projects that might be helpful for your assignments:
Feel free to explore these examples for inspiration or as starting points for your own projects!