- Advanced Algorithms and Data Structures class
- Class notes
- Code templates
- Solutions (haha, no)
Note: Windows users may have to use \ instead of /.
- Clone the repository.
git clone [email protected]:LutherCS/aads-class-pub.git
- Get updates.
git pull origin main
- Create and activate Python virtual environment
sudo apt-get install python3.12-venv
python3.12 -m venv .venv
source .venv/bin/activate
- Specify PYTHONPATH in .env
PYTHONPATH=.
Note that .env is excluded from version control and has to be added to each copy of the repository. Also, this step may not be necessary.
- Install pythonds3 to use textbook implementations of various data structures and algorithms.
python3 -m pip install -U pythonds3
- Optional: Install linters pylint and mypy.
python3 -m pip install -U pylint mypy
- Optional: Install formatter black.
python3 -m pip install -U black
- Install testing framework pytest and pytest-timeout plugin.
python3 -m pip install -U pytest pytest-timeout
- Install colorama that is used to highlight output.
python3 -m pip install -U colorama
- Run a project
python3 src/projects/module/file.py
- Test a project.
python3 -m pytest tests/projects/module/test_file.py
- Check code coverage
python3 -m pytest --cov tests/
- Generate the presentation
pandoc -s -i --slide-level=2 -t revealjs topic.md -o topic.html
- Prepare the assignment
Note: module name (hello), file name (hello_main), and function name (greet_by_name) don't have to match.
- Edit src/exercises/hello/description.md.
- Edit src/exercises/hello/hello_main.py.
- Edit tests/exercises/hello/test_hello.py.
-
Python review
- GitHub - mattharrison/Tiny-Python-3.8-Notebook: Python 3.8 language and syntax
- Tools: black, pylint, pytest, ruff
- Collection data types
- Exceptions and errors
- Magic methods
- Descriptors
- Data classes
- Modern Python features
-
Algorithm analysis
-
Basic data structures
-
Recursion
-
Searching
-
Sorting
- Suboptimal algorithms
- Optimal comparison-based algorithms
-
Tree
-
Graph
-
Algorithms
Popular development environments include the following:
- An Introduction to the Linux Terminal | DigitalOcean
- git - the simple guide - no deep shit!
- Installing Packages — Python Packaging User Guide
- Pipenv: A Guide to the New Python Packaging Tool – Real Python
- pytest: helps you write better programs — pytest documentation
- The Python Standard Library — Python 3.9.0 documentation
- PEP 8 -- Style Guide for Python Code | Python.org
- Python Style Guidelines - The Chromium Projects
- mattharrison/Tiny-Python-3.6-Notebook: This repository contains the text for the Tiny Python 3.6 Notebook.
- GitHub - mattharrison/Tiny-Python-3.8-Notebook: Python 3.8 language and syntax
- crazyguitar/pysheeet: Python Cheat Sheet
- Python @property: How to Use it and Why? - Programiz
- Introduction to Python descriptors – IBM Developer
- Python Tutorial: Properties vs. getters and setters
- Descriptor HowTo Guide — Python 3.9.0 documentation
- Object-Oriented Programming (OOP) in Python 3 – Real Python
- Jupyter Notebook Viewer - The Tao of Python
- 3. Data model — Python 3.9.0 documentation
- Underscores in Python
- Python3 Tutorial: Magic Methods
- Python Class Examples: Init and Self - Dot Net Perls
- The self variable in python explained | Python Tips
- OOP - Inheritance
- An Introduction to Classes and Inheritance (in Python) - Jessica Hamrick
- Learn Python the Hard Way - Read for Free
- Python3 Tutorial: Inheritance
- Analysis of Algorithms
- A Gentle Introduction to Algorithm Complexity Analysis
- Analysis of Algorithms
- In plain English, what is recursion? - Software Engineering Stack Exchange
- An Introduction to Recursion, Part 1 – topcoder
- An Introduction to Recursion: Part 2 – topcoder
- Data Structures and Algorithms Hash Table
- Basics of Hash Tables Tutorials & Notes | Data Structures | HackerEarth