Categories
Bibliography Python

1590282574

See: Problem Solving with Algorithms and Data Structures Using Python SECOND EDITION 2nd Edition

Fair Use Source:

Categories
Python Software Engineering

Why Python

See also: Python, Python Bibliography and Bibliography of Python Libraries and Web Frameworks

Why Python?

“Every year I consider whether to continue using Python or whether to move on to a different language—perhaps one that’s newer to the programming world. But I continue to focus on Python for many reasons. Python is an incredibly efficient language: your programs will do more in fewer lines of code than many other languages would require. Python’s syntax will also help you write “clean” code. Your code will be easy to read, easy to debug, and easy to extend and build upon compared to other languages. ” (PyCrCs)

“People use Python for many purposes: to make games, build web applications, solve business problems, and develop internal tools at all kinds of interesting companies. Python is also used heavily in scientific fields for academic research and applied work. ” (PyCrCs)

“One of the most important reasons I continue to use Python is because of the Python community”, which includes an incredible variety of welcoming people. “Community is essential to programmers because programming isn’t a solitary pursuit. Most of us, even the most experienced programmers, need to ask advice from others who have already solved similar problems. Having a well-connected and supportive community is critical in helping you solve problems, and the Python community is fully supportive of people like you who are learning Python as your first programming language. ” (PyCrCs)

Sources:

Fair Use Sources:

Categories
Artificial Intelligence Bibliography Data Science - Big Data

B07XGF2G87

See: Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems 2nd Edition

Fair Use Source:

Categories
Cloud DevOps DevSecOps-Security-Privacy Linux Software Engineering

DevOps toolchain

See also: CloudOps, toolchain

“A DevOps toolchain is a set or combination of tools that aid in the delivery, development, and management of software applications throughout the systems development life cycle, as coordinated by an organization that uses DevOps practices.

Generally, DevOps tools fit into one or more activities, which supports specific DevOps initiatives: Plan, Create, Verify, Package, Release, Configure, Monitor, and Version Control.[1][2]” (WP)

Toolchains

“In software, a toolchain is the set of programming tools that is used to perform a complex software development task or to create a software product, which is typically another computer program or a set of related programs. In general, the tools forming a toolchain are executed consecutively so the output or resulting environment state of each tool becomes the input or starting environment for the next one, but the term is also used when referring to a set of related tools that are not necessarily executed consecutively.[3][4][5]

As DevOps is a set of practices that emphasizes the collaboration and communication of both software developers and other information technology (IT) professionals, while automating the process of software delivery and infrastructure changes, its implementation can include the definition of the series of tools used at various stages of the lifecycle; because DevOps is a cultural shift and collaboration between development and operations, there is no one product that can be considered a single DevOps tool. Instead a collection of tools, potentially from a variety of vendors, are used in one or more stages of the lifecycle.[6][7]” (WP)

Stages of DevOps

Further information: DevOps

Plan

Plan is composed of two things: “define” and “plan”.[8] This activity refers to the business value and application requirements. Specifically “Plan” activities include:

  • Production metrics, objects and feedback
  • Requirements
  • Business metrics
  • Update release metrics
  • Release plan, timing and business case
  • Security policy and requirement

A combination of the IT personnel will be involved in these activities: business application owners, software developmentsoftware architects, continual release management, security officers and the organization responsible for managing the production of IT infrastructure.

Create

Create is composed of the building (see also build automation), coding, and configuring of the software development process.[8] The specific activities are:

Tools and vendors in this category often overlap with other categories. Because DevOps is about breaking down silos, this is reflective in the activities and product solutions.[clarification needed]

Verify

Verify is directly associated with ensuring the quality of the software release; activities designed to ensure code quality is maintained and the highest quality is deployed to production.[8] The main activities in this are:

Solutions for verify related activities generally fall under four main categories: Test automation , Static analysis , Test Lab, and Security.

Packaging

Packaging refers to the activities involved once the release is ready for deployment, often also referred to as staging or Preproduction / “preprod”.[8] This often includes tasks and activities such as:

  • Approval/preapprovals
  • Package configuration
  • Triggered releases
  • Release staging and holding

Release

Release related activities include schedule, orchestration, provisioning and deploying software into production and targeted environment.[9] The specific Release activities include:

  • Release coordination
  • Deploying and promoting applications
  • Fallbacks and recovery
  • Scheduled/timed releases

Solutions that cover this aspect of the toolchain include application release automation, deployment automation and release management.

Configure

Configure activities fall under the operation side of DevOps. Once software is deployed, there may be additional IT infrastructure provisioning and configuration activities required.[8] Specific activities including:

  • Infrastructure storage, database and network provisioning and configuring
  • Application provision and configuration.

The main types of solutions that facilitate these activities are continuous configuration automationconfiguration management, and infrastructure as code tools.[10]

Monitor

Monitoring is an important link in a DevOps toolchain. It allows IT organization to identify specific issues of specific releases and to understand the impact on end-users.[8] A summary of Monitor related activities are:

  • Performance of IT infrastructure
  • End-user response and experience
  • Production metrics and statistics

Information from monitoring activities often impacts Plan activities required for changes and for new release cycles.

Version Control

Version Control is an important link in a DevOps toolchain and a component of software configuration management. Version Control is the management of changes to documents, computer programs, large web sites, and other collections of information.[8] A summary of Version Control related activities are:

  • Non-linear development
  • Distributed development
  • Compatibility with existent systems and protocols
  • Toolkit-based design

Information from Version Control often supports Release activities required for changes and for new release cycles.

See also

References

  1. ^ Edwards, Damon. “Integrating DevOps tools into a Service Delivery Platform”dev2ops.org.
  2. ^ Seroter, Richard. “Exploring the ENTIRE DevOps Toolchain for (Cloud) Teams”infoq.com.
  3. ^ “Toolchain Overview”nongnu.org. 2012-01-03. Retrieved 2013-10-21.
  4. ^ “Toolchains”elinux.org. 2013-09-08. Retrieved 2013-10-21.
  5. ^ Imran, Saed; Buchheit, Martin; Hollunder, Bernhard; Schreier, Ulf (2015-10-29). Tool Chains in Agile ALM Environments: A Short IntroductionLecture Notes in Computer Science9416. pp. 371–380. doi:10.1007/978-3-319-26138-6_40ISBN 978-3-319-26137-9.
  6. ^ Loukides, Mike (2012-06-07). “What is DevOps?”.
  7. ^ Garner Market Trends: DevOps – Not a Market, but Tool-Centric Philosophy That supports a Continuous Delivery Value Chain (Report). Gartner. 18 February 2015.
  8. a b c d e f g Avoid Failure by Developing a Toolchain that Enables DevOps (Report). Gartner. 16 March 2016.
  9. ^ Best Practices in Change, Configuration and Release Management (Report). Gartner. 14 July 2010.
  10. ^ Roger S. Pressman (2009). Software Engineering: A Practitioner’s Approach (7th International ed.). New York: McGraw-Hill.

Categories

Sources:

Fair Use Sources:

Categories
Bibliography Python Software Engineering

Python in a Nutshell: A Desktop Quick Reference

See also: Python, Python Bibliography and Bibliography of Python Libraries and Web Frameworks

See: Python in a Nutshell: A Desktop Quick Reference, 3rd Edition, by Alex Martelli, Anna Ravenscroft, and Steve Holden, 2017, B06Y4DVSBM (PyNutSh)

Fair Use Source: B06Y4DVSBM (PyNutSh)

About This Book:

Useful in many roles, from design and prototyping to testing, deployment, and maintenance, Python is consistently ranked among today’s most popular programming languages. The third edition of this practical book provides a quick reference to the language—including Python 3.5, 2.7, and highlights of 3.6—commonly used areas of its vast standard library, and some of the most useful third-party modules and packages.

Ideal for programmers with some Python experience, and those coming to Python from other programming languages, this book covers a wide range of application areas, including web and network programming, XML handling, database interactions, and high-speed numeric computing. Discover how Python provides a unique mix of elegance, simplicity, practicality, and sheer power.

This edition covers:

  • Python syntax, Object-Oriented Python, standard library modules, and third-party Python packages
  • Python’s support for file and text operations, persistence and databases, concurrent execution, and numeric computations
  • Networking basics, event-driven programming, and client-side network protocol modules
  • Python extension modules, and tools for packaging and distributing extensions, modules, and applications

Reviews:

“Holden, Ravenscroft, and Martelli are well known Python masters. Their exceptional lucidity shines through in one of Python’s best references, covering the core language, libraries, and essential parts of the Python ecosystem.” — Raymond HettingerDistinguished Python Core Developer –

About the Author:

Alex Martelli spent 8 years with IBM Research, then 13 at think3 inc., followed by 4 years as a consultant (mostly for AB Strakt in Göteborg, Sweden), and lately 12 years at Google (currently as tech lead of 1:many tech support for Google Cloud Platform). He has also taught programming languages, development methods, and numerical computing at Ferrara University and other venues. He’s a Fellow of the Python Software Foundation, a winner of the Frank Willison Memorial Award for contributions to the Python community, and a top-page reputation hog on Stack Overflow. Books he’s authored or co-authored include two editions of the Python Cookbook, three of Python in a Nutshell, and “Beautiful Teams.” Dozens of his tech talks at conferences, and interviews with him, are available on YouTube.

Alex’s proudest achievement are the articles that appeared in Bridge World (January and February 2000), which were hailed as giant steps towards solving issues that had haunted contract bridge theoreticians for decades, and still get quoted in current bridge-theoretical literature, after all these years.

Book Details:

  • ASIN: B06Y4DVSBM
  • ISBN-10: 144939292X
  • ISBN-13: 978-1449392925
  • Publisher: O’Reilly Media; 3rd edition (April 7, 2017)
  • Publication date: April 7, 2017
  • Print length: 1164 pages

Table of Contents:

  • Part I, Getting Started with Python
  • Part II, Core Python Language and Built-ins
  • Part III, Python Library and Extension Modules
  • Part IV, Network and Web Programming
  • Part V, Extending, Distributing, v2/v3 Migration

Preface:

“The Python programming language reconciles many apparent contradictions: both elegant and pragmatic, both simple and powerful, it’s very high-level yet doesn’t get in your way when you need to fiddle with bits and bytes, and it’s suitable for programming novices as well as great for experts, too.” (PyNutSh)

“This book is aimed at programmers with some previous exposure to Python, as well as experienced programmers coming to Python for the first time from other languages. The book is a quick reference to Python itself, the most commonly used parts of its vast standard library, and a few of the most popular and useful third-party modules and packages, covering a wide range of application areas, including web and network programming, XML handling, database interactions, and high-speed numeric computing. The book focuses on Python’s cross-platform capabilities and covers the basics of extending Python and embedding it in other applications.” (PyNutSh)

Sources:

Fair Use Sources:

Categories
Bibliography Python Software Engineering

Practices of the Python Pro

See also: Python, Python Bibliography and Bibliography of Python Libraries and Web Frameworks

See: Practices of the Python Pro, by Dane Hillard, 2020, 1617296082 (PrPyPro)

Fair Use Source: 1617296082 (PrPyPro)

About This Book:

Summary

Professional developers know the many benefits of writing application code that’s clean, well-organized, and easy to maintain. By learning and following established patterns and best practices, you can take your code and your career to a new level.
With Practices of the Python Pro, you’ll learn to design professional-level, clean, easily maintainable software at scale using the incredibly popular programming language, Python. You’ll find easy-to-grok examples that use pseudocode and Python to introduce software development best practices, along with dozens of instantly useful techniques that will help you code like a pro.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology

Professional-quality code does more than just run without bugs. It’s clean, readable, and easy to maintain. To step up from a capable Python coder to a professional developer, you need to learn industry standards for coding style, application design, and development process. That’s where this book is indispensable.

About the book

Practices of the Python Pro teaches you to design and write professional-quality software that’s understandable, maintainable, and extensible. Dane Hillard is a Python pro who has helped many dozens of developers make this step, and he knows what it takes. With helpful examples and exercises, he teaches you when, why, and how to modularize your code, how to improve quality by reducing complexity, and much more. Embrace these core principles, and your code will become easier for you and others to read, maintain, and reuse.

What’s inside

  • Organizing large Python projects
  • Achieving the right levels of abstraction
  • Writing clean, reusable code Inheritance and composition
  • Considerations for testing and performance

About the reader

For readers familiar with the basics of Python, or another OO language.

Reviews:

“A wealth of information on general software architecture and truths that are applicable to any language.”–David T. Kerns, Rincon Research Corporation

“Get this book, and begin to write Python code like a professional.” –Davide Cadamuro, BMW Group

“Easy-to-follow book with great information on how to design your software for easy scaling and readability.” –Mike Stevens, Silver Hammer Associates

“This will take a Python developer down a path to becoming a pro.” –Joseph Perenia, Sony Interactive Entertainment

About the Author:

Dane Hillard has spent the majority of his development career using Python to build web applications. https://github.com/daneah, https://dev.to/easyaspython, https://easyaspython.com

Book Details:

  • ASIN: 1617296082
  • ISBN-10: 1617296082
  • ISBN-13: 978-1617296086
  • Publisher: Manning Publications; 1st edition (January 14, 2020)
  • Paperback: 248 pages

Table of Contents:

PART 1 WHY IT ALL MATTERS

1 ¦ The bigger picture

PART 2 FOUNDATIONS OF DESIGN

2 ¦ Separation of concerns

3 ¦ Abstraction and encapsulation

4 ¦ Designing for high performance

5 ¦ Testing your software

PART 3 NAILING DOWN LARGE SYSTEMS

6 ¦ Separation of concerns in practice

7 ¦ Extensibility and flexibility

8 ¦ The rules (and exceptions) of inheritance

9 ¦ Keeping things lightweight

10 ¦ Achieving loose coupling

PART 4 WHAT’S NEXT?

11 ¦ Onward and upward

Sources:

Fair Use Sources:

Categories
Bibliography Python Software Engineering

The Well-Grounded Python Developer

See also: Python, Python Bibliography and Bibliography of Python Libraries and Web Frameworks

See: The Well-Grounded Python Developer, by Doug Farrell, 2021, 1617297441 (WlGrPD)

Fair Use Source: 1617297441 (WlGrPD)

About the Technology:

Python is the perfect language for beginning programmers. It is easy to learn, with tons of helpful libraries and tools. Better still, it doesn’t run out of steam when you want to create more advanced applications for web development or machine learning. Once you’ve mastered the syntax of simple Python scripts, it can be a challenge to progress to more ambitious projects. This book helps you on that path.

About This Book:

When you’re new to Python, it can be tough to understand where and how to use its many language features. There’s a dizzying array of libraries, and it’s challenging to fit everything together. The Well-Grounded Python Developer builds on Python skills you’ve learned in isolation and shows you how to unify them into a meaningful whole. As you work through this practical guide, you’ll discover how all the bits of the Python ecosystem connect as you build and modify a typical web server application.

  • Building modules of functionality
  • Creating a well-constructed web server application
  • Using REST to present data dynamically to a user
  • Refactor and decoupling systems to help scale them
  • How to think about the big picture of your application

The Well-Grounded Python Developer teaches you how to write real software in Python by building on the basic language skills you already have. Veteran developer Doug Farrell helps you see the big picture you can create out of small pieces, introducing concepts like modular construction, APIs, and the design of a basic web server. Throughout the book, you’ll practice your skills by building a blogging platform—the kind of web app that’s in high demand by modern businesses. When you’re finished, you’ll have gone from having a basic understanding of Python’s syntax, grammar, and libraries to using them as the tools of a professional software developer.

Reviews:

“I would consider this book a bible of sorts, offering something to every level of Python developer.” — Lee Harding

About the Author:

Doug Farrell has been developing software since 1983, and has worked with Python for over 20 years.

Book Details:

  • ASIN: 1617297441
  • ISBN-10: 1617297441
  • ISBN-13: 978-1-617297441
  • Publisher: Manning Publications; 1st edition, 2021
  • Paperback: 375 pages

Table of Contents:

Brief Contents:

1 Becoming a Pythonista

2 Your Python Environment

3 Names and Namespaces

4 Application Programmers Interface

5 Object-Oriented Coding

6 Exception Handling

7 Web Servers

8 Your First Web Server

9 Your Second Web Server

10 REST: An API Convention

11 Your Third Web Server

12 Persisting Data

13 Persisting the Mini-Blog to a Database

14 Your Fourth Web Server

15 Thinking Big Picture

16 Conclusion

Preface:

“The goal of this book is to take you past beginning Python programming to the point where you think and feel like a software developer. Where the syntax and grammar of Python are not only comfortable for you but become the tools of a craftsman. With these tools you’ll be able to take on bigger and more complex projects.” (WlGrPD)

“I first discovered Python when I moved from the world of Windows development to the Linux environment. I was an accomplished C/C++ developer, but was interested in learning the scripting languages available in Linux. Fortunately, I came across Python because of its strong support for Object Oriented Programming, which I enjoyed in C++. Since then I’ve never looked back, and Python has become my primary language.” (WlGrPD)

“There are a lot of beginner Python books, Python cookbooks and reference titles, and many of them are very good. To get the most from this book you should be past the beginner level and comfortable with Python. My hope is this book provides a middle ground that gives you more context about how and why you should take certain paths when developing a program.” (WlGrPD)

“You’ll take the loops, conditionals and statements you know now and create larger constructs to handle bigger programming challenges. You’ll learn some conventions and patterns that will reduce the cognitive load on you solving smaller syntactic issues and begin to think how to solve the big picture problems. How the tools you have, and will learn about, can be combined to take goal from problem to solution.” (WlGrPD)

“The book does this by taking you along on a development journey to build a web application providing a simple blogging platform. While I think that’s an interesting application to build, the creation of that application isn’t the end goal of the book. The journey is far more important, the ideas and implementation of those ideas as code, is the real value. The chapters progress and build on the previous ones to illustrate why certain choices were made, and how those choices can be altered and improved as more is learned later in the book.” (WlGrPD)

“As developers we are at an interesting place in the history of the industry. Engineering standards are as important in software development as they are in other disciplines. However, the pace of change in the software world changes those standards as well and provides an opportunity for a great deal of craftsmanship and artistry from a developer. Python gives you a powerful palette of tools to express that.” —Doug Farrell (WlGrPD)

Sources:

Fair Use Sources:

Categories
Python Software Engineering

Benevolent dictator for life (BDFL)

See also: Python, Python Bibliography and Bibliography of Python Libraries and Web Frameworks, Python Programming Courses

Benevolent dictator for life (BDFL) is a title given to a small number of open-source software development leaders, typically project founders who retain the final say in disputes or arguments within the community. The phrase originated in 1995 with reference to Guido van Rossum, creator of the Python programming language.[1][2] Shortly after Van Rossum joined the Corporation for National Research Initiatives, the term appeared in a follow-up mail by Ken Manheimer to a meeting trying to create a semi-formal group that would oversee Python development and workshops; this initial use included an additional joke of naming Van Rossum the “First Interim BDFL”.[1] Van Rossum announced on July 12, 2018 that he would be stepping down as BDFL of Python without appointing a successor, effectively eliminating the title within the Python community structure.[3]” (WP)

“BDFL should not be confused with the more common term for open-source leaders, “benevolent dictator”, which was popularized by Eric S. Raymond‘s essay “Homesteading the Noosphere” (1999).[4] Among other topics related to hacker culture, Raymond elaborates on how the nature of open source forces the “dictatorship” to keep itself benevolent, since a strong disagreement can lead to the forking of the project under the rule of new leaders.” (WP)

Referent candidates

(WP)

NameProjectTypeReference
Sylvain BennerSpacemacsCommunity-driven Emacs distribution[5]
Vitalik ButerinEthereumBlockchain-based cryptocurrency[6]
Dries BuytaertDrupalContent management framework[7]
Haoyuan LiAlluxioData Orchestration System[8]
Evan CzaplickiElmFront-end web programming language[9][10]
David Heinemeier HanssonRuby on RailsWeb framework[11]
Rich HickeyClojureProgramming language[12]
Adrian Holovaty
and Jacob Kaplan-Moss
DjangoWeb framework[13]
Laurent DestailleurDolibarr ERP CRMSoftware suite for Enterprise Resource Planning and Customer Relationship Management[14]
Francois CholletKerasDeep learning framework[15]
Xavier LeroyOCamlProgramming language[16][17]
Yukihiro Matsumoto (Matz)RubyProgramming language[18]
Wes McKinneyPandasPython data analysis library[19]
Bram MoolenaarVimText editor[20]
Matt Mullenweg [a]WordPressContent management framework[21]
Martin OderskyScalaProgramming language[22]
Taylor OtwellLaravelWeb framework[23][24]
Theo de RaadtOpenBSDUnix-like operating system[citation needed]
Ton Roosendaal[b]Blender3D computer graphics software[25]
Sébastien RosOrchard ProjectContent management system[26]
Mark Shuttleworth[c]UbuntuLinux distribution[27]
Don Syme[d]F#Programming language[28]
Linus Torvalds[e]LinuxOperating system kernel[11][29]
José ValimElixirProgramming language[30]
Pauli VirtanenSciPyPython library used for scientific and technical computing[31][32]
Patrick VolkerdingSlackwareGNU/Linux distribution[33]
Nathan VoxlandLiquibaseDatabase schema management[34]
Shaun WalkerDotNetNukeWeb application framework[35]
Larry WallPerlProgramming language[36]
Jeremy Soller[37]RedoxOperating system[38]
Eugen RochkoMastodonOpen source, decentralized social network[39]
Dylan ArapsKISS LinuxA bare-bones Linux distribution based on musl libc and BusyBox[40]
Gavin Mendel-Gleason[f]TerminusDBOpen-source graph database for knowledge graph representation[41][42]

Organizational Positions

  1. ^ Lead Developer at the WordPress Foundation
  2. ^ Chairman of the Blender Foundation
  3. ^ Until December 2009, CEO of Canonical Ltd
  4. ^ Technical Advisor at the F# Software Foundation
  5. ^ Sponsee of the Linux Foundation. Also holds the trademark for Linux
  6. ^ CTO of TerminusDB

(WP)

Sources:

Fair Use Sources:

Categories
Python Software Engineering

Python Conference (PyCon)

See also: Python, Python Bibliography and Bibliography of Python Libraries and Web Frameworks, Python Programming Courses

“The Python Conference (also called PyCon[1]:564) is the largest[2][3] annual convention for the discussion and promotion of the Python programming language.[4][5] It originated in the United States but is also held in more than 40 other countries.[6][7][8] It was one of the first computer programming conferences to develop and adhere to a code of conduct.[1]:565 The conference hosts tutorials, demonstrations and training sessions.[9](WP)

“PyCon 2020 was listed as (one of) “The best software engineering conferences (to attend) of 2020” and “As Python becomes ever more popular in the scientific community and for big data, the influence of PyCon will continue to grow.”[10] PyCon is often attended by Guido van Rossum (the creator of the Python language).[2][11] It is often referred to in published articles.[13][14](WP)

“It is organized by the Python Software Foundation, and is supported by many significant companies, including Microsoft,[15][16] Google,[17] and Facebook.[18]” (WP)

Sources:

Fair Use Sources:

Categories
Python Software Engineering

Guido van Rossum – Python Creator

See also: Python, Python Bibliography and Bibliography of Python Libraries and Web Frameworks, Python Programming Courses

Guido van Rossum (Dutch: [ˈɣido vɑn ˈrɔsʏm, -səm]; born 31 January 1956) is a Dutch programmer best known as the creator of the Python programming language, for which he was the “Benevolent dictator for life” (BDFL) until he stepped down from the position in July 2018.[5][6] He remained a member of the Python Steering Council through 2019, and withdrew from nominations for the 2020 election.[7]” (WP)

Sources:

Fair Use Sources:

Categories
Bibliography Python Software Engineering

Head First Python: A Brain-Friendly Guide

See also: Python, Python Bibliography and Bibliography of Python Libraries and Web Frameworks

See: Head First Python: A Brain-Friendly Guide, by Paul Barry, B01N0GU0OC (HFPy)

Fair Use Source: B01N0GU0OC (HFPy)

About This Book:

Want to learn the Python language without slogging your way through how-to manuals? With Head First Python, you’ll quickly grasp Python’s fundamentals, working with the built-in data structures and functions. Then you’ll move on to building your very own webapp, exploring database management, exception handling, and data wrangling. If you’re intrigued by what you can do with context managers, decorators, comprehensions, and generators, it’s all here. This second edition is a complete learning experience that will help you become a bonafide Python programmer in no time.

Why does this book look so different? Based on the latest research in cognitive science and learning theory, Head First Pythonuses a visually rich format to engage your mind, rather than a text-heavy approach that puts you to sleep. Why waste your time struggling with new concepts? This multi-sensory learning experience is designed for the way your brain really works.

About ‘Head First’ Books

We think of a Head First Reader as a Learner

Learning isn’t something that just happens to you. It’s something you do. You can’t learn without pumping some neurons. Learning means building more mental pathways, bridging connections between new and pre-existing knowledge, recognizing patterns, and turning facts and information into knowledge (and ultimately, wisdom). Based on the latest research in cognitive science, neurobiology, and educational psychology, Head First books get your brain into learning mode.

Here’s how we help you do that:

We tell stories using casual language, instead of lecturing. We don’t take ourselves too seriously. Which would you pay more attention to: a stimulating dinner party companion, or a lecture?

We make it visual. Images are far more memorable than words alone, and make learning much more effective. They also make things more fun.

We use attention-grabbing tactics. Learning a new, tough, technical topic doesn’t have to be boring. The graphics are often surprising, oversized, humorous, sarcastic, or edgy. The page layout is dynamic: no two pages are the same, and each one has a mix of text and images.

Metacognition: thinking about thinking

If you really want to learn, and you want to learn more quickly and more deeply, pay attention to how you pay attention. Think about how you think. The trick is to get your brain to see the new material you’re learning as Really Important. Crucial to your well-being. Otherwise, you’re in for a constant battle, with your brain doing its best to keep the new content from sticking.

If you answer ‘yes’ to all of these, this book is for you

  • Do you already know how to program in another programming language?
  • Do you wish you had the know-how to program Python, add it to your list of tools, and make it do new things?
  • Do you prefer actually doing things and applying the stuff you learn over listening to someone in a lecture rattle on for hours on end?
Here’s what we do:

We use pictures, because your brain is tuned for visuals, not text. As far as your brain’s concerned, a picture really is worth a thousand words. And when text and pictures work together, we embedded the text in the pictures because your brain works more effectively when the text is within the thing the text refers to, as opposed to in a caption or buried in the text somewhere.

We use redundancy, saying the same thing in different ways and with different media types, and multiple senses, to increase the chance that the content gets coded into more than one area of your brain.

We use concepts and pictures in unexpected ways because your brain is tuned for novelty, and we use pictures and ideas with at least some emotional content, because your brain is more likely to remember when you feel something.

We use a personalized, conversational style, because your brain is tuned to pay more attention when it believes you’re in a conversation than if it thinks you’re passively listening to a presentation.

We include many activities, because your brain is tuned to learn and remember more when you do things than when you read about things. And we make the exercises challenging-yet-do-able, because that’s what most people prefer.

We use multiple learning styles, because you might prefer step-by-step procedures, while someone else wants to understand the big picture first, and someone else just wants to see an example. But regardless of your own learning preference, everyone benefits from seeing the same content represented in multiple ways.

We include content for both sides of your brain, because the more of your brain you engage, the more likely you are to learn and remember, and the longer you can stay focused. Since working one side of the brain often means giving the other side a chance to rest, you can be more productive at learning for a longer period of time.

We include challenges by asking questions that don’t always have a straight answer, because your brain is tuned to learn and remember when it has to work at something.

Finally, we use people in our stories, examples, and pictures, because, well, you’re a person. Your brain pays more attention to people than to things.

About the Author:

Paul Barry is formally educated and trained in Computer Science and holds a Masters Degree in Computing Science. He has been programming professionally, on and off, for close to 25 years. Paul already has two textbooks to his name, and is also a Contributing Editor to Linux Journal magazine. His day job is with the Institute of Technology, Carlow in Ireland where he has spent over a decade preparing Ireland’s next generation of computing folk to be productive in the workforce. His role as a third level educator affords him the opportunity to explore, learn and teach the very latest programming technologies and practices, which is something that he enjoys even though he knows this makes him a bonafide “geek”. Paul lives just outside the town of Carlow in Ireland with his wife, two sons, daughter, dog and cat. There’s a bunch of computers and a growing collection of music instruments in the house, too (and like a lot of the Head First family, Paul is a struggling guitarist trapped inside a geek’s body). He has so far resisted any suggestion that the family acquire a hamster … or a set of drums.

Book Details:

  • ASIN: B01N0GU0OC
  • ISBN-10: 1491919531
  • ISBN-13: 978-1491919538
  • Publisher: O’Reilly Media; 2nd edition (November 21, 2016)
  • Publication date: November 21, 2016
  • Print length: 983 pages

Table of Contents:

Sources:

Fair Use Sources:

Categories
Bibliography Python Software Engineering

Introducing Python: Modern Computing in Simple Packages, by Bill Lubanovic

See also: Python, Python Bibliography and Bibliography of Python Libraries and Web Frameworks

See: Introducing Python: Modern Computing in Simple Packages, by Bill Lubanovic, 2020, B0815R5543 (IPyBLub)

Fair Use Source: B0815R5543 (IPyBLub)

About This Book:

Easy to understand and fun to read, this updated edition of Introducing Python is ideal for beginning programmers as well as those new to the language. Author Bill Lubanovic takes you from the basics to more involved and varied topics, mixing tutorials with cookbook-style code recipes to explain concepts in Python 3. End-of-chapter exercises help you practice what you’ve learned.

You’ll gain a strong foundation in the language, including best practices for testing, debugging, code reuse, and other development tips. This book also shows you how to use Python for applications in business, science, and the arts, using various Python tools and open source packages.

About the Author:

Bill Lubanovic has developed software with UNIX since 1977, GUIs since 1981, databases since 1990, and the Web since 1993. Recently, he developed core services and distributed systems with a remote team for a Manhattan startup. Currently, he’s integrating OpenStack services for a supercomputer company.

Book Details:

  • ASIN: B0815R5543
  • ISBN-10: 1492051365
  • ISBN-13: 978-1492051367
  • Publisher: O’Reilly Media; 2nd edition (November 6, 2019)
  • Publication date: November 6, 2019
  • Print length: 960 pages

Table of Contents:

Preface Audience

Changes in the Second Edition

Outline

Python Versions

Conventions Used in This Book

Using Code Examples

O’Reilly Online Learning

How to Contact Us

Acknowledgments

I. Python Basics

  1. A Taste of Py Mysteries

Little Programs

A Bigger Program

Python in the Real World

Python Versus the Language from Planet X

Why Python?

Why Not Python?

Python 2 Versus Python 3

Installing Python

Running Python Using the Interactive Interpreter

Using Python Files

What’s Next?

Your Moment of Zen

Coming Up

Things to Do

  1. Data: Types, Values, Variables, and Names Python Data Are Objects

Types

Mutability

Literal Values

Variables

Assignment

Variables Are Names, Not Places

Assigning to Multiple Names

Reassigning a Name

Copying

Choose Good Variable Names

Coming Up

Things to Do

  1. Numbers Booleans

Integers Literal Integers

Integer Operations

Integers and Variables

Precedence

Bases

Type Conversions

How Big Is an int?

Floats

Math Functions

Coming Up

Things to Do

  1. Choose with if Comment with #

Continue Lines with \

Compare with if, elif, and else

What Is True?

Do Multiple Comparisons with in

New: I Am the Walrus

Coming Up

Things to Do

  1. Text Strings Create with Quotes

Create with str()

Escape with \

Combine by Using +

Duplicate with *

Get a Character with []

Get a Substring with a Slice

Get Length with len()

Split with split()

Combine by Using join()

Substitute by Using replace()

Strip with strip()

Search and Select

Case

Alignment

Formatting Old style: %

New style: {} and format()

Newest Style: f-strings

More String Things

Coming Up

Things to Do

  1. Loop with while and for Repeat with while Cancel with break

Skip Ahead with continue

Check break Use with else

Iterate with for and in Cancel with break

Skip with continue

Check break Use with else

Generate Number Sequences with range()

Other Iterators

Coming Up

Things to Do

  1. Tuples and Lists Tuples Create with Commas and ()

Create with tuple()

Combine Tuples by Using +

Duplicate Items with *

Compare Tuples

Iterate with for and in

Modify a Tuple

Lists Create with []

Create or Convert with list()

Create from a String with split()

Get an Item by [ offset ]

Get Items with a Slice

Add an Item to the End with append()

Add an Item by Offset with insert()

Duplicate All Items with *

Combine Lists by Using extend() or +

Change an Item by [ offset ]

Change Items with a Slice

Delete an Item by Offset with del

Delete an Item by Value with remove()

Get an Item by Offset and Delete It with pop()

Delete All Items with clear()

Find an Item’s Offset by Value with index()

Test for a Value with in

Count Occurrences of a Value with count()

Convert a List to a String with join()

Reorder Items with sort() or sorted()

Get Length with len()

Assign with =

Copy with copy(), list(), or a Slice

Copy Everything with deepcopy()

Compare Lists

Iterate with for and in

Iterate Multiple Sequences with zip()

Create a List with a Comprehension

Lists of Lists

Tuples Versus Lists

There Are No Tuple Comprehensions

Coming Up

Things to Do

  1. Dictionaries and Sets Dictionaries Create with {}

Create with dict()

Convert with dict()

Add or Change an Item by [ key ]

Get an Item by [key] or with get()

Get All Keys with keys()

Get All Values with values()

Get All Key-Value Pairs with items()

Get Length with len()

Combine Dictionaries with {**a, **b}

Combine Dictionaries with update()

Delete an Item by Key with del

Get an Item by Key and Delete It with pop()

Delete All Items with clear()

Test for a Key with in

Assign with =

Copy with copy()

Copy Everything with deepcopy()

Compare Dictionaries

Iterate with for and in

Dictionary Comprehensions

Sets Create with set()

Convert with set()

Get Length with len()

Add an Item with add()

Delete an Item with remove()

Iterate with for and in

Test for a Value with in

Combinations and Operators

Set Comprehensions

Create an Immutable Set with frozenset()

Data Structures So Far

Make Bigger Data Structures

Coming Up

Things to Do

  1. Functions Define a Function with def

Call a Function with Parentheses

Arguments and Parameters None Is Useful

Positional Arguments

Keyword Arguments

Specify Default Parameter Values

Explode/Gather Positional Arguments with *

Explode/Gather Keyword Arguments with **

Keyword-Only Arguments

Mutable and Immutable Arguments

Docstrings

Functions Are First-Class Citizens

Inner Functions Closures

Anonymous Functions: lambda

Generators Generator Functions

Generator Comprehensions

Decorators

Namespaces and Scope

Uses of _ and __ in Names

Recursion

Async Functions

Exceptions Handle Errors with try and except

Make Your Own Exceptions

Coming Up

Things to Do

  1. Oh Oh: Objects and Classes What Are Objects?

Simple Objects Define a Class with class

Attributes

Methods

Initialization

Inheritance Inherit from a Parent Class

Override a Method

Add a Method

Get Help from Your Parent with super()

Multiple Inheritance

Mixins

In self Defense

Attribute Access Direct Access

Getters and Setters

Properties for Attribute Access

Properties for Computed Values

Name Mangling for Privacy

Class and Object Attributes

Method Types Instance Methods

Class Methods

Static Methods

Duck Typing

Magic Methods

Aggregation and Composition

When to Use Objects or Something Else

Named Tuples

Dataclasses

Attrs

Coming Up

Things to Do

  1. Modules, Packages, and Goodies Modules and the import Statement Import a Module

Import a Module with Another Name

Import Only What You Want from a Module

Packages The Module Search Path

Relative and Absolute Imports

Namespace Packages

Modules Versus Objects

Goodies in the Python Standard Library Handle Missing Keys with setdefault() and defaultdict()

Count Items with Counter()

Order by Key with OrderedDict()

Stack + Queue == deque

Iterate over Code Structures with itertools

Print Nicely with pprint()

Get Random

More Batteries: Get Other Python Code

Coming Up

Things to Do

II. Python in Practice

  1. Wrangle and Mangle Data Text Strings: Unicode Python 3 Unicode Strings

UTF-8

Encode

Decode

HTML Entities

Normalization

For More Information

Text Strings: Regular Expressions Find Exact Beginning Match with match()

Find First Match with search()

Find All Matches with findall()

Split at Matches with split()

Replace at Matches with sub()

Patterns: Special Characters

Patterns: Using Specifiers

Patterns: Specifying match() Output

Binary Data bytes and bytearray

Convert Binary Data with struct

Other Binary Data Tools

Convert Bytes/Strings with binascii()

Bit Operators

A Jewelry Analogy

Coming Up

Things to Do

  1. Calendars and Clocks Leap Year

The datetime Module

Using the time Module

Read and Write Dates and Times

All the Conversions

Alternative Modules

Coming Up

Things to Do

  1. Files and Directories File Input and Output Create or Open with open()

Write a Text File with print()

Write a Text File with write()

Read a Text File with read(), readline(), or readlines()

Write a Binary File with write()

Read a Binary File with read()

Close Files Automatically by Using with

Change Position with seek()

Memory Mapping

File Operations Check Existence with exists()

Check Type with isfile()

Copy with copy()

Change Name with rename()

Link with link() or symlink()

Change Permissions with chmod()

Change Ownership with chown()

Delete a File with remove()

Directory Operations Create with mkdir()

Delete with rmdir()

List Contents with listdir()

Change Current Directory with chdir()

List Matching Files with glob()

Pathnames Get a Pathname with abspath()

Get a symlink Pathname with realpath()

Build a Pathname with os.path.join()

Use pathlib

BytesIO and StringIO

Coming Up

Things to Do

  1. Data in Time: Processes and Concurrency Programs and Processes Create a Process with subprocess

Create a Process with multiprocessing

Kill a Process with terminate()

Get System Info with os

Get Process Info with psutil

Command Automation Invoke

Other Command Helpers

Concurrency Queues

Processes

Threads

concurrent.futures

Green Threads and gevent

twisted

asyncio

Redis

Beyond Queues

Coming Up

Things to Do

  1. Data in a Box: Persistent Storage Flat Text Files

Padded Text Files

Tabular Text Files CSV

XML

An XML Security Note

HTML

JSON

YAML

Tablib

Pandas

Configuration Files

Binary Files Padded Binary Files and Memory Mapping

Spreadsheets

HDF5

TileDB

Relational Databases SQL

DB-API

SQLite

MySQL

PostgreSQL

SQLAlchemy

Other Database Access Packages

NoSQL Data Stores The dbm Family

Memcached

Redis

Document Databases

Time Series Databases

Graph Databases

Other NoSQL

Full-Text Databases

Coming Up

Things to Do

  1. Data in Space: Networks TCP/IP Sockets

Scapy

Netcat

Networking Patterns

The Request-Reply Pattern ZeroMQ

Other Messaging Tools

The Publish-Subscribe Pattern Redis

ZeroMQ

Other Pub-Sub Tools

Internet Services Domain Name System

Python Email Modules

Other Protocols

Web Services and APIs

Data Serialization Serialize with pickle

Other Serialization Formats

Remote Procedure Calls XML RPC

JSON RPC

MessagePack RPC

Zerorpc

gRPC

Twirp

Remote Management Tools

Big Fat Data Hadoop

Spark

Disco

Dask

Clouds Amazon Web Services

Google Cloud

Microsoft Azure

OpenStack

Docker Kubernetes

Coming Up

Things to Do

  1. The Web, Untangled Web Clients Test with telnet

Test with curl

Test with httpie

Test with httpbin

Python’s Standard Web Libraries

Beyond the Standard Library: requests

Web Servers The Simplest Python Web Server

Web Server Gateway Interface (WSGI)

ASGI

Apache

NGINX

Other Python Web Servers

Web Server Frameworks Bottle

Flask

Django

Other Frameworks

Database Frameworks

Web Services and Automation webbrowser

webview

Web APIs and REST

Crawl and Scrape Scrapy

BeautifulSoup

Requests-HTML

Let’s Watch a Movie

Coming Up

Things to Do

  1. Be a Pythonista About Programming

Find Python Code

Install Packages Use pip

Use virtualenv

Use pipenv

Use a Package Manager

Install from Source

Integrated Development Environments IDLE

PyCharm

IPython

Jupyter Notebook

JupyterLab

Name and Document

Add Type Hints

Test Check with pylint, pyflakes, flake8, or pep8

Test with unittest

Test with doctest

Test with nose

Other Test Frameworks

Continuous Integration

Debug Python Code Use print()

Use Decorators

Use pdb

Use breakpoint()

Log Error Messages

Optimize Measure Timing

Algorithms and Data Structures

Cython, NumPy, and C Extensions

PyPy

Numba

Source Control Mercurial

Git

Distribute Your Programs

Clone This Book

How You Can Learn More Books

Websites

Groups

Conferences

Getting a Python Job

Coming Up

Things to Do

  1. Py Art 2-D Graphics Standard Library

PIL and Pillow

ImageMagick

3-D Graphics

3-D Animation

Graphical User Interfaces

Plots, Graphs, and Visualization Matplotlib

Seaborn

Bokeh

Games

Audio and Music

Coming Up

Things to Do

  1. Py at Work The Microsoft Office Suite

Carrying Out Business Tasks

Processing Business Data Extracting, Transforming, and Loading

Data Validation

Additional Sources of Information

Open Source Python Business Packages

Python in Finance

Business Data Security

Maps Formats

Draw a Map from a Shapefile

Geopandas

Other Mapping Packages

Applications and Data

Coming Up

Things to Do

  1. Py Sci Math and Statistics in the Standard Library Math Functions

Working with Complex Numbers

Calculate Accurate Floating Point with decimal

Perform Rational Arithmetic with fractions

Use Packed Sequences with array

Handling Simple Stats with statistics

Matrix Multiplication

Scientific Python

NumPy Make an Array with array()

Make an Array with arange()

Make an Array with zeros(), ones(), or random()

Change an Array’s Shape with reshape()

Get an Element with []

Array Math

Linear Algebra

SciPy

SciKit

Pandas

Python and Scientific Areas

Coming Up

Things to Do

A. Hardware and Software for Beginning Programmers Hardware Caveman Computers

Electricity

Inventions

An Idealized Computer

The CPU

Memory and Caches

Storage

Inputs

Outputs

Relative Access Times

Software In the Beginning Was the Bit

Machine Language

Assembler

Higher-Level Languages

Operating Systems

Virtual Machines

Containers

Distributed Computing and Networks

The Cloud

Kubernetes

B. Install Python 3 Check Your Python Version

Install Standard Python macOS

Windows

Linux or Unix

Install the pip Package Manager

Install virtualenv

Other Packaging Solutions

Install Anaconda Install Anaconda’s Package Manager conda

C. Something Completely Different: Async Coroutines and Event Loops

Asyncio Alternatives

Async Versus…

Async Frameworks and Servers

D. Answers to Exercises 1. A Taste of Py

  1. Data: Types, Values, Variables, and Names
  2. Numbers
  3. Choose with if
  4. Text Strings
  5. Loop with while and for
  6. Tuples and Lists
  7. Dictionaries
  8. Functions
  9. Oh Oh: Objects and Classes
  10. Modules, Packages, and Goodies
  11. Wrangle and Mangle Data
  12. Calendars and Clocks
  13. Files and Directories
  14. Data in Time: Processes and Concurrency
  15. Data in a Box: Persistent Storage
  16. Data in Space: Networks
  17. The Web, Untangled
  18. Be a Pythonista
  19. Py Art
  20. Py at Work
  21. PySci

E. Cheat Sheets Operator Precedence

String Methods Change Case

Search

Modify

Format

String Type

String Module Attributes

Coda

Index

Preface:

“As the title promises, this book will introduce you to one of the world’s most popular programming languages: Python. It’s aimed at beginning programmers as well as more experienced programmers who want to add Python to the languages they already know.” (IPyBLub)

“In most cases, it’s easier to learn a computer language than a human language. There’s less ambiguity and fewer exceptions to keep in your head. Python is one of the most consistent and clear computer languages. It balances ease of learning, ease of use, and expressive power.” (IPyBLub)

“Computer languages are made of data (like nouns in spoken languages) and instructions or code (like verbs). You need both. In alternating chapters, you’ll be introduced to Python’s basic code and data structures, learn how to combine them, and build up to more advanced ones. The programs that you read and write will get longer and more complex. Using a woodworking analogy, we’ll start with a hammer, nails, and scraps of wood. Over the first half of this book, we’ll introduce more specialized components, up to the equivalents of lathes and other power tools.” (IPyBLub)

“You’ll not only learn the language, but also what to do with it. We’ll begin with the Python language and its “batteries included” standard library, but I’ll also show you how to find, download, install, and use some good third-party packages. My emphasis is on whatever I’ve actually found useful in more than 10 years of production Python development, rather than fringe topics or complex hacks.” (IPyBLub)

“Although this is an introduction, some advanced topics are included because I want to expose them to you. Areas like databases and the web are still covered, but technology changes fast. A Python programmer might now be expected to know something about cloud computing, machine learning, or event streaming. You’ll find something here on all of these.” (IPyBLub)

“Python has some special features that work better than adapting styles from other languages that you may know. For example, using for and iterators is a more direct way of making a loop than manually incrementing some counter variable.” (IPyBLub)

“When you’re learning something new, it’s hard to tell which terms are specific instead of colloquial, and which concepts are actually important. In other words, “Is this on the test?” I’ll highlight terms and ideas that have specific meaning or importance in Python, but not too many at once. Real Python code is included early and often.” (IPyBLub)

Note: “I’ll include a note such as this when something might be confusing, or if there’s a more appropriate Pythonic way to do it.” (IPyBLub)

“Python isn’t perfect. I’ll show you things that seem odd or that should be avoided — and offer alternatives you can use, instead.” (IPyBLub)

“Now and then, my opinions on some subjects (such as object inheritance, or MVC and REST designs for the web) may vary a bit from the common wisdom. See what you think.” (IPyBLub)

Audience:

“This book is for anybody interested in learning one of the world’s most popular computing languages, regardless of whether you have previously learned any programming.” (IPyBLub)

Changes in the Second Edition:

“What’s changed since the first edition?

About a hundred more pages, including cat pictures.

Twice the chapters, each shorter now.

An early chapter devoted to data types, variables, and names.

New standard Python features like f-strings.

New or improved third-party packages.

New code examples throughout.

An appendix on basic hardware and software, for new programmers.

An appendix on asyncio, for not-so-new programmers.

“New stack” coverage: containers, clouds, data science, and machine learning.

Hints on getting a job programming in Python.

What hasn’t changed? Examples using bad poetry and ducks. These are evergreen.” (IPyBLub)

Outline:

“Part I (Chapters 1–11) explains Python’s basics. You should read these chapters in order. I work up from the simplest data and code structures, combining them on the way into more detailed and realistic programs. Part II (Chapters 12–22) shows how Python is used in specific application areas such as the web, databases, networks, and so on; read these chapters in any order you like.” (IPyBLub)

“Here’s a brief preview of the chapters and appendixes, including some of the terms that you’ll run into there:” (IPyBLub)

Chapter 1, A Taste of Py

“Computer programs are not that different from directions that you see every day. Some little Python programs give you a glimpse of the language’s looks, capabilities, and uses in the real world. You’ll see how to run a Python program within its interactive interpreter (or shell), or from a text file saved on your computer.” (IPyBLub)

Chapter 2, Data: Types, Values, Variables, and Names

“Computer languages mix data and instructions. Different types of data are stored and treated differently by the computer. They may allow their values to be changed (mutable) or not (immutable). In a Python program, data can be literal (numbers like 78, text strings like “waffle”) or represented by named variables. Python treats variables like names, which is different from many other languages and has some important consequences.” (IPyBLub)

Chapter 3, Numbers

“This chapter shows Python’s simplest data types: booleans, integers, and floating-point numbers. You’ll also learn the basic math operations. The examples use Python’s interactive interpreter like a calculator.” (IPyBLub)

Chapter 4, Choose with if

“We’ll bounce between Python’s nouns (data types) and verbs (program structures) for a few chapters. Python code normally runs a line at a time, from the start to the end of a program. The if code structure lets you run different lines of code, depending on some data comparison.” (IPyBLub)

Chapter 5, Text Strings

“Back to nouns, and the world of text strings. Learn how to create, combine, change, retrieve, and print strings.” (IPyBLub)

Chapter 6, Loop with while and for

“Verbs again, and two ways to make a loop: for and while. You’ll be introduced to a core Python concept: iterators.” (IPyBLub)

Chapter 7, Tuples and Lists

“It’s time for the first of Python’s higher-level built-in data structures: lists and tuples. These are sequences of values, like LEGO for building much more complex data structures. Step through them with iterators, and build lists quickly with comprehensions.” (IPyBLub)

Chapter 8, Dictionaries and Sets

“Dictionaries (aka dicts) and sets let you save data by their values rather than their position. This turns out to be very handy and will be among your favorite Python features.” (IPyBLub)

Chapter 9, Functions

“Weave the data and code structures of the previous chapters to compare, choose, or repeat. Package code in functions and handle errors with exceptions.” (IPyBLub)

Chapter 10, Oh Oh: Objects and Classes

“The word object is a bit fuzzy, but important in many computer languages, including Python. If you’ve done object-oriented programming in other languages, Python is a bit more relaxed. This chapter explains how to use objects and classes, and when it’s better to use alternatives.” (IPyBLub)

Chapter 11, Modules, Packages, and Goodies

“This chapter demonstrates how to scale out to larger code structures: modules, packages, and programs. You’ll see where to put code and data, how to get data in and out, handle options, tour the Python Standard Library, and take a glance at what lies beyond.” (IPyBLub)

Chapter 12, Wrangle and Mangle Data

“Learn to manage (or mangle) data like a pro. This chapter is all about text and binary data, joy with Unicode characters, and regex text searching. It also introduces the data types bytes and bytearray, counterparts of strings that contain raw binary values instead of text characters.” (IPyBLub)

Chapter 13, Calendars and Clocks

“Dates and times can be messy to handle. This chapter shows common problems and useful solutions.” (IPyBLub)

Chapter 14, Files and Directories

“Basic data storage uses files and directories. This chapter shows you how to create and use them.” (IPyBLub)

Chapter 15, Data in Time: Processes and Concurrency

“This is the first hard-core system chapter. Its theme is data in time — how to use programs, processes, and threads to do more things at a time (concurrency). Python’s recent async additions are mentioned, with details in Appendix C.” (IPyBLub)

Chapter 16, Data in a Box: Persistent Storage

“Data can be stored and retrieved with basic flat files and directories within filesystems. They gain some structure with common text formats such as CSV, JSON, and XML. As data get larger and more complex, they need the services of databases — traditional relational ones, and some newer NoSQL data stores.” (IPyBLub)

Chapter 17, Data in Space: Networks

“Send your code and data through space in networks with services, protocols, and APIs. Examples range from low-level TCP sockets, to messaging libraries and queuing systems, to cloud deployment.” (IPyBLub)

Chapter 18, The Web, Untangled

“The web gets its own chapter — clients, servers, APIs, and frameworks. You’ll crawl and scrape websites, and then build real websites with request parameters and templates.” (IPyBLub)

Chapter 19, Be a Pythonista

“This chapter contains tips for Python developers — installation with pip and virtualenv, using IDEs, testing, debugging, logging, source control, and documentation. It also helps you to find and install useful third-party packages, package your own code for reuse, and learn where to get more information.” (IPyBLub)

Chapter 20, Py Art

“People are doing cool things with Python in the arts: graphics, music, animation, and games.” (IPyBLub)

Chapter 21, Py at Work

“Python has specific applications for business: data visualization (plots, graphs, and maps), security, and regulation.” (IPyBLub)

Chapter 22, Py Sci

“In the past few years, Python has emerged as a top language for science: math and statistics, physical science, bioscience, and medicine. Data science and machine learning are notable strengths. This chapter touches on NumPy, SciPy, and Pandas.” (IPyBLub)

Appendix A, Hardware and Software for Beginning Programmers

“If you’re fairly new to programming, this describes how hardware and software actually work. It introduces some terms that you’ll keep running into.” (IPyBLub)

Appendix B, Install Python 3

“If you don’t already have Python 3 on your computer, this appendix shows you how to install it, whether you’re running Windows, macOS, Linux, or some other variant of Unix.” (IPyBLub)

Appendix C, Something Completely Different: Async

“Python has been adding asynchronous features in different releases, and they’re not easy to understand. I mention them as they come up in various chapters, but save a detailed discussion for this appendix.” (IPyBLub)

Appendix D, Answers to Exercises

“This has the answers to the end-of-chapter exercises. Don’t peek here until you’ve tried the exercises yourself, or you might be turned into a newt.” (IPyBLub)

Appendix E, Cheat Sheets

“This appendix contains cheat sheets to use as a quick reference.” (IPyBLub)

Sources:

Fair Use Sources:

Categories
Bibliography Cloud Django Web Framework Flask Web Framework JavaScript Python Software Engineering Swift

Dr. Angela Yu

See also: Python Programming Courses

Angela is a developer with a passion for teaching. She is the lead instructor at the London App Brewery, London’s leading Programming Bootcamp. She has helped hundreds of thousands of students learn to code and change their lives by becoming a developer. She has been invited by companies such as Twitter, Facebook and Google to teach their employees.

Her first foray into programming was when she was just 12 years old, wanting to build her own Space Invader game. Since then, she has made hundred of websites, apps and games. But most importantly, she realized that her greatest passion is teaching.

She spends most of her time researching how to make learning to code fun and make hard concepts easy to understand. She applies everything she discovers into her bootcamp courses. In her courses, you’ll find lots of geeky humor but also lots of explanations and animations to make sure everything is easy to understand. She will be there for you every step of the way.

Her Awesome Courses I Recommend and Have Completed:

External Links:

Sources:

Fair Use Sources:

https://appbrewery.co

Categories
Bibliography Python Software Engineering

Python Programming Courses

See also: Python, Python Bibliography and Bibliography of Python Libraries and Web Frameworks

These are my favorites:

  1. 100 Days of Code – The Complete Python Pro Bootcamp by Dr. Angela Yu (100PyAYu)

Sources:

Fair Use Sources:

  • Udemy, Pluralsight, LinkedIn Learning, A Cloud Guru (Linux Academy), Coursera,
Categories
Bibliography DevOps Python Software Engineering

Python Crash Course: A Hands-On, Project-Based Introduction to Programming

See also: Python, Python Bibliography and Bibliography of Python Libraries and Web Frameworks

See: Python Crash Course: A Hands-On, Project-Based Introduction to Programming, by Eric Matthes, B07J4521M3 (PyCrCs)

Fair Use Source: B07J4521M3 (PyCrCs)

About This Book:

Second edition of the best-selling Python book in the world. A fast-paced, no-nonsense guide to programming in Python. Updated and thoroughly revised to reflect the latest in Python code and practices.

Python Crash Course is the world’s best-selling guide to the Python programming language. This fast-paced, thorough introduction to programming with Python will have you writing programs, solving problems, and making things that work in no time.

In the first half of the book, you’ll learn basic programming concepts, such as variables, lists, classes, and loops, and practice writing clean code with exercises for each topic. You’ll also learn how to make your programs interactive and test your code safely before adding it to a project. In the second half, you’ll put your new knowledge into practice with three substantial projects: a Space Invaders-inspired arcade game, a set of data visualizations with Python’s handy libraries, and a simple web app you can deploy online.

As you work through the book, you’ll learn how to:
  Use powerful Python libraries and tools, including Pygame, Matplotlib, Plotly, and Django
  Make 2D games that respond to keypresses and mouse clicks, and that increase in difficulty
  Use data to generate interactive visualizations
  Create and customize web apps and deploy them safely online
  Deal with mistakes and errors so you can solve your own programming problems

If you’ve been thinking about digging into programming, Python Crash Course will get you writing real programs fast. Why wait any longer? Start your engines and code!

About the Author:

Eric Matthes is a high school math and science teacher living in Alaska who teaches an Introduction to Programming class in Python. He has been writing programs since he was five years old.

Reviews:

Python Crash Course selected as one of the best books for learning Python by Real Python

Python Crash Course was selected as one of the best books for learning Python by Real Python
“It has been interesting to see, over the last few years, No Starch Press, which produces this book, growing and producing future classics that should be alongside the more traditional O’Reilly Press programming books. Python Crash Course is one of those books.” —Greg Laden, ScienceBlogs

“All of these projects are well thought out and presented in such a way that learning the subject matter and implementing it is much more an enjoyable pastime rather than an onerous task that must be completed. Eric took the time to deal with some rather complex projects and lay them out in a consistent, logical and pleasant manner that draws the reader into the subject willingly, which unfortunately, many authors fail to do.” —Full Circle Magazine

“The book is well presented with good explanations of the code snippets. It works with you, one small step at a time, building more complex code, explaining what’s going on all the way.” —FlickThrough Reviews

“Learning Python with Python Crash Course was an extremely positive experience! A great choice if you’re new to Python.” —Mikke Goes Coding

Book Details:

  • ASIN: B07J4521M3
  • ISBN-10: 1593279280
  • ISBN-13: 978-1593279288
  • Publisher: No Starch Press; 2nd edition (May 21, 2019)
  • Publication date: May 21, 2019
  • Print length: 544 pages

Brief Table of Contents:

Preface to the Second Edition

Acknowledgments

Introduction

PART I: BASICS

Chapter 1: Getting Started

Chapter 2: Variables and Simple Data Types

Chapter 3: Introducing Lists

Chapter 4: Working with Lists

Chapter 5: if Statements

Chapter 6: Dictionaries

Chapter 7: User Input and while Loops

Chapter 8: Functions

Chapter 9: Classes

Chapter 10: Files and Exceptions

Chapter 11: Testing Your Code

PART II: PROJECTS

Project 1: Alien Invasion

Chapter 12: A Ship that Fires Bullets

Chapter 13: Aliens!

Chapter 14: Scoring

Project 2: Data Visualization

Chapter 15: Generating Data

Chapter 16: Downloading Data

Chapter 17: Working with APIs

Project 3: Web Applications

Chapter 18: Getting Started with Django

Chapter 19: User Accounts

Chapter 20: Styling and Deploying an App

Afterword

Appendix A: Installation and Troubleshooting

Appendix B: Text Editors and IDEs

Appendix C: Getting Help

Appendix D: Using Git for Version Control

Index


Detailed Table of Contents:

Why Python?

PART I: BASICS

1 GETTING STARTED Setting Up Your Programming Environment

Python on Different Operating Systems

Running a Hello World Program

Troubleshooting

Running Python Programs from a Terminal

Summary

2 VARIABLES AND SIMPLE DATA TYPES What Really Happens When You Run hello_world.py

Variables

Strings

Numbers

Comments

The Zen of Python

Summary

3 INTRODUCING LISTS What Is a List?

Changing, Adding, and Removing Elements

Organizing a List

Avoiding Index Errors When Working with Lists

Summary

4 WORKING WITH LISTS Looping Through an Entire List

Avoiding Indentation Errors

Making Numerical Lists

Working with Part of a List

Tuples

Styling Your Code

Summary

5 IF STATEMENTS A Simple Example

Conditional Tests

if Statements

Using if Statements with Lists

Styling Your if Statements

Summary

6 DICTIONARIES A Simple Dictionary

Working with Dictionaries

Looping Through a Dictionary

Nesting

Summary

7 USER INPUT AND WHILE LOOPS How the input() Function Works

Introducing while Loops

Using a while Loop with Lists and Dictionaries

Summary

8 FUNCTIONS Defining a Function

Passing Arguments

Return Values

Passing a List

Passing an Arbitrary Number of Arguments

Storing Your Functions in Modules

Styling Functions

Summary

9 CLASSES Creating and Using a Class

Working with Classes and Instances

Inheritance

Importing Classes

The Python Standard Library

Styling Classes

Summary

10 FILES AND EXCEPTIONS Reading from a File

Writing to a File

Exceptions

Storing Data

Summary

11 TESTING YOUR CODE Testing a Function

Testing a Class

Summary

PART II: PROJECTS

PROJECT 1: ALIEN INVASION

12 A SHIP THAT FIRES BULLETS Planning Your Project

Installing Pygame

Starting the Game Project

Adding the Ship Image

Refactoring: The _check_events() and _update_screen() Methods

Piloting the Ship

A Quick Recap

Shooting Bullets

Summary

13 ALIENS! Reviewing the Project

Creating the First Alien

Building the Alien Fleet

Making the Fleet Move

Shooting Aliens

Ending the Game

Summary

14 SCORING Adding the Play Button

Leveling Up

Scoring

Summary

PROJECT 2: DATA VISUALIZATION

15 GENERATING DATA Installing Matplotlib

Plotting a Simple Line Graph

Random Walks

Rolling Dice with Plotly

Summary

16 DOWNLOADING DATA The CSV File Format

Mapping Global Data Sets: JSON Format

Summary

17 WORKING WITH APIs Using a Web API

Visualizing Repositories Using Plotly

The Hacker News API

Summary

PROJECT 3: WEB APPLICATIONS

18 GETTING STARTED WITH DJANGO Setting Up a Project

Starting an App

Making Pages: The Learning Log Home Page

Building Additional Pages

Summary

19 USER ACCOUNTS Allowing Users to Enter Data

Setting Up User Accounts

Allowing Users to Own Their Data

Summary

20 STYLING AND DEPLOYING AN APP Styling Learning Log

Deploying Learning Log

Summary

AFTERWORD

A INSTALLATION AND TROUBLESHOOTING Python on Windows

Python on macOS

Python on Linux

Python Keywords and Built-in Functions

B TEXT EDITORS AND IDEs Customizing Sublime Text Settings

Other Text Editors and IDEs

C GETTING HELP First Steps

Searching Online

Internet Relay Chat

Slack

Discord

D USING GIT FOR VERSION CONTROL Installing Git

Making a Project

Ignoring Files

Initializing a Repository

Checking the Status

Adding Files to the Repository

Making a Commit

Checking the Log

The Second Commit

Reverting a Change

Checking Out Previous Commits

Deleting the Repository

(PyCrCs)

PART I

BASICS

“Part I of this book teaches you the basic concepts you’ll need to write Python programs. Many of these concepts are common to all programming languages, so they’ll be useful throughout your life as a programmer.

In Chapter 1 you’ll install Python on your computer and run your first program, which prints the message Hello world! to the screen.

In Chapter 2 you’ll learn to store information in variables and work with text and numerical values.

Chapters 3 and 4 introduce lists. Lists can store as much information as you want in one variable, allowing you to work with that data efficiently. You’ll be able to work with hundreds, thousands, and even millions of values in just a few lines of code.

In Chapter 5 you’ll use if statements to write code that responds one way if certain conditions are true, and responds in a different way if those conditions are not true.

Chapter 6 shows you how to use Python’s dictionaries, which let you make connections between different pieces of information. Like lists, dictionaries can contain as much information as you need to store.

In Chapter 7 you’ll learn how to accept input from users to make your programs interactive. You’ll also learn about while loops, which run blocks of code repeatedly as long as certain conditions remain true.

In Chapter 8 you’ll write functions, which are named blocks of code that perform a specific task and can be run whenever you need them.

Chapter 9 introduces classes, which allow you to model real-world objects, such as dogs, cats, people, cars, rockets, and much more, so your code can represent anything real or abstract.

Chapter 10 shows you how to work with files and handle errors so your programs won’t crash unexpectedly. You’ll store data before your program closes, and read the data back in when the program runs again. You’ll learn about Python’s exceptions, which allow you to anticipate errors, and make your programs handle those errors gracefully.

In Chapter 11 you’ll learn to write tests for your code to check that your programs work the way you intend them to. As a result, you’ll be able to expand your programs without worrying about introducing new bugs. Testing your code is one of the first skills that will help you transition from beginner to intermediate programmer.” (PyCrCs)

Who Is This Book For?

“The goal of this book is to bring you up to speed with Python as quickly as possible so you can build programs that work—games, data visualizations, and web applications—while developing a foundation in programming that will serve you well for the rest of your life. Python Crash Course is written for people of any age who have never before programmed in Python or have never programmed at all. This book is for those who want to learn the basics of programming quickly so they can focus on interesting projects, and those who like to test their understanding of new concepts by solving meaningful problems. Python Crash Course is also perfect for middle school and high school teachers who want to offer their students a project-based introduction to programming. If you’re taking a college class and want a friendlier introduction to Python than the text you’ve been assigned, this book could make your class easier as well. ” (PyCrCs)

What Can You Expect to Learn?

“The purpose of this book is to make you a good programmer in general and a good Python programmer in particular. You’ll learn efficiently and adopt good habits as I provide you with a solid foundation in general programming concepts. After working your way through Python Crash Course, you should be ready to move on to more advanced Python techniques, and your next programming language will be even easier to grasp. ” (PyCrCs)

“In the first part of this book, you’ll learn basic programming concepts you need to know to write Python programs. These concepts are the same as those you’d learn when starting out in almost any programming language. You’ll learn about different kinds of data and the ways you can store data in lists and dictionaries within your programs. You’ll learn to build collections of data and work through those collections in efficient ways. You’ll learn to use while loops and if statements to test for certain conditions so you can run specific sections of code while those conditions are true and run other sections when they’re not—a technique that greatly helps you automate processes.

You’ll learn to accept input from users to make your programs interactive and to keep your programs running as long as the user is active. You’ll explore how to write functions to make parts of your program reusable, so you only have to write blocks of code that perform certain actions once and then use that code as many times as you like. You’ll then extend this concept to more complicated behavior with classes, making fairly simple programs respond to a variety of situations. You’ll learn to write programs that handle common errors gracefully. After working through each of these basic concepts, you’ll write a few short programs that solve some well-defined problems. Finally, you’ll take your first step toward intermediate programming by learning how to write tests for your code so you can develop your programs further without worrying about introducing bugs. All the information in Part I will prepare you for taking on larger, more complex projects.

In Part II, you’ll apply what you learned in Part I to three projects. You can do any or all of these projects in whichever order works best for you. In the first project (Chapters 12–14), you’ll create a Space Invaders–style shooting game called Alien Invasion, which consists of levels of increasing difficulty. After you’ve completed this project, you should be well on your way to being able to develop your own 2D games.

The second project (Chapters 15–17) introduces you to data visualization. Data scientists aim to make sense of the vast amount of information available to them through a variety of visualization techniques. You’ll work with data sets that you generate through code, data sets that you download from online sources, and data sets your programs download automatically. After you’ve completed this project, you’ll be able to write programs that sift through large data sets and make visual representations of that stored information.

In the third project (Chapters 18–20), you’ll build a small web application called Learning Log. This project allows you to keep a journal of ideas and concepts you’ve learned about a specific topic. You’ll be able to keep separate logs for different topics and allow others to create an account and start their own journals. You’ll also learn how to deploy your project so anyone can access it online from anywhere. ” (PyCrCs)

Preface to the Second Edition

“The response to the first edition of Python Crash Course has been overwhelmingly positive. More than 500,000 copies are in print, including translations in eight languages. I’ve received letters and emails from readers as young as 10, as well as from retirees who want to learn to program in their free time. Python Crash Course is being used in middle schools and high schools, and also in college classes. Students who are assigned more advanced textbooks are using Python Crash Course as a companion text for their classes and finding it a worthwhile supplement. People are using it to enhance their skills on the job and to start working on their own side projects. In short, people are using the book for the full range of purposes I had hoped they would. ” (PyCrCs)

“The opportunity to write a second edition of Python Crash Course has been thoroughly enjoyable. Although Python is a mature language, it continues to evolve as every language does. My goal in revising the book was to make it leaner and simpler. There is no longer any reason to learn Python 2, so this edition focuses on Python 3 only. Many Python packages have become easier to install, so setup and installation instructions are easier. I’ve added a few topics that I’ve realized readers would benefit from, and I’ve updated some sections to reflect new, simpler ways of doing things in Python. I’ve also clarified some sections where certain details of the language were not presented as accurately as they could have been. All the projects have been completely updated using popular, well-maintained libraries that you can confidently use to build your own projects.

The following is a summary of specific changes that have been made in the second edition:

In Chapter 1, the instructions for installing Python have been simplified for users of all major operating systems. I now recommend the text editor Sublime Text, which is popular among beginner and professional programmers and works well on all operating systems.

Chapter 2 includes a more accurate description of how variables are implemented in Python. Variables are described as labels for values, which leads to a better understanding of how variables behave in Python. The book now uses f-strings, introduced in Python 3.6. This is a much simpler way to use variable values in strings. The use of underscores to represent large numbers, such as 1_000_000, was also introduced in Python 3.6 and is included in this edition. Multiple assignment of variables was previously introduced in one of the projects, and that description has been generalized and moved to Chapter 2 for the benefit of all readers. Finally, a clear convention for representing constant values in Python is included in this chapter.

In Chapter 6, I introduce the get() method for retrieving values from a dictionary, which can return a default value if a key does not exist.

The Alien Invasion project (Chapters 12–14) is now entirely class-based. The game itself is a class, rather than a series of functions. This greatly simplifies the overall structure of the game, vastly reducing the number of function calls and parameters required. Readers familiar with the first edition will appreciate the simplicity this new class-based approach provides. Pygame can now be installed in one line on all systems, and readers are given the option of running the game in fullscreen mode or in a windowed mode.

In the data visualization projects, the installation instructions for Matplotlib are simpler for all operating systems. The visualizations featuring Matplotlib use the subplots() function, which will be easier to build upon as you learn to create more complex visualizations. The Rolling Dice project in Chapter 15 uses Plotly, a well-maintained visualization library that features a clean syntax and beautiful, fully customizable output.

In Chapter 16, the weather project is based on data from NOAA, which should be more stable over the next few years than the site used in the first edition. The mapping project focuses on global earthquake activity; by the end of this project you’ll have a stunning visualization showing Earth’s tectonic plate boundaries through a focus on the locations of all earthquakes over a given time period. You’ll learn to plot any data set involving geographic points.

Chapter 17 uses Plotly to visualize Python-related activity in open source projects on GitHub.

The Learning Log project (Chapters 18–20) is built using the latest version of Django and styled using the latest version of Bootstrap. The process of deploying the project to Heroku has been simplified using the django-heroku package, and uses environment variables rather than modifying the settings.py files. This is a simpler approach and is more consistent with how professional programmers deploy modern Django projects.

Appendix A has been fully updated to recommend current best practices in installing Python. Appendix B includes detailed instructions for setting up Sublime Text and brief descriptions of most of the major text editors and IDEs in current use. Appendix C directs readers to newer, more popular online resources for getting help, and Appendix D continues to offer a mini crash course in using Git for version control.

The index has been thoroughly updated to allow you to use Python Crash Course as a reference for all of your future Python projects.” (PyCrCs)

Resources:

Sources:

Fair Use Sources: