Modern Python Solutions - Part 2

The latest in modern Python recipes for the busy programmer

Python is the preferred choice of developers, engineers, data scientists, and hobbyists everywhere. It is a great scripting language that can power your applications and provide great speed, safety, and scalability. By exposing Python as a series of simple recipes, you can gain insight into specific language features in a particular context. Having a tangible context helps make the language or standard library features easier to understand. This video comes with over 100 recipes on the latest version of Python.

The videos will touch on all the necessary Python concepts related to data structures, OOP, functional programming, as well as statistical programming. You will get acquainted with the nuances of Python syntax and how to effectively use the advantages that it offers.

You will be armed with the knowledge of creating applications with flexible logging, powerful configuration, and command-line options, automated unit tests, and good documentation.You will end the book equipped with the knowledge of testing, web services, and configuration and application integration tips and tricks.

Who this course is for

The videos will benefit everyone ranging from beginner to an expert.The course is for web developers, programmers, enterprise programmers, engineers, big data scientist, and so on. If you are experienced, it will expand your knowledge base. Basic knowledge of Python programming is assumed.

What you will learn from this course

Table of Contents

  1. Basics of Classes and Objects
    • The Course Overview
    • Using a Class to Encapsulate Data and Processing
    • Designing Classes with Lots of Processing
    • Designing Classes with Little Unique Processing
    • Optimizing Small Objects with _slots_
    • Using More Sophisticated Collections
    • Extending a Collection
    • Using Properties for Lazy Attributes
    • Using Settable Properties to Update Eager Attributes

  2. More Advanced Class Design
    • Choosing Between Inheritance and Extension
    • Separating Concerns via Multiple Inheritance
    • Leveraging Python's Duck Typing
    • Managing Global and Singleton Objects
    • Using more Complex Structures
    • Creating a Class that Has Orderable Object
    • Defining an Ordered Collection
    • Deleting from a List of Mappings

  3. Functional and Reactive Programming Features
    • Writing Generator Functions with the Yield Statement
    • Using Stacked Generator Expression
    • Applying Transformations to a Collection
    • Picking a Subset
    • Summarizing a Collection
    • Combining Map and Reduce Transformations
    • Implementing “There Exists” Processing
    • Creating a Partial Function
    • Simplifying Complex Algorithms with Immutable Data Structures
    • Writing Recursive Generator Functions with the Yield from Statement

  4. Input/Output, Physical Format, Logical Layout
    • Using pathlib to Work with Filenames
    • Reading and Writing Files with Context Managers
    • Replacing a File While Preserving the Previous Version
    • Reading Delimited Files with the CSV Module
    • Reading Complex Formats Using Regular Expressions
    • Reading JSON Documents
    • Reading XML Documents
    • Reading HTML Documents
    • Upgrading CSV from DictReader to the namedtuple Reader
    • Upgrading CSV from a DictReader to a Namespace Reader
    • Using Multiple Contexts for Reading and Writing Files

  5. Statistical Programming and Linear Regression
    • Using the Built-in Statistic Library
    • Average of Values in a Counter
    • Computing the Coefficient of a Correlation
    • Computing Regression Parameters
    • Computing an Autocorrelation
    • Confirming that the Data is Random – the Null Hypothesis
    • Locating Outliers
    • Analyzing Many Variables in One Pass

Copyright © 2017 Packt Publishing

All rights reserved. No part of this course may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this course to ensure the accuracy of the information presented. However, the information contained in this course is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this course. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this course by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78728-027-4