Advanced Python

Title Advanced Python (51052)
Quarter Spring 2021
Instructor Lorena Mesa (lorenanicole@cs.uchicago.edu)
Website

Syllabus

Description

Python is a general-purpose programming language that is used in many application areas, including data science, machine learning/AI, web development, scientific computing, graphical user interfaces, systems programming, gaming, rapid prototyping, and more. This course provides a thorough overview of the Python 3 language with an emphasis on writing idiomatic code in Python and object-oriented design patterns and is suitable for students with some prior programming experience. We will develop an understanding of the core features of the languages and gain exposure to commonly used standard-library and third-party modules.

Course Format

Weekly classes will provide lectures, programming examples, in-class quizzes, and code review from previous assignments. In the first half of the quarter, four multi-part assignments will be given with one week for completion as well as a midterm examination. In the second half of the quarter, students will work on a project of their choosing and will present their work at the end of the class.


You are strongly encouraged to bring a laptop to class to follow along with examples interactively.

Outline
Week 1: Recap of basics of Python
Week 2: Metaprogramming
  • Callable classes
  • Decorators
  • Monkey patching  ** connected to unit testing
Week 3: Developer Tools & Testing
  • Linter
  • Debugger
  • Profiling and benchmarking code
  • PyTest
Week 4: Working with databases
  • NoSQL vs SQL options
  • Popular modules e.g. sqlalchemy
Week 5: Networking Programming
  • Socket, requests module
  • Connecting to client 
  • Client-server chatting program
Week 6: Multiprogramming
  • Threading
  • Sharing Variables
  • Multiprocessing
  • Pools
  • Async Programming  (e.g. co-routines)
  • Python’s GIL 
Week 7: Serializing Data
  • XML
  • JSON
  • YAML
  • Pickling
  • Protobufs
  • Dataclasses
  • Collections Module
Week 8: Python and the  Web 
  • Django
  • Flask
  • Web scraping with beautifulsoup and real time data scraping
Week 9: Python for Data Analysis 
  • SciPy & Pandas & Scikit-learn overview
    • Creating metrics for analysis 
    • Merge data frames from disparate data source
  • Analytics Vidhya dataset- Loan Prediction Problem
  • Building a predictive model with sklearn
Week 10: CPython Internals & Type Hinting

Notes:

Example final project:

Build a web scraper that collects ingests data with a daily cron that generates a daily report on derived data
Must include:
  • Type hinting
  • Unit tests
  • Data schema of their own design
Introduce KPIs that their project will need to adhere to 

Textbooks

While there are no required textbooks for this course, the following books may be useful for reference:

Learning Python, by Mark Lutz
Think Python: How to Think Like a Computer Scientist, by Allen B. Downey
Fluent Python, by Luciano Ramalho
Python Cookbook: Recipes for Mastering Python 3
Python Essential Reference, by David Beazley
Prerequisites (Courses)

B+ or higher in MPCS 51042 Python Programming

Prerequisites (Other)

Satisfies

Elective

Time

Monday 5:30-7:30 PM

Location

Online Only