- Algorithms and Data Structures class
- Class notes
- Code templates
Windows users may have to substitute python with py -3 for the following commands to work. You should keep the same file structure as this repository and run all the commands from its top directory (i.e. ads-class-pub).
- Clone the repository.
git clone https://github.com/LutherCS/ads-class-pub.git
- Get updates.
git pull origin
- Install pythonds3 to use textbook implementations of various data structures and algorithms.
python -m pip install -U pythonds3
- Install linters pylint and mypy.
python -m pip install -U pylint mypy
- Install formatter black.
python -m pip install -U black
- Install testing framework pytest and its plugin pytest-timeout.
python -m pip install -U pytest pytest-timeout
- Install colorama to colorize output.
python -m pip install -U colorama
- Run project hello
python projects/hello/hello.py
- Run project hello that takes file hello_in.txt as input
python projects/hello/hello.py projects/hello/hello_in.txt
The source should be modified as follows (sys.argv contains all the arguments passed to the application, including the application file name itself as sys.argv[0]):
import sys
def main(filename):
print(f"Processing file {filename}")
if __name__ == '__main__':
main(sys.argv[1])
- Test project hello
python -m pytest projects/hello/hello_test.py
- Run exercise hello
python exercises/hello/hello.py
- Test exercise hello
python -m pytest exercises/hello/hello_test.py
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.7.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.
- 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.7.2 documentation
- Object-Oriented Programming (OOP) in Python 3 – Real Python
- Jupyter Notebook Viewer - The Tao of Python
- 3. Data model — Python 3.7.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