Cargando…

Advanced Python Programming : Build High Performance, Concurrent, and Multi-Threaded Apps with Python Using Proven Design Patterns.

With this Learning Path, you will gain complete knowledge to solve problems by building high performing applications loaded with asynchronous, multithreaded code and proven design patterns.

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Lanaro, Gabriele
Otros Autores: Nguyen, Quan, Kasampalis, Sakis
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Publishing Ltd, 2019.
Colección:Learning path.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover; Title Page; Copyright; About Packt; Contributors; Table of Contents; Preface; Chapter 1: Benchmarking and Profiling; Designing your application; Writing tests and benchmarks; Timing your benchmark; Better tests and benchmarks with pytest-benchmark; Finding bottlenecks with cProfile; Profile line by line with line_profiler; Optimizing our code; The dis module; Profiling memory usage with memory_profiler; Summary; Chapter 2: Pure Python Optimizations; Useful algorithms and data structures; Lists and deques; Dictionaries; Building an in-memory search index using a hash map; Sets; Heaps
  • TriesCaching and memoization; Joblib; Comprehensions and generators; Summary; Chapter 3: Fast Array Operations with NumPy and Pandas; Getting started with NumPy; Creating arrays; Accessing arrays; Broadcasting; Mathematical operations; Calculating the norm; Rewriting the particle simulator in NumPy; Reaching optimal performance with numexpr; Pandas; Pandas fundamentals; Indexing Series and DataFrame objects; Database-style operations with Pandas; Mapping; Grouping, aggregations, and transforms; Joining; Summary; Chapter 4: C Performance with Cython; Compiling Cython extensions
  • Adding static typesVariables; Functions; Classes; Sharing declarations; Working with arrays; C arrays and pointers; NumPy arrays; Typed memoryviews; Particle simulator in Cython; Profiling Cython; Using Cython with Jupyter; Summary; Chapter 5: Exploring Compilers; Numba; First steps with Numba; Type specializations; Object mode versus native mode; Numba and NumPy; Universal functions with Numba; Generalized universal functions; JIT classes; Limitations in Numba; The PyPy project; Setting up PyPy; Running a particle simulator in PyPy; Other interesting projects; Summary
  • Chapter 6: Implementing ConcurrencyAsynchronous programming; Waiting for I/O; Concurrency; Callbacks; Futures; Event loops; The asyncio framework; Coroutines; Converting blocking code into non-blocking code; Reactive programming; Observables; Useful operators; Hot and cold observables; Building a CPU monitor; Summary; Chapter 7: Parallel Processing; Introduction to parallel programming; Graphic processing units; Using multiple processes; The Process and Pool classes; The Executor interface; Monte Carlo approximation of pi; Synchronization and locks; Parallel Cython with OpenMP
  • Automatic parallelismGetting started with Theano; Profiling Theano; Tensorflow; Running code on a GPU; Summary; Chapter 8: Advanced Introduction to Concurrent and Parallel Programming; Technical requirements; What is concurrency?; Concurrent versus sequential; Example 1
  • checking whether a non-negative number is prime; Concurrent versus parallel; A quick metaphor; Not everything should be made concurrent; Embarrassingly parallel; Inherently sequential; Example 2
  • inherently sequential tasks; I/O bound; The history, present, and future of concurrency; The history of concurrency; The present