Write fast, robust, and highly reusable applications using Python's internal optimization, state-of-the-art performance-benchmarking tools, and cutting-edge libraries
Advanced Python Programming: Accelerate your Python programs using proven techniques and design patterns, 2nd Edition
β Scribed by Quan Nguyen
- Publisher
- Packt Publishing
- Tongue
- English
- Leaves
- 606
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Write fast, robust, and highly reusable applications using Python's internal optimization, state-of-the-art performance-benchmarking tools, and cutting-edge libraries
Key Features
- Benchmark, profile, and accelerate Python programs using optimization tools
- Scale applications to multiple processors with concurrent programming
- Make applications robust and reusable using effective design patterns
Book Description
Python's powerful capabilities for implementing robust and efficient programs make it one of the most sought-after programming languages.
In this book, you'll explore the tools that allow you to improve performance and take your Python programs to the next level.
This book starts by examining the built-in as well as external libraries that streamline tasks in the development cycle, such as benchmarking, profiling, and optimizing. You'll then get to grips with using specialized tools such as dedicated libraries and compilers to increase your performance at number-crunching tasks, including training machine learning models.
The book covers concurrency, a major solution to making programs more efficient and scalable, and various concurrent programming techniques such as multithreading, multiprocessing, and asynchronous programming.
You'll also understand the common problems that cause undesirable behavior in concurrent programs.
Finally, you'll work with a wide range of design patterns, including creational, structural, and behavioral patterns that enable you to tackle complex design and architecture challenges, making your programs more robust and maintainable.
By the end of the book, you'll be exposed to a wide range of advanced functionalities in Python and be equipped with the practical knowledge needed to apply them to your use cases.
What you will learn
- Write efficient numerical code with NumPy, pandas, and Xarray
- Use Cython and Numba to achieve native performance
- Find bottlenecks in your Python code using profilers
- Optimize your machine learning models with JAX
- Implement multithreaded, multiprocessing, and asynchronous programs
- Solve common problems in concurrent programming, such as deadlocks
- Tackle architecture challenges with design patterns
Who this book is for
This book is for intermediate to experienced Python programmers who are looking to scale up their applications in a systematic and robust manner. Programmers from a range of backgrounds will find this book useful, including software engineers, scientific programmers, and software architects.
Table of Contents
- Benchmarking and Profiling
- Pure Python Optimizations
- Fast Array Operations with NumPy and Pandas
- C Performance with Cython
- Exploring Compilers
- Automatic Differentiation and Accelerated Linear Algebra for Machine Learning
- Implementing Concurrency
- Parallel Processing
- Concurrent Web Requests
- Concurrent Image Processing
- Building Communication Channels with asyncio
- Deadlocks
- Starvation
- Race Conditions
- The Global Interpreter Lock
- The Factory Pattern
- The Builder Pattern
- Other Creational Patterns
- The Adapter Pattern
- The Decorator Pattern
- The Bridge Pattern
- The Facade Pattern
- Other Structural Patterns
- The Chain of Responsibility Pattern
- The Command Pattern
- The Observer Pattern
π SIMILAR VOLUMES
<p><b>Learn how to use Python to create efficient applications</b><p><b>About This Book</b><p><li>Identify the bottlenecks in your applications and solve them using the best profiling techniques<li>Write efficient numerical code in NumPy, Cython, and Pandas<li>Adapt your programs to run on multiple
<p>Β </p><p>If you want to learn the most modern programming language in the world, then keep reading. Python is an high-level programming language.Β It's a modern language, easy to learn and understand but very powerful.</p><p>It's a versatile programming language that is now being used on a lot o
Python is a dynamic programming language, used in a wide range of domains by programmers who find it simple, yet powerful. Even if you find writing Python code easy, writing code that is efficient and easy to maintain and reuse is a challenge. The focus of the book is to familiarize you with common