Course 646:
Advanced Professional Python Programming

(5 days)

 

Course Description

This course is designed to provide the Pythonic thinking, programming styles, tools, and techniques needed to be an expert Python programmer. The course is written to show how to write code for both Python 2 and 3, and what should be done to make porting as simple as possible. All concepts, tools, and techniques are backed by working examples. All concepts, tools, and techniques are explored through working programs.

Learning Objectives

  • How to set up development environments for both Python 2 and 3
  • How to use virtual environments
  • Understand the styles of Python Programming
  • Be able to use advanced debugging and tracing techniques
  • Be able to use and create exceptions
  • Understand comprehensions, iterator, generator
  • Understand new “iterator” objects in Python 3.6
  • Know how to use and build closures, lambdas, and decorators
  • Know how to use dunder functions
  • Understand scope and namespaces
  • Understand factories in Python
  • Know how to package modules
  • Know how to use Request module
  • Know how to create a REST client-server system
  • Know how to work around the GIL
  • Understand and be able to use a with context
  • Introduction to Machine Learning

Prerequisites

Working knowledge of Python 2 or Python 3.


Course Outline

Unit 1: Class Development Environment

  • Access Virtual Classroom
  • The Classroom Python Environment
  • Installing Packages
  • Virtual Environments

Unit 2: Advanced Basics Review

  • Imperative “Hello World!”
  • Object Oriented – Done Right
  • Functional Approach

Unit 3: Pythonic Thinking

  • import this (PEP 20)
  • PEP 8
  • Styles of Python Programming
  • Documentation Standards
  • Notebooks

Unit 4: Development Tools

  • Debugging with pdb
  • Assertions and __debug__
  • Testing with pytest
  • Code Tracing
  • Inspection Tools

Unit 5: Exceptions

  • Why Exceptions
  • What Are the Exceptions?
  • try, except, else, finally
  • Creating Exceptions

Unit 6: Comprehensions, Iterators, and Generators

  • List and Dictionary Comprehensions
  • Iterators
  • Generators
  • Python 3 Changes

Unit 7: Functions

  • Function Review
  • Scopes and Namespaces
  • lambdas
  • Closures
  • Function Decorators
  • Functional Programming Introduction

Unit 8: Classes, Namespaces, and Factories

  • Classes and Inheritance
  • Alternatives to Inheritance
  • Scope and Namespaces
  • Dunder Functions
  • Static and Class Methods
  • Factories in Python
  • Alternatives to Factories
  • Class Decorators and Closures

Unit 9: Package, Module, and Code Management

  • Modules
  • Organizing with Package
  • Documenting Modules, and Packages
  • Search Path, Loading, and Reloading

Unit 10: REST and Request

  • Web Basics
  • WebApp2 (Flask)
  • Request
  • REST

Unit 11: Working with Legacy Code

  • Understand the System
  • Documentation Update
  • Safety Net: Unit Tests
  • Seams and Other Techniques

Unit 12: Context Managers

  • Basic with
  • with and exceptions
  • Nesting with statements
  • Context Management: Creating a Context

Unit 13: Concurrency and Parallelism

  • The GIL
  • Threads
  • Around GIL with Cython and OpenMP
  • Multiprocessing
  • Introduction to CUDA or OpenCL
  • Concurrent Processing with gevent

Unit 14: Data Science

  • NumPy
  • SciPy
  • Matplotlib
  • Pandas
  • Statistics Introduction

Unit 15: Introduction to Machine Learning with SciKit

  • Linear Regression
  • Logistic Analysis
  • SVM
  • Neural Networks
  • Deep Learning

Unit 16: Other Processes

  • Subprocesses
  • System Calls
  • Using PyExecJS (JavaScript, Node.js)
  • Extending Python with C

Unit 17: Best Practices

  • Repository Setup
  • Documentation Tools
  • Know the Available Tools
  • Design Considerations
  • Blogs to be Read

Unit 18: Tuning and Optimization

  • Profiling
  • Time Measurements
  • Memory Measurements
  • Design and Optimization

Please Contact Your ROI Representative to Discuss Course Tailoring!