Troubleshooting Python Application Development

Troubleshooting Python Application Development

English | MP4 | AVC 1920×1080 | AAC 48KHz 2ch | 2h 50m | 463 MB

Tackle Python performance problems and speed up your apps with parallelism, concurrent execution, and OOP

Although you’re comfortable with Python, you wonder whether you are writing fast and performant code. Once in a while, you run out of RAM or your application doesn’t run fast enough, and this forces you to find a different solution.

To further your software development career, you need to understand why and how Python executes your code so that you can create clean code that compiles in time.

Troubleshooting Python Application Development is your answer. This course takes you through a structured journey of performance problems that your application is likely to encounter, and presents both the intuition and the solution to these issues. You’ll get things done, without a lengthy detour into how Python is implemented or computational theory.

Quickly detect which lines of code are causing problems, and fix them quickly without going through 300 pages of unnecessary detail.

The course is full of hands-on instructions, interesting and illustrative visualizations, and, clear explanations from a data scientist. It is packed full of useful tips and relevant advice. Throughout the course, we maintain a focus on practicality and getting things done, not fancy mathematical theory.

What You Will Learn

  • Locate root causes by benchmarking and profiling your application
  • Speed up your code with natively Python idioms
  • Tackle long-running loops on big lists with NumPy
  • Speed up your I/O heavy tasks with concurrent programming
  • Make your apps run faster with parallel programming
  • Organize your code better using Object Oriented Programming
Table of Contents

Locating Root Causes by Benchmarking and Profiling Your Application
1 The Course Overview
2 Measuring Time Between Two Lines of Code with timeit
3 Figuring out Where Time Is Spent with the Profile Module
4 More Precise Time Tracking with cProfile
5 Looking at Memory Consumption with memory profiler

Python Idioms for Faster Code
6 Reduce Execution Time and Memory Consumption with slots
7 Use Tuples Instead of Lists When Your Data Does Not Change
8 Save on Memory Consumption with Generators Instead of Lists
9 When to Use Lists Instead of Generators
10 Leveraging Itertools to Create Generator Pipelines

Tackling Long Running Loops on Big Lists with NumPy
11 The Problem with Using Lists to Perform Vector Calculations
12 Using NumPy’s Arrays for More Powerful Vector Representations
13 Rewriting Our Problem with NumPy to Speed It up 40x
14 Fast Map-Reduce with NumPy Broadcasting
15 Optimize All Calculations in One Go with numexpr

Speed up Your IO Heavy Tasks with Concurrent Programming
16 The Problem of Serially Executing Web Scraping Calls
17 Simple Asynchronous Programming with Coroutines and Gevent
18 Event Driven Concurrency with Tornado
19 Concurrency and Futures with asyncio

Make Your Apps Run Faster with Parallel Programming
20 Getting Started with Parallel Programming
21 Doubling the Speed of Your List Processing with Tuples
22 Easily Speed up a Group of Processes with Pool
23 Stop Processes from Interfering with Each Other with Locks
24 Logging What Happens When You Have Many Processes