1 - 20
Next
- Forta, Ben, author.
- Boston : Addison-Wesley Professional, 2022.
- Description
- Book — 1 online resource
- Summary
-
- Introduction xv
- PART I: IT'S ALL FUN AND GAMES 1
- Chapter 1 Getting Started 3
- Understanding Computer Programming 4
- What is a computer? 4
- How do we talk to computers? 5
- What is Python? 8
- Setting Things Up 9
- Installing Python 9
- Installing and Configuring Visual Studio Code 10
- Creating a Work Folder 13
- Writing Your First Python Program 15
- Selecting Your Work Folder 16
- It's Coding Time! 17
- Summary 19
- Chapter 2 Mad Libs 21
- Understanding Functions 22
- Using Variables 23
- Creating a Variable 24
- Using a Variable 24
- Some Important Variable Rules 25
- Variables, More Variables, and Even More Variables 26
- Getting User Input 28
- Playing Mad Libs 30
- Write Your Story 30
- Add Variables 30
- Get User Input 32
- Summary 33
- Chapter 3 Roll the Dice 35
- Using Libraries 36
- The random Library 36
- Generating Random Numbers 37
- Choosing a Random Item 38
- "3" Is Not 3 41
- Commenting Your Code 43
- One Die, Two Dice 45
- Summary 49
- Chapter 4 Calculate the Day 51
- Working with Dates 52
- The datetime Library 52
- Using the datetime Class 55
- Making Decisions 56
- The if Statement 56
- What else? 58
- if Revisited 59
- Testing for Other Options 61
- Using in 62
- Beating the Mathematician 63
- Handling Numeric Inputs 63
- Putting It All Together 64
- An Alternate Solution 67
- Summary 67
- Chapter 5 Rock Paper Scissors 69
- More Strings 70
- Game Time 72
- Handling User Input 72
- The Game Code 74
- One Last Tweak 76
- Summary 77
- Chapter 6 Secret Codes 79
- Lists 80
- Creating Lists 80
- Accessing List Items 82
- Changing List Items 83
- Adding and Removing Items 84
- Finding Items 85
- Sorting 86
- Loop-de-Loop 89
- Looping Through Items 90
- Looping Through Numbers 92
- Nested Loops 93
- Cracking the Code 95
- Encrypting Characters 96
- Modulus Math 97
- Encryption Code 98
- Decryption Code 102
- Summary 104
- Chapter 7 Guess the Number 105
- Conditional Loops 106
- Game Time 111
- The Basic Game 111
- Putting It All Together 116
- Summary 120
- Chapter 8 Becoming a Coder 121
- How Coders Code 122
- Have a Plan 122
- Think Small 123
- Game Components 124
- Restricting User Input 125
- Storing User Guesses 128
- Displaying Lists 129
- Masking Characters 131
- Summary 136
- Chapter 9 Hangman 137
- Game Time 138
- So How Does It Work? 141
- Summary 148
- Chapter 10 Keep Going 149
- Birthday Countdown 150
- Program Requirements 150
- Program Flow 150
- Some Tips 151
- Tip Calculator 152
- Program Requirements 152
- Program Flow 153
- Some Tips (Pun Intended) 153
- Password Generator 154
- Program Requirements 154
- Program Flow 155
- Some Tips 155
- Summary 159
- PART II: ON AN ADVENTURE 161
- Chapter 11 Getting Func-ky 163
- Functions Revisited 164
- Creating a Function 165
- Passing Arguments 167
- Returning Values 171
- Summary 175
- Chapter 12 Exploring 177
- Game Concept 178
- Game Structure 179
- Prompting for Options 181
- Processing Options 182
- Create a Work Folder 183
- Game Time 184
- Test It 189
- Summary 191
- Chapter 13 Cleanup Time 193
- Optimizing Your Code 194
- String Externalization 196
- Creating the Strings File 196
- Using Externalized Strings 200
- Summary 201
- Chapter 14 Reduce, Reuse, Recycle, Refactor 203
- Understanding Refactoring 204
- Identifying Refactoring Opportunities 205
- Creating a User Choice Component 207
- Designing a Reusable Component 208
- Creating the User Options Function 213
- Updating Your Code 218
- Summary 221
- Chapter 15 Carrying (and Using) Stuff 223
- Planning the Inventory System 224
- Creating a Dictionary 225
- Working with Dictionaries 226
- Lists of Dictionaries 228
- The Inventory System 229
- Creating an Inventory 230
- Plugging In the Inventory System 232
- Using the Inventory System 233
- Displaying the Inventory 238
- Summary 239
- Chapter 16 Keeping It Classy 241
- The Player System 242
- Creating a Player Class 243
- Creating the Class 243
- Defining Properties 244
- Creating Methods 247
- Initializing the Class 250
- Using Our New Class 251
- Summary 255
- Chapter 17 Color Your World 257
- Installing Third-Party Libraries 258
- Using Colorama 259
- Importing and Initializing the Library 259
- Coloring Your Output 260
- Summary 264
- Chapter 18 Keep Going 265
- Health and Lives 266
- Shopping for Items 271
- Random Events 275
- Battling Enemies 277
- Saving and Restoring 280
- Summary 282
- PART III: RACING AROUND 283
- Chapter 19 Crazy Driver 285
- Introducing Pygame 286
- Prepping the Game 286
- Game Concept 286
- Installing Pygame 288
- Creating Work Folders 288
- Obtaining Images 289
- Getting Started 289
- Initializing Pygame 290
- Displaying Stuff 294
- The Game Loop 295
- Summary 300
- Chapter 20 Image-ine the Possibilities 301
- Files and Folders 302
- Setting the Background 305
- Placing the Cars 310
- Summary 317
- Chapter 21 We Like to Move It 319
- Moving the Enemy 320
- Moving the Player 323
- Summary 327
- Chapter 22 Crash, Bang, Boom 329
- You Crashed, Game Over 330
- Tracking Score 332
- Increasing Difficulty 334
- Summary 336
- Chapter 23 Finishing Touches 337
- Game Over Revisited 338
- Pause 341
- Varying Enemies 343
- Ice Cubes 348
- Summary 351
- Chapter 24 Keep Going 353
- Splash Screen 354
- Scores and High Scores 354
- Oil Slick 356
- Multiple Enemies 357
- And Then 358
- Summary 359
- What Next? 361
- There's a Lot More to Python 362
- Web Development 362
- Mobile App Development 364
- Game Development 364
- And Then 365
- Index 367
- Bonus Online Chapter 25 Tinkering, Testing, and Debugging Revisited (Online Only).
- (source: Nielsen Book Data)
(source: Nielsen Book Data)
2. The Python book [2022]
- Mastrodomenico, Rob, author.
- Hoboken, NJ : John Wiley & Sons, Inc., 2022.
- Description
- Book — 1 online resource : color illustrations
- Summary
-
- 1 Introduction 5
- 2 Equality and Comparison 15
- 3 Data Types 19
- 4 Dates 27
- 5 Lists 33
- 6 Tuples 45
- 7 Dictionaries 49
- 8 Loops, if, else and while 55
- 9 Assigning variables 71
- 10 Strings 77
- 11 Dealing with files 89
- 12 Functions and Classes 97
- 13 Numpy 117
- 14 Pandas 123
- 15 Advanced Pandas methods 151
- 16 Plotting 219.
- (source: Nielsen Book Data)
(source: Nielsen Book Data)
3. The Python book [2022]
- Mastrodomenico, Rob, author.
- Hoboken, NJ : John Wiley & Sons, Inc., 2022.
- Description
- Book — 1 online resource : color illustrations
- Summary
-
- Getting Started
- Packages and Builtin Functions
- Data Types
- Operators
- Dates
- Lists
- Tuples
- Dictionaries
- Sets
- Loops, if, Else, and While
- Strings
- Regular Expressions
- Dealing with Files
- Functions and Classes
- Pandas
- Plotting
- APIs in Python
- Web Scraping in Python.
4. Der Weg zum Python-Profi [electronic resource] : Ein Best-Practice-Buch für sauberes Programmieren [2022]
- Sweigart, Al.
- Heidelberg : dpunkt.verlag, 2022.
- Description
- Book — 1 online resource (424 p.)
- Summary
-
- Intro
- Inhalt
- Der Autor
- Der Fachgutachter
- Danksagung
- Einleitung
- Wer dieses Buch lesen sollte und warum
- Über dieses Buch
- Ihr Weg zur Programmierung
- 1 Fehlermeldungen und Recherche
- Python-Fehlermeldungen verstehen
- Tracebacks untersuchen
- Fehlermeldungen recherchieren
- Fehler vermeiden mit Lintern
- Um Hilfe bitten
- Geben Sie gleich ausreichend Informationen, um Rückfragen zu vermeiden
- Formulieren Sie Ihre Fragen als Fragen
- Stellen Sie Ihre Fragen auf einer geeigneten Website
- Geben Sie das Problem in der Überschrift an
- Erklären Sie, was der Code tun soll
- Geben Sie die vollständige Fehlermeldung an
- Teilen Sie Ihren Code vollständig mit
- Gestalten Sie Ihren Code durch saubere Formatierung lesbar
- Beschreiben Sie, was Sie bereits versucht haben
- Beschreiben Sie Ihre Ausstattung
- Ein Beispiel für eine gut gestellte Frage
- Zusammenfassung
- 2 Die Einrichtung der Umgebung und die Befehlszeile
- Das Dateisystem
- Pfade in Python
- Das Benutzerverzeichnis
- Das aktuelle Arbeitsverzeichnis
- Absolute und relative Pfade
- Programme und Prozesse
- Die Befehlszeile
- Ein Terminalfenster öffnen
- Programme an der Befehlszeile ausführen
- Befehlszeilenargumente
- Python-Code mit -c an der Befehlszeile ausführen
- Python-Programme an der Befehlszeile ausführen
- Py.exe
- Befehle aus einem Python-Programm heraus ausführen
- Tipparbeit durch Tabulatorvervollständigung sparen
- Der Befehlsverlauf
- Gebräuchliche Befehle
- PATH und andere Umgebungsvariablen
- Umgebungsvariablen anzeigen
- Die Umgebungsvariable PATH
- Die Umgebungsvariable PATH in der Befehlszeile ändern
- Ordner in Windows dauerhaft zu PATH hinzufügen
- Ordner in macOS und Linux dauerhaft zu PATH hinzufügen
- Python-Programme außerhalb der Befehlszeile ausführen
- Python-Programme in Windows ausführen
- Python-Programme in macOS ausführen
- Python-Programme in Ubuntu Linux ausführen
- Zusammenfassung
- 3 Codeformatierung mit Black
- Wie man Freunde und Kollegen vergrault
- PEP 8 und andere Stilrichtlinien
- Horizontale Abstände
- Leerzeichen zur Einrückung verwenden
- Abstände innerhalb einer Zeile
- Vertikale Abstände
- Beispiel für vertikale Abstände
- Empfohlene Vorgehensweisen für vertikale Abstände
- Black: Der kompromisslose Codeformatierer
- Black installieren
- Black an der Befehlszeile ausführen
- Black für einzelne Abschnitte Ihres Codes ausschalten
- Zusammenfassung
- 4 Aussagekräftige Namen
- Groß- und Kleinschreibung
- Namenskonventionen in PEP 8
- Namen geeigneter Länge
- Zu kurze Namen
- Zu lange Namen
- Leicht zu findende Namen
- Scherze, Wortspiele und Anspielungen vermeiden
- Integrierte Namen nicht überschreiben
- Die allerschlechtesten Variablennamen
- Zusammenfassung
- 5 Codegerüche
- Duplizierter Code
- Magische Zahlen
- Auskommentierter und toter Code
- Print-Debugging
- Variablen mit numerischen Suffixen
- MOLINA, ALESSANDRO.
- [S.l.] : PACKT PUBLISHING LIMITED, 2021.
- Description
- Book — 1 online resource
- Summary
-
Get to grips with essential concepts and step-by-step explanations to apply TDD practices to your Python projects while keeping your test suite under control Key Features * Build robust Python applications using TDD and BDD methodologies * Test Python web applications using WebTest and web frameworks * Leverage PyTest to implement stringent testing mechanisms to ensure fault-tolerant applications Book Description Test-driven development (TDD) is a set of best practices that helps developers to build more scalable software, and is used to increase the robustness of software by using automatic tests. This book shows you how to apply TDD practices efficiently in Python projects. You'll begin by learning about built-in unit tests and Mocks before covering rich frameworks like PyTest and web-based libraries such as WebTest and Robot, and understand how Python allows you to embrace all modern testing practices with ease. Moving on, you'll find out how to design tests and balance them with new feature development and discover how to create a complete test suite with PyTest. The book helps you adopt a hands-on approach to implementing TDD and associated methodologies that will have you up and running and make you more productive in no time. With the help of step-by-step explanations of essential concepts and practical examples, you'll explore automatic tests and TDD best practices and get to grips with the methodologies and tools available in Python for creating effective and robust applications. By the end of this Python book, you will be able to write reliable test suites in Python to ensure the long-term resilience of your application while learning about the range of libraries offered by Python for testing and development. What you will learn * Find out how tests can make your life easier as a developer and discover related best practices * Explore and learn PyTest, the most widespread testing framework for Python * Get to grips with the most common PyTest plugins, including coverage, flaky, xdist, and picked * Write functional tests for WSGI web applications with WebTest * Run end-to-end tests for web applications using the Robot framework * Understand what test-driven development means and why it is important * Discover how to use the range of tools available in Python * Build reliable and robust applications Who This Book Is For This book is for Python developers looking to get started with test-driven development and developers who want to learn about the testing tools available in Python. Developers who want to create web applications with Python and plan to implement TDD methodology with PyTest will find this book useful. Basic knowledge of Python programming is required. Table of Contents Getting Started with Software Testing * Test Doubles with a Chat Application * Test Driven Development while creating a TODO list * Scaling the Test Suite * Introduction to PyTest * Dynamic and Parametric Tests and Fixtures * Fitness Function with a contact book application * PyTest Essential Plugins * Managing test environments with Tox * Testing Documentation and Property Based Testing * Testing for the Web: WSGI vs HTTP * End to end testing with Robot framework.
(source: Nielsen Book Data)
- MOLINA, ALESSANDRO.
- [S.l.] : PACKT PUBLISHING LIMITED, 2021.
- Description
- Book — 1 online resource
- Summary
-
This practical guide to test-driven development will help developers working with Python put their knowledge to work. You'll learn how to adopt an effective test-driven approach to Python software development with WebTest and web frameworks. The book is filled with hands-on examples to enable you to write reliable test suites to ensure your ...
- [First edition], video edition. - [Shelter Island, New York] : Manning Publications Co., [2021]
- Description
- Video — 1 online resource (1 video file (18 hr., 12 min.)) : sound, color. Sound: digital. Digital: video file.
- Summary
-
In Video Editions the narrator reads the book while the content, figures, code listings, diagrams, and text appear on the screen. Like an audiobook that you can also watch as a video. Valuable and accessible... a solid foundation for anyone aspiring to be a data scientist. Amaresh Rajasekharan, IBM Corporation Learn data science with Python by building five real-world projects! Experiment with card game predictions, tracking disease outbreaks, and more, as you build a flexible and intuitive understanding of data science. In Data Science Bookcamp you will find: Techniques for computing and plotting probabilities Statistical analysis using Scipy How to organize datasets with clustering algorithms How to visualize complex multi-variable datasets How to train a decision tree machine learning algorithm In Data Science Bookcamp you'll test and build your knowledge of Python with the kind of open-ended problems that professional data scientists work on every day. Downloadable data sets and thoroughly-explained solutions help you lock in what you've learned, building your confidence and making you ready for an exciting new data science career. about the technology A data science project has a lot of moving parts, and it takes practice and skill to get all the code, algorithms, datasets, formats, and visualizations working together harmoniously. This unique book guides you through five realistic projects, including tracking disease outbreaks from news headlines, analyzing social networks, and finding relevant patterns in ad click data. about the book Data Science Bookcamp doesn't stop with surface-level theory and toy examples. As you work through each project, you'll learn how to troubleshoot common problems like missing data, messy data, and algorithms that don't quite fit the model you're building. You'll appreciate the detailed setup instructions and the fully explained solutions that highlight common failure points. In the end, you'll be confident in your skills because you can see the results. about the audience For readers who know the basics of Python. No prior data science or machine learning skills required. about the author Leonard Apeltsin is the Head of Data Science at Anomaly, where his team applies advanced analytics to uncover healthcare fraud, waste, and abuse. Really good introduction of statistical data science concepts. A must-have for every beginner! Simone Sguazza, University of Applied Sciences and Arts of Southern Switzerland A full-fledged tutorial in data science including common Python libraries and language tricks! Jean-François Morin, Laval University This book is a complete package for understanding how the data science process works end to end.
8. Einfach Python [2021]
- Inden, Michael, author.
- 1st edition. - dpunkt, 2021.
- Description
- Book — 1 online resource (352 pages) Digital: text file.
- Summary
-
Die Leser:innen werden auf Ihrer Entdeckungsreise vom IT-Experten Michael Inden begleitet. Er erklärt ihnen die Grundlagen der Python-Programmierung leicht und verständlich.Die trockene Theorie wird auf ein Minimum reduziert und immer mit kleinen Beispielen demonstriert, die direkt ausprobiert werden können. Dieses Vorgehen eignet sich ideal, um im eigenen Tempo Python im Selbststudium zu erlernen.Das Buch besteht aus in sich abgeschlossenen Kapiteln zu den wichtigen Bereichen der Programmiersprache Python. Mit Aufgaben und Musterlösungen, sodass das zuvor Gelernte direkt anhand neuer Problemstellungen praktiziert werden kann.Zahlreiche kurze Codebeispiele verdeutlichen die Lerninhalte. Leser lernen, ihren Sourcecode sauber zu strukturieren und einen guten Stil zu verfolgen.
- Romano, Fabrizio.
- 3rd ed. - Birmingham : Packt Publishing, Limited, 2021.
- Description
- Book — 1 online resource (553 p.)
- Summary
-
- Table of Contents A Gentle Introduction to Python Built-In Data Types Conditionals and Iteration Functions, the Building Blocks of Code Comprehensions and Generators OOP, Decorators, and Iterators Exceptions and Context Managers Files and Data Persistence Cryptography and Tokens Testing Debugging and Profiling GUIs and Scripting Data Science in Brief Introduction to API Development Packaging Python Applications.
- (source: Nielsen Book Data)
(source: Nielsen Book Data)
- Olive, Xavier.
- [S.l.] : DUNOD, 2021.
- Description
- Book — 1 online resource
11. Python : an introduction to programming [2021]
- Parker, J. R. (Jim R.), 1955- author.
- Second edition. - Dulles, Virginia : Mercury Learning and Information, [2021]
- Description
- Book — 1 online resource (xx, 572 pages) : illustrations (some color)
- Summary
-
- Modern computers
- Computers and programming
- Repetition
- Sequences: strings, tuples, and lists
- Functions
- Files: input and output
- Classes
- Graphics
- Manipulating data
- Multimedia
- Basic algorithms
- Programming for the sciences
- How to write good programs
- Communicating with the outside world
- Parsing-the structure of data
- Communicating using graphics: Windows, user interfaces, and Pygame.
- Online
- Fraser, Simon, author.
- 2nd edition. - Packt Publishing, 2021.
- Description
- Book — 1 online resource (310 pages) Digital: text file.
- Summary
-
Use Python microservices to craft applications that are built as small standard units using proven best practices and avoiding common errors Key Features Become well versed with the fundamentals of building, designing, testing, and deploying Python microservices Identify where a monolithic application can be split, how to secure it, and how to scale it once ready for deployment Use the latest framework based on asynchronous programming to write effective microservices with Python Book Description The small scope and self-contained nature of microservices make them faster, cleaner, and more scalable than code-heavy monolithic applications. However, building microservices architecture that is efficient as well as lightweight into your applications can be challenging due to the complexity of all the interacting pieces. Python Microservices Development, Second Edition will teach you how to overcome these issues and craft applications that are built as small standard units using proven best practices and avoiding common pitfalls. Through hands-on examples, this book will help you to build efficient microservices using Quart, SQLAlchemy, and other modern Python tools In this updated edition, you will learn how to secure connections between services and how to script Nginx using Lua to build web application firewall features such as rate limiting. Python Microservices Development, Second Edition describes how to use containers and AWS to deploy your services. By the end of the book, you'll have created a complete Python application based on microservices. What you will learn Explore what microservices are and how to design them Configure and package your code according to modern best practices Identify a component of a larger service that can be turned into a microservice Handle more incoming requests, more effectively Protect your application with a proxy or firewall Use Kubernetes and containers to deploy a microservice Make changes to an API provided by a microservice safely and keep things working Identify the factors to look for to get started with an unfamiliar cloud provider Who this book is for This book is for developers who want to learn how to build, test, scale, and manage Python microservices. Readers will require basic knowledge of the Python programming language, the command line, and HTTP-based application principles. No prior experience of writing microservices in Python is assumed.
- Unpingco, José, 1969-
- Cham : Springer, 2021.
- Description
- Book — 1 online resource
- Summary
-
- Introduction.- Basic Language.- Basic Data Structures.- Basic Programming.- File Input/Output.- Dealing with Errors.- Power Python Features to Master.- Advanced Language Features.- Using modules.- Object oriented programming.- Debugging from Python.- Using Numpy - Numerical Arrays in Python.- Data Visualization Using Python.- Bokeh for Web-based Visualization.- Getting Started with Pandas.- Some Useful Python-Fu.- Conclusion.
- (source: Nielsen Book Data)
(source: Nielsen Book Data)
- Zinoviev, Dmitry, author.
- Raleigh : The Pragmatic Bookshelf, 2021.
- Description
- Book — 1 online resource (xiv, 129 pages)
- Summary
-
Make your good Python code even better by following proven and effective pythonic programming tips. Avoid logical errors that usually go undetected by Python linters and code formatters, such as frequent data look-ups in long lists, improper use of local and global variables, and mishandled user input. Discover rare language features, like rational numbers, set comprehensions, counters, and pickling, that may boost your productivity. Discover how to apply general programming patterns, including caching, in your Python code. Become a better-than-average Python programmer, and develop self-documented, maintainable, easy-to-understand programs that are fast to run and hard to break. Python is one of the most popular and rapidly growing modern programming languages. With more than 200 standard libraries and even more third-party libraries, it reaches into the software development areas as diverse as artificial intelligence, bioinformatics, natural language processing, and computer vision. Find out how to improve your understanding of the spirit of the language by using one hundred pythonic tips to make your code safer, faster, and better documented. This programming style manual is a quick reference of helpful hints and a random source of inspiration. Choose the suitable data structures for searching and sorting jobs and become aware of how a wrong choice may cause your application to be completely ineffective. Understand global and local variables, class and instance attributes, and information-hiding techniques. Create functions with flexible interfaces. Manage intermediate computation results by caching them in files and memory to improve performance and reliability. Polish your documentation skills to make your code easy for other programmers to understand. As a bonus, discover Easter eggs cleverly planted in the standard library by its developers. Polish, secure, and speed-up your Python applications, and make them easier to maintain by following pythonic programming tips. What You Need: You will need a Python interpreter (ideally, version 3.4 or above) and the standard Python library that usually comes with the interpreter.
(source: Nielsen Book Data)
- Schnellstart Python. English
- Schäfer, Christopher, author.
- Wiesbaden : Springer, [2021]
- Description
- Book — 1 online resource : illustrations
- Summary
-
- Installation of Python and basic structure of a Python program.- data types, variables, lists, strings, dictionaries, operators and functions.- structuring with conditional statements and modules.- extensions for natural scientists: NumPy, SciPy, Matplotlib, pandas.
- (source: Nielsen Book Data)
(source: Nielsen Book Data)
- Vaughan, Lee, author.
- San Francisco, CA : No Starch Press, Inc., [2021]
- Description
- Book — 1 online resource
- Summary
-
"A book of varied coding projects for readers who know a little Python already and want to expand their skills. Save shipwrecked sailors, discover exoplanets, and more, while gaining experience using free modules like OpenCV, NumPy, Pandas, NLTK, Bokeh, Beautiful Soup, and matplotlib"-- Provided by publisher.
17. Robust Python [2021]
- Viafore, Patrick.
- Sebastopol : O'Reilly Media, Incorporated, 2021.
- Description
- Book — 1 online resource (381 p.)
- Summary
-
- Intro
- Copyright
- Table of Contents
- Preface
- Who Should Read This Book
- About This Book
- Conventions Used in This Book
- Using Code Examples
- O'Reilly Online Learning
- How to Contact Us
- Acknowledgments
- Chapter 1. Introduction to Robust Python
- Robustness
- Why Does Robustness Matter?
- What's Your Intent?
- Asynchronous Communication
- Examples of Intent in Python
- Collections
- Iteration
- Law of Least Surprise
- Closing Thoughts
- Part I. Annotating Your Code with Types
- Chapter 2. Introduction to Python Types
- What's in a Type?
- Mechanical Representation
- Semantic Representation
- Typing Systems
- Strong Versus Weak
- Dynamic Versus Static
- Duck Typing
- Closing Thoughts
- Chapter 3. Type Annotations
- What Are Type Annotations?
- Benefits of Type Annotations
- Autocomplete
- Typecheckers
- Exercise: Spot the Bug
- When to Use Type Annotations
- Closing Thoughts
- Chapter 4. Constraining Types
- Optional Type
- Union Types
- Product and Sum Types
- Literal Types
- Annotated Types
- NewType
- Final Types
- Closing Thoughts
- Chapter 5. Collection Types
- Annotating Collections
- Homogeneous Versus Heterogeneous Collections
- TypedDict
- Creating New Collections
- Generics
- Modifying Existing Types
- As Easy as ABC
- Closing Thoughts
- Chapter 6. Customizing Your Typechecker
- Configuring Your Typechecker
- Configuring mypy
- Mypy Reporting
- Speeding Up mypy
- Alternative Typecheckers
- Pyre
- Pyright
- Closing Thoughts
- Chapter 7. Adopting Typechecking Practically
- Trade-offs
- Breaking Even Earlier
- Find Your Pain Points
- Target Code Strategically
- Lean on Your Tooling
- Closing Thoughts
- Part II. Defining Your Own Types
- Chapter 8. User-Defined Types: Enums
- User-Defined Types
- Enumerations
- Enum
- When Not to Use
- Advanced Usage
- Automatic Values
- Flags
- Integer Conversion
- Unique
- Closing Thoughts
- Chapter 9. User-Defined Types: Data Classes
- Data Classes in Action
- Usage
- String Conversion
- Equality
- Relational Comparison
- Immutability
- Comparison to Other Types
- Data Classes Versus Dictionaries
- Data Classes Versus TypedDict
- Data Classes Versus namedtuple
- Closing Thoughts
- Chapter 10. User-Defined Types: Classes
- Class Anatomy
- Constructors
- Invariants
- Avoiding Broken Invariants
- Why Are Invariants Beneficial?
- Communicating Invariants
- Consuming Your Class
- What About Maintainers?
- Encapsulation and Maintaining Invariants
- Encapsul-what, Now?
- Protecting Data Access
- Operations
- Closing Thoughts
- Chapter 11. Defining Your Interfaces
- Natural Interface Design
- Thinking Like a User
- Natural Interactions
- Natural Interfaces in Action
- Magic Methods
- Context Managers
- Closing Thoughts
- Chapter 12. Subtyping
- Inheritance
- Substitutability
- Design Considerations
- Composition
- Closing Thoughts
(source: Nielsen Book Data)
18. <>. [2021]
- 고성능 파이썬(2판)
- 오현석, author.
- 2nd edition. - Hanbit Media, Inc., 2021.
- Description
- Book — 1 online resource (528 pages) Digital: text file.
- Summary
-
파이썬 코드가 제대로 동작하더라도 더 빠르게 실행되도록 해야 할 때가 있다. 이 책은 파이썬 3에 맞춰 내용을 보강한 개정판으로, 처리할 데이터 용량이 큰 프로그램의 병목현상을 찾고, 이를 해결해 성능을 향상하는 방법을 알려준다. 프로그램 설계 시 여러 선택 사항의 기반이 되는 자세한 설명 덕분에 파이썬 구현을 더 깊이 이해할 수 있다. 멀티 코어 아키텍처나 클러스터를 어떻게 활용할 수 있을까신뢰성을 잃지 않으면서 규모를 쉽게 확장하고 축소할 수 있는 시스템을 어떻게 구축할 수 있을까경험이 많은 파이썬 프로그래머라면 이 책을 통해 다양한 문제에 대한 구체적인 해결 방법을 배울 수 있고 소셜 미디어 분석, 프로덕션 수준의 머신러닝 분야에서 여러 기업이 겪은 무용담도 엿볼 수 있다. 파이썬 코드가 제대로 동작하더라도 더 빠르게 실행되도록 해야 할 때가 있다. 이 책은 파이썬 3에 맞춰 내용을 보강한 개정판으로, 처리할 데이터 용량이 큰 프로그램의 병목현상을 찾고, 이를 해결해 성능을 향상하는 방법을 알려준다. 프로그램 설계 시 여러 선택 사항의 기반이 되는 자세한 설명 덕분에 파이썬 구현을 더 깊이 이해할 수 있다. 멀티 코어 아키텍처나 클러스터를 어떻게 활용할 수 있을까신뢰성을 잃지 않으면서 규모를 쉽게 확장하고 축소할 수 있는 시스템을 어떻게 구축할 수 있을까경험이 많은 파이썬 프로그래머라면 이 책을 통해 다양한 문제에 대한 구체적인 해결 방법을 배울 수 있고 소셜 미디어 분석, 프로덕션 수준의 머신러닝 분야에서 여러 기업이 겪은 무용담도 엿볼 수 있다.
19. Advanced Python development : using powerful language features in real-world applications [2020]
- Wilkes, Matthew, author.
- [Berkeley, CA] : Apress, [2020]
- Description
- Book — 1 online resource (xxii, 605 pages) : illustrations Digital: text file.PDF.
- Summary
-
- Chapter 1: Prototyping and Environments Chapter Goal: Create a prototype script to read a single sensor valueNo of pages 25Sub -Topics1 Introduce the example of collating data from a large number of othermachines1.1 Possible usecases of this pattern include log aggregation, servermonitoring, IoT, monitoring of customer servers, etc1.2 We'll use raspberry pis with a mix of server monitoring andvery basic sensors like temperature sensors. There'll be no IoTspecific setup or detail, it's just that this is easier for people tofollow along with without inventing another system beingmonitored.1.3 There'll be plenty of extra context here for how to apply theongoing example if you do already have a system that needsmonitoring.2 Prototyping using jupyter and nbconvert3 Use pipenv to set up dependency environment3.1 Note that by introducing pipenv before setuptools we'repreempting the confusion about the right way to do dependencyand environment management.
- Chapter 2: Testing, Checking and LintingChapter Goal: Progress the prototype to a series of reliable functions thatcan be testedNo of pages: 30Sub - Topics1 Testing with PyTest (especially fixtures and MUT style)2 Type hinting and checking with mypy3 Linting with flake8 and autoformatting with black4 pre-commit and commit hooks5 GitHub CI integration for easier contributions
- Chapter 3: Packaging ScriptsChapter Goal: Create an installable package that gives a single script toread the sensor valueNo of pages : 30Sub - Topics:1 setup.py and setuptools when it comes to packaging (not pip /setup.py for environment management, that's in chapter 1)2 Namespace packages3 Console entrypoint4 argparseHelpful aside: Package name conflicts, installing from GitHub releases, release hashing, wheels
- Chapter 4: From Script to LibraryChapter Goal: Extend the package to allow reading of multiple sensorsthrough the command lineNo of pages: 20Sub - Topics:1. Abstract Base Classes2. Second sensor value3. argparse subcommands
- Chapter 5: Alternative InterfacesChapter Goal: Make the script functionality available as a HTTPmicroserviceNo of pages : 40Sub - Topics:1 Simple API servers using flask2 Plugin architecture using entrypoints3 Dynamic dispatch4 Serialisation considerations with custom classes (like units from pintspackage)
- Chapter 6: Speeding Things UpChapter Goal: Discuss optimisation strategies, what the tradeoffs betweenasync and different types of caching are. We'll use cachinghere, but async laterNo of pages : 25Sub - Topics:1 asyncio vs lru_cache vs redis vs sqlite etc2 Use of timeit3 File operations using context managers
- Chapter 7: Aggregation ProcessChapter Goal: Create a new package, read configuration files, do a basicHTTP loopNo of pages : 25Sub - Topics:1 cookiecutter2 Config files (configparser vs json vs yaml)3 Requests library4 More depth in pytest usage
- Chapter 8: Asynchronous ProgrammingChapter Goal: Understand the event loop, especially async for loops, demonstrate how it's a good fit for the aggregation processNo of pages : 40Sub - Topics:1 Defining asynchronous functions2 Using the event loop3 Syntactic sugar for loops and iterators4 Async tasks vs await5 async executors
- Chapter 9: Asynchronous DatabasesChapter Goal: Understand async executors, using sqlalchemy and JSONBNo of pages : 30Sub - Topics:1 sqlalchemy (and why pandas isn't a good fit here)2 JSONB format and schemaless3 aiofile, asyncpg and usability/speed tradeoffs
- Chapter 10: Viewing the DataChapter Goal: Creating Jupyter notebooks and using matplotlibNo of pages : 35Sub - Topics:1 Calling async functions from Jupyter Notebooks2 Binding function calls to ipywidgets for interactive reports3 Examples of matplotlib4 GeoJSON
- Chapter 11: Fault ToleranceChapter Goal: Extending ABC interfaces and efficient use of iterables forlarge HTTP responsesNo of pages : 20Sub - Topics:1 Using __subclasshook__ effectively2 Chunked responses vs framing3 JSON deserialisation of partial data and efficient data transfer
- Chapter 12: Callbacks and Data AnalysisChapter Goal: Using generators, iterators and coroutines for dataanalysis, async timeoutsNo of pages : 30Sub - Topics:1 Iterator based filtering2 Coroutine based plugins, for example a coroutine that pulls historicaldata and compares it to the current value to decide if an alarm shouldbe raised3 waitfor and executor timeout considerations.
- (source: Nielsen Book Data)
(source: Nielsen Book Data)
- Gorelick, Micha, author.
- Second edition. - Beijing ; Boston : O'Reilly, 2020.
- Description
- Book — 1 online resource
- Summary
-
- Intro
- Copyright
- Table of Contents
- Foreword
- Preface
- Who This Book Is For
- Who This Book Is Not For
- What You'll Learn
- Python 3
- Changes from Python 2.7
- License
- How to Make an Attribution
- Errata and Feedback
- Conventions Used in This Book
- Using Code Examples
- O'Reilly Online Learning
- How to Contact Us
- Acknowledgments
- Chapter 1. Understanding Performant Python
- The Fundamental Computer System
- Computing Units
- Memory Units
- Communications Layers
- Putting the Fundamental Elements Together
- Idealized Computing Versus the Python Virtual Machine
- So Why Use Python?
- How to Be a Highly Performant Programmer
- Good Working Practices
- Some Thoughts on Good Notebook Practice
- Getting the Joy Back into Your Work
- Chapter 2. Profiling to Find Bottlenecks
- Profiling Efficiently
- Introducing the Julia Set
- Calculating the Full Julia Set
- Simple Approaches to Timing-print and a Decorator
- Simple Timing Using the Unix time Command
- Using the cProfile Module
- Visualizing cProfile Output with SnakeViz
- Using line_profiler for Line-by-Line Measurements
- Using memory_profiler to Diagnose Memory Usage
- Introspecting an Existing Process with PySpy
- Bytecode: Under the Hood
- Using the dis Module to Examine CPython Bytecode
- Different Approaches, Different Complexity
- Unit Testing During Optimization to Maintain Correctness
- No-op @profile Decorator
- Strategies to Profile Your Code Successfully
- Wrap-Up
- Chapter 3. Lists and Tuples
- A More Efficient Search
- Lists Versus Tuples
- Lists as Dynamic Arrays
- Tuples as Static Arrays
- Wrap-Up
- Chapter 4. Dictionaries and Sets
- How Do Dictionaries and Sets Work?
- Inserting and Retrieving
- Deletion
- Resizing
- Hash Functions and Entropy
- Dictionaries and Namespaces
- Wrap-Up
- Chapter 5. Iterators and Generators
- Iterators for Infinite Series
- Lazy Generator Evaluation
- Wrap-Up
- Chapter 6. Matrix and Vector Computation
- Introduction to the Problem
- Aren't Python Lists Good Enough?
- Problems with Allocating Too Much
- Memory Fragmentation
- Understanding perf
- Making Decisions with perf's Output
- Enter numpy
- Applying numpy to the Diffusion Problem
- Memory Allocations and In-Place Operations
- Selective Optimizations: Finding What Needs to Be Fixed
- numexpr: Making In-Place Operations Faster and Easier
- A Cautionary Tale: Verify "Optimizations" (scipy)
- Lessons from Matrix Optimizations
- Pandas
- Pandas's Internal Model
- Applying a Function to Many Rows of Data
- Building DataFrames and Series from Partial Results Rather than Concatenating
- There's More Than One (and Possibly a Faster) Way to Do a Job
- Advice for Effective Pandas Development
- Wrap-Up
- Chapter 7. Compiling to C
- What Sort of Speed Gains Are Possible?
- JIT Versus AOT Compilers
Articles+
Journal articles, e-books, & other e-resources
Guides
Course- and topic-based guides to collections, tools, and services.