Advanced Python Programming Build High Performance, Concurrent, and Multi-Threaded Apps with Python Using Proven Design Patterns
Create distributed applications with clever design patterns to solve complex problemsKey FeaturesSet up and run distributed algorithms on a cluster using Dask and PySparkMaster skills to accurately implement concurrency in your codeGain practical experience of Python design patterns with real-world...
Saved in:
| Main Authors: | , , |
|---|---|
| Format: | eBook |
| Language: | English |
| Published: |
Birmingham
Packt Publishing, Limited
2019
Packt Publishing |
| Edition: | 1 |
| Series: | Learning path |
| Subjects: | |
| ISBN: | 9781838551216, 1838551212 |
| Online Access: | Get full text |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| Abstract | Create distributed applications with clever design patterns to solve complex problemsKey FeaturesSet up and run distributed algorithms on a cluster using Dask and PySparkMaster skills to accurately implement concurrency in your codeGain practical experience of Python design patterns with real-world examplesBook DescriptionThis Learning Path shows you how to leverage the power of both native and third-party Python libraries for building robust and responsive applications. You will learn about profilers and reactive programming, concurrency and parallelism, as well as tools for making your apps quick and efficient. You will discover how to write code for parallel architectures using TensorFlow and Theano, and use a cluster of computers for large-scale computations using technologies such as Dask and PySpark. With the knowledge of how Python design patterns work, you will be able to clone objects, secure interfaces, dynamically choose algorithms, and accomplish much more in high performance computing.By the end of this Learning Path, you will have the skills and confidence to build engaging models that quickly offer efficient solutions to your problems.This Learning Path includes content from the following Packt products:Python High Performance - Second Edition by Gabriele LanaroMastering Concurrency in Python by Quan NguyenMastering Python Design Patterns by Sakis KasampalisWhat you will learnUse NumPy and pandas to import and manipulate datasetsAchieve native performance with Cython and NumbaWrite asynchronous code using asyncio and RxPyDesign highly scalable programs with application scaffoldingExplore abstract methods to maintain data consistencyClone objects using the prototype patternUse the adapter pattern to make incompatible interfaces compatibleEmploy the strategy pattern to dynamically choose an algorithmWho this book is forThis Learning Path is specially designed for Python developers who want to build high-performance applications and learn about single core and multi-core programming, distributed concurrency, and Python design patterns. Some experience with Python programming language will help you get the most out of this Learning Path. |
|---|---|
| AbstractList | 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. Create distributed applications with clever design patterns to solve complex problemsKey FeaturesSet up and run distributed algorithms on a cluster using Dask and PySparkMaster skills to accurately implement concurrency in your codeGain practical experience of Python design patterns with real-world examplesBook DescriptionThis Learning Path shows you how to leverage the power of both native and third-party Python libraries for building robust and responsive applications. You will learn about profilers and reactive programming, concurrency and parallelism, as well as tools for making your apps quick and efficient. You will discover how to write code for parallel architectures using TensorFlow and Theano, and use a cluster of computers for large-scale computations using technologies such as Dask and PySpark. With the knowledge of how Python design patterns work, you will be able to clone objects, secure interfaces, dynamically choose algorithms, and accomplish much more in high performance computing.By the end of this Learning Path, you will have the skills and confidence to build engaging models that quickly offer efficient solutions to your problems.This Learning Path includes content from the following Packt products:Python High Performance - Second Edition by Gabriele LanaroMastering Concurrency in Python by Quan NguyenMastering Python Design Patterns by Sakis KasampalisWhat you will learnUse NumPy and pandas to import and manipulate datasetsAchieve native performance with Cython and NumbaWrite asynchronous code using asyncio and RxPyDesign highly scalable programs with application scaffoldingExplore abstract methods to maintain data consistencyClone objects using the prototype patternUse the adapter pattern to make incompatible interfaces compatibleEmploy the strategy pattern to dynamically choose an algorithmWho this book is forThis Learning Path is specially designed for Python developers who want to build high-performance applications and learn about single core and multi-core programming, distributed concurrency, and Python design patterns. Some experience with Python programming language will help you get the most out of this Learning Path. |
| Author | Lanaro, Gabriele Kasampalis, Sakis Nguyen, Quan |
| Author_xml | – sequence: 1 fullname: Lanaro, Gabriele – sequence: 2 fullname: Nguyen, Quan – sequence: 3 fullname: Kasampalis, Sakis |
| BookMark | eNo9j0tLw0AUhUd8oK35BW66ExeBOzOZ17KGVoWCXYi4CzeZm1abZjQTK_57gxFXh8P5OPBN2EkbWjpiE26lVUpq93LMEmfs2Lng-mwYwTollDT6nCUxvgGAEByUdhfsau4P2FbkZ-vvfhva2boLmw73-9d2c8lOa2wiJX85Zc_LxVN-n64e7x7y-SpFqQF0WhHnQJWzKHxpa1-qzFtHWpPjUGe6UiVCmQlJQOBRc9SGCwOYIXpyRk7ZzXiMcUdfcRuaPhaHhsoQdrH41xn0xMBej-x7Fz4-KfbFL1ZR23fYFIvbXBnBjQP5A1JiTgo |
| ContentType | eBook |
| DEWEY | 005.133 |
| DatabaseTitleList | |
| DeliveryMethod | fulltext_linktorsrc |
| Discipline | Computer Science |
| EISBN | 183855369X 9781838553692 |
| Edition | 1 |
| ExternalDocumentID | 9781838553692 EBC5721790 |
| GroupedDBID | -VQ -VX 38. 5O. AABBV ABARN ABMRC ACBYE ACCPI ACIWJ ACLGV ACXXF ADVEM AECLD AERYV AHWGJ AJFER ALMA_UNASSIGNED_HOLDINGS ATDNW AZZ BBABE BSWCA CMZ CZZ DUGUG DYXOI EBSCA ECOWB GEOUK IHRAH K-E KT4 OHILO OODEK PASLL TD3 XI1 6XM ABQPQ AFOJC AK3 DRU O7H YSPEL |
| ID | FETCH-LOGICAL-a36006-ce110ec98a2db8fdb54d89e66e910f46c5ba0b423e0e0da61a671270a4aade973 |
| ISBN | 9781838551216 1838551212 |
| IngestDate | Fri Nov 08 05:48:08 EST 2024 Wed Dec 10 12:29:01 EST 2025 |
| IsPeerReviewed | false |
| IsScholarly | false |
| LCCallNum_Ident | QA76.73.P98 .L363 2019 |
| Language | English |
| LinkModel | OpenURL |
| MergedId | FETCHMERGED-LOGICAL-a36006-ce110ec98a2db8fdb54d89e66e910f46c5ba0b423e0e0da61a671270a4aade973 |
| OCLC | 1089525376 |
| PQID | EBC5721790 |
| PageCount | 652 |
| ParticipantIDs | askewsholts_vlebooks_9781838553692 proquest_ebookcentral_EBC5721790 |
| PublicationCentury | 2000 |
| PublicationDate | 2019 2019-02-28 |
| PublicationDateYYYYMMDD | 2019-01-01 2019-02-28 |
| PublicationDate_xml | – year: 2019 text: 2019 |
| PublicationDecade | 2010 |
| PublicationPlace | Birmingham |
| PublicationPlace_xml | – name: Birmingham |
| PublicationSeriesTitle | Learning path |
| PublicationYear | 2019 |
| Publisher | Packt Publishing, Limited Packt Publishing |
| Publisher_xml | – name: Packt Publishing, Limited – name: Packt Publishing |
| SSID | ssj0002210569 |
| Score | 2.0954366 |
| Snippet | With this Learning Path, you will gain complete knowledge to solve problems by building high performing applications loaded with asynchronous, multithreaded... Create distributed applications with clever design patterns to solve complex problemsKey FeaturesSet up and run distributed algorithms on a cluster using Dask... |
| SourceID | askewsholts proquest |
| SourceType | Aggregation Database Publisher |
| SubjectTerms | Application software Python (Computer program language) |
| Subtitle | Build High Performance, Concurrent, and Multi-Threaded Apps with Python Using Proven Design Patterns |
| TableOfContents | Other interesting projects -- Summary -- Chapter 6: Implementing Concurrency -- Asynchronous 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 parallelism -- Getting 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 -- The future -- A brief overview of mastering concurrency in Python -- Why Python? -- Setting up your Python environment -- General setup -- Summary -- Questions -- Further reading -- Chapter 9: Amdahl's Law -- Technical requirements -- Amdahl's Law -- Terminology -- Formula and interpretation -- The formula for Amdahl's Law -- A quick example -- Implications -- Amdahl's Law's relationship to the law of diminishing returns -- How to simulate in Python -- Practical applications of Amdahl's Law -- Summary -- Questions -- Further reading 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 -- Tries -- Caching 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 types -- Variables -- 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 Introductory example in Python -- An overview of the multiprocessing module -- The process class -- The Pool class -- Determining the current process, waiting, and terminating processes -- Determining the current process -- Waiting for processes -- Terminating processes -- Interprocess communication -- Message passing for a single worker -- Message passing between several workers -- Summary -- Questions -- Further reading -- Chapter 14: Reduction Operators in Processes -- Technical requirements -- The concept of reduction operators -- Properties of a reduction operator -- Examples and non-examples -- Example implementation in Python -- Real-life applications of concurrent reduction operators -- Summary -- Questions -- Further reading -- Chapter 15: Concurrent Image Processing -- Technical requirements -- Image processing fundamentals -- Python as an image processing tool -- Installing OpenCV and NumPy -- Computer image basics -- RGB values -- Pixels and image files -- Coordinates inside an image -- OpenCV API -- Image processing techniques -- Grayscaling -- Thresholding -- Applying concurrency to image processing -- Good concurrent image processing practices -- Choosing the correct way (out of many) -- Spawning an appropriate number of processes -- Processing input/output concurrently -- Summary -- Questions -- Further reading -- Chapter 16: Introduction to Asynchronous Programming -- Technical requirements -- A quick analogy -- Asynchronous versus other programming models -- Asynchronous versus synchronous programming -- Asynchronous versus threading and multiprocessing -- An example in Python -- Summary -- Questions -- Further reading -- Chapter 17: Implementing Asynchronous Programming in Python -- Technical requirements -- The asyncio module -- Coroutines, event loops, and futures -- Asyncio API -- The asyncio framework in action Asynchronously counting down -- A note about blocking functions -- Asynchronous prime-checking -- Improvements from Python 3.7 -- Inherently blocking tasks -- concurrent.futures as a solution for blocking tasks -- Changes in the framework -- Examples in Python -- Summary -- Questions -- Further reading -- Chapter 18: Building Communication Channels with asyncio -- Technical requirements -- The ecosystem of communication channels -- Communication protocol layers -- Asynchronous programming for communication channels -- Transports and protocols in asyncio -- The big picture of asyncio's server client -- Python example -- Starting a server -- Installing Telnet -- Simulating a connection channel -- Sending messages back to clients -- Closing the transports -- Client-side communication with aiohttp -- Installing aiohttp and aiofiles -- Fetching a website's HTML code -- Writing files asynchronously -- Summary -- Questions -- Further reading -- Chapter 19: Deadlocks -- Technical requirements -- The concept of deadlock -- The Dining Philosophers problem -- Deadlock in a concurrent system -- Python simulation -- Approaches to deadlock situations -- Implementing ranking among resources -- Ignoring locks and sharing resources -- An additional note about locks -- Concluding note on deadlock solutions -- The concept of livelock -- Summary -- Questions -- Further reading -- Chapter 20: Starvation -- Technical requirements -- The concept of starvation -- What is starvation? -- Scheduling -- Causes of starvation -- Starvation's relationship to deadlock -- The readers-writers problem -- Problem statement -- The first readers-writers problem -- The second readers-writers problem -- The third readers-writers problem -- Solutions to starvation -- Summary -- Questions -- Further reading -- Chapter 21: Race Conditions -- Technical requirements The concept of race conditions Chapter 10: Working with Threads in Python -- Technical requirements -- The concept of a thread -- Threads versus processes -- Multithreading -- An example in Python -- An overview of the threading module -- The thread module in Python 2 -- The threading module in Python 3 -- Creating a new thread in Python -- Starting a thread with the thread module -- Starting a thread with the threading module -- Synchronizing threads -- The concept of thread synchronization -- The threading.Lock class -- An example in Python -- Multithreaded priority queue -- A connection between real-life and programmatic queues -- The queue module -- Queuing in concurrent programming -- Multithreaded priority queue -- Summary -- Questions -- Further reading -- Chapter 11: Using the with Statement in Threads -- Technical requirements -- Context management -- Starting from managing files -- The with statement as a context manager -- The syntax of the with statement -- The with statement in concurrent programming -- Example of deadlock handling -- Summary -- Questions -- Further reading -- Chapter 12: Concurrent Web Requests -- Technical requirements -- The basics of web requests -- HTML -- HTTP requests -- HTTP status code -- The requests module -- Making a request in Python -- Running a ping test -- Concurrent web requests -- Spawning multiple threads -- Refactoring request logic -- The problem of timeout -- Support from httpstat.us and simulation in Python -- Timeout specifications -- Good practices in making web requests -- Consider the terms of service and data-collecting policies -- Error handling -- Update your program regularly -- Avoid making a large number of requests -- Summary -- Questions -- Further reading -- Chapter 13: Working with Processes in Python -- Technical requirements -- The concept of a process -- Processes versus threads -- Multiprocessing |
| Title | Advanced Python Programming |
| URI | https://ebookcentral.proquest.com/lib/[SITE_ID]/detail.action?docID=5721790 https://www.vlebooks.com/vleweb/product/openreader?id=none&isbn=9781838553692 |
| hasFullText | 1 |
| inHoldings | 1 |
| isFullTextHit | |
| isPrint | |
| link | http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwtZ3LS9xAGMAHXT3YS30VbasM4m0NxE1mkhR6qdgKyuJhEW_Ll8lEihqXTVbcY__zft88slm9tAcvIQ8Ylvkt32u-B2PHEEGIIgACheojiCUlAagyDkjbiBJQZwxyM2wiGQ7T29vs2s3YrM04gaSq0peXbPKuqPEdwqbS2f_A3S6KL_AeoeMVseP1lUXcPrp8Y3-cfz2nhgA-9erRlTTnNAC7T-2JqVexrxagLUaXWNk2TT6X06QZBg1yhgIXhMnEVcG5pWe1LWJ_QlHZL0wSCHVopeBia6P_gnxK1ev9K6jAVtPYu0WsFWXL8G42t5LP3rURH7Js-5dQU0NIN7N98WRlIfVorr9f-eAODVfuBjGobqotCp-YaUvqvukE3pacXBQ6qRCRtDPzXnXHXvq-ytboIJl88MtR3IbaBujWCspo_wD1PaoOVCtN_Ub3GoNitMnWNFWZbLEVXW2zj362Bneidof98TS53XLeofmNG5acWPIOyxO-IHnCkSNf5siJIyeOflHDkVuO3HLknuMuu_l5Pjq7CNy4jAAiSYEhpdGW0ypLYVDkaVnkIi7STEup0SYsY6lEDmGO9rMOdViAPAWZUOIBxIA_IkuiT6xXPVV6j_G0DAsVFejLUuxES0A3WcWnaS4TULEQ--yos5fj5wdztF-Pl3DsM-63eGy-u3zj8fmPM5EMqDfc539Z5wvbWPxnvrJeM53pA7aunpvf9fTQsP4Li9Zu-Q |
| linkProvider | Knovel |
| openUrl | ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.title=Advanced+Python+programming%3A+build+high+performance%2C+concurrent%2C+and+multi-threaded+apps+with+Python+using+proven+design+patterns&rft.au=Gabriele+Lanaro%2C+Lanaro&rft.au=Quan+Nguyen%2C+Nguyen&rft.au=Sakis+Kasampalis%2C+Kasampalis&rft.series=Learning+path&rft.date=2019-02-28&rft.pub=Packt+Publishing&rft.isbn=9781838553692&rft.externalDocID=9781838553692 |
| thumbnail_m | http://cvtisr.summon.serialssolutions.com/2.0.0/image/custom?url=https%3A%2F%2Fvle.dmmserver.com%2Fmedia%2F640%2F97818385%2F9781838553692.jpg |

