UCLA Mathnet Login

PIC 16: General Course Outline

Catalog Description

PIC 16. Python with Applications (5 units). Lecture, three hours; discussion, two hours; laboratory, eight hours. Enforced requisite: course 10A and one additional programming course. Python programming and programming with Python packages. General Python programming constructs; standard data structures, flow control, exception handling, and input and output. Object oriented programming with Python. Application programming with commonly used Python modules such as PyQt or tkinter, NumPy, SciPy, and NLTK. P/NP or letter grading.

Textbook

A: The Python Tutorial (https://docs.python.org/2/tutorial/index.html)
B: RegexOne- Learning Regular Expressions (http://regexone.com/)
C: PyQt4 Tutorial (http://zetcode.com/gui/pyqt4/)

Schedule of Lectures

Lecture Section Topics

-

Note: Instructor has the choice between two tracks after Week 5
Track A: Mathematical and Scientific programming in Python OR
Track B: Data Science and Web programming in Python

1

Introduction to PIC 16: Intended Learning Outcomes, Evaluation, and Schedule
Getting Started: Software Installation, Basic Data Types, and Operators
Control Flow: if, while, for; Functions and lambda expressions
Data Structures: lists, tuples, sets, and dictionaries

2

Functional Programming using built-ins (filter, map, etc...)
Exceptions: raise, try/except
Object Oriented Programming: Classes, Objects, and Magic Methods

3

Iterables: for loops (under the hood), Iterators, and Generators
Regular Expressions: finding, capturing, and replacing data
Basic Input/Output: Console, text files, and CSV

4

Inheritance: Subclassing and super, Hello World GUI
GUI Graphics: drawing lines and shapes
Interactive GUIs: Widgets, Signals and Slots, Events

5A

(or)

GUI Layout using QtDesigner
NumPy and Matplotlib
(Numerical Computing)
Generating and manipulating arrays, creating plots

5B

GUI Layout using QtDesigner
Pandas I
(Data Processing)
Series and DataFrames,
Manipulating data

6A

(or)

Sympy (Computer Algebra)
Algebraic manipulation, solving equations, and calculus
SciPy I
(IO and Frequency Analysis)
Loading/Saving Audio, FFT, and IFFT

6B

Pandas II
pandas functions and methods
Plotly
(Plotting Data)
Generating plots, modifying appearance, and stripping data

7A

(or)

SciPy II
(Linear Algebra and Integration)
Matrix math, solving linear systems, order reduction, quadrature

7B

NLTK
(Natural Language Processing)
Concordance, contexts, dispersion, Stemming, lemmatization, and lexical diversity

8A

(or)

SciPy III
(Interpolation and Optimization)
Solving nonlinear equations, Curve fitting and nonlinear programming

8B

Scrapy
(Web scraping)
Spiders, Items, XML/HTML, Xpath Expressions, Requests, Responses, and Parse Callbacks

9A

(or)

OpenCV (Computer Vision)
Loading/saving images and video, HSV colorspace
Contours, Pattern Matching

9B

Twisted (Networking)
Servers, Clients, IP Addresses, Ports
Protocols and Factories

10A

(or)

Scikit-learn
(Machine Learning)
Samples, features, targets
Classification, regression, and clustering

10B

Threading
(Multithreaded Programming)
Threads and Locks
Events and Timers