Python Testing with pytest, 2nd EditionTest applications, packages, and libraries large and small with pytest, Python's most powerful testing framework. pytest helps you write tests quickly and keep them readable and maintainable. In this fully revised edition, explore pytest's superpowers - simple asserts, fixtures, parametrization, markers, and plugins - while creating simple tests and test suites against a small database application. Using a robust yet simple fixture model, it's just as easy to write small tests with pytest as it is to scale up to complex functional testing. This book shows you how.
pytest is undeniably the best choice for testing Python projects. It's a full-featured, flexible, and extensible testing framework. pytest's fixture model allows you to share test data and setup procedures across multiple layers of tests. The pytest framework gives you powerful features such as assert rewriting, parametrization, markers, plugins, parallel test execution, and clear test failure reporting - with no boilerpla ...
Critical Data LiteracyA short course for students to increase their proficiency in analyzing and interpreting data visualizations. By completing this short course students will be able to explain the importance of data literacy, identify data visualization issues in order to improve their own skills in data story-telling. The intended outcome of this course is to help students become more discerning and critical users of data, graphs, charts and infographics.
The need to understand data visualizations has never been more important. Every day we are inundated with more data, graphs and charts. Some of these data visualizations are well-designed and easy to understand, and others are confusing and misleading.
Data literacy is often framed as a set of skills for data professionals, but we believe data literacy is for everyone. Everyone can benefit from improving their understanding of how data is created and their ability to analyze and interpret data.
In this book, we will introduce the key stages in ...
Building an Effective Data Science PracticeGain a deep understanding of data science and the thought process needed to solve problems in that field using the required techniques, technologies and skills that go into forming an interdisciplinary team. This book will enable you to set up an effective team of engineers, data scientists, analysts, and other stakeholders that can collaborate effectively on crucial aspects such as problem formulation, execution of experiments, and model performance evaluation.
You'll start by delving into the fundamentals of data science - classes of data science problems, data science techniques and their applications - and gradually build up to building a professional reference operating model for a data science function in an organization. This operating model covers the roles and skills required in a team, the techniques and technologies they use, and the best practices typically followed in executing data science projects.
Building an Effective Data Science Practice provides a common base ...
Python for CybersecurityPython For Cybersecurity: Using Python for Cyber Offense and Defense delivers an intuitive and hands-on explanation of using Python for cybersecurity. It relies on the MITRE ATT&CK framework to structure its exploration of cyberattack techniques, attack defenses, and the key cybersecurity challenges facing network administrators and other stakeholders today.
Offering downloadable sample code, the book is written to help you discover how to use Python in a wide variety of cybersecurity situations, including: Reconnaissance, resource development, initial access, and execution; Persistence, privilege escalation, defense evasion, and credential access; Discovery, lateral movement, collection, and command and control; Exfiltration and impact.
Each chapter includes discussions of several techniques and sub-techniques that could be used to achieve an attacker's objectives in any of these use cases. The ideal resource for anyone with a professional or personal interest in cybersecurity, ...
Mastering Python, 2nd EditionEven if you find writing Python code easy, writing code that is efficient, maintainable, and reusable is not so straightforward. Many of Python's capabilities are underutilized even by more experienced programmers. Mastering Python, Second Edition, is an authoritative guide to understanding advanced Python programming so you can write the highest quality code. This new edition has been extensively revised and updated with exercises, four new chapters and updates up to Python 3.10.
Revisit important basics, including Pythonic style and syntax and functional programming. Avoid common mistakes made by programmers of all experience levels. Make smart decisions about the best testing and debugging tools to use, optimize your code's performance across multiple machines and Python versions, and deploy often-forgotten Python features to your advantage. Get fully up to speed with asyncio and stretch the language even further by accessing C functions with simple Python calls. Finally, turn yo ...
Python for MATLAB DevelopmentPython for MATLAB Development shows you how to enhance MATLAB with Python solutions to a vast array of computational problems in science, engineering, artificial intelligence, statistics, finance, and simulation. It is three books in one: A thorough Python tutorial that leverages your existing MATLAB knowledge with a comprehensive collection of MATLAB/Python equivalent expressions; A reference guide to setting up and managing a Python environment that integrates cleanly with MATLAB; A collection of recipes that demonstrate Python solutions invoked directly from MATLAB .
The demonstrated techniques and explanations will help you solve your own challenging problems in MATLAB using open source Python modules. Python is the ultimate MATLAB Toolbox and this book is your guide to its use. ...
Python Unit Test Automation, 2nd EditionLearn how to automate unit tests of Python 3 with automation libraries, such as doctest, unittest, nose, nose2, pytest, and selenium. This book explores important concepts in software test automation and demonstrates how to automate, organize, and execute unit tests with Python. It also introduces readers to the concepts of web browser automation and logging.
This new edition starts with an introduction to Python 3. Next, it covers doctest and pydoc. This is followed by a discussion on unittest, a framework that comes packaged with Python 3 itself. There is a dedicated section on creating test suites, followed by an explanation of how nose2 provides automatic test module discovery. Moving forward, you will learn about pytest, the most popular third-party library and testrunner for Python. You will see how to write and execute tests with pytest. You'll also learn to discover tests automatically with pytest.
This edition features two brand new chapters, the first of which focuses o ...
Adaptive Machine Learning Algorithms with PythonLearn to use adaptive algorithms to solve real-world streaming data problems. This book covers a multitude of data processing challenges, ranging from the simple to the complex. At each step, you will gain insight into real-world use cases, find solutions, explore code used to solve these problems, and create new algorithms for your own use.
Authors Chanchal Chatterjee and Vwani P. Roychowdhury begin by introducing a common framework for creating adaptive algorithms, and demonstrating how to use it to address various streaming data issues. Examples range from using matrix functions to solve machine learning and data analysis problems to more critical edge computation problems. They handle time-varying, non-stationary data with minimal compute, memory, latency, and bandwidth.
Upon finishing this book, you will have a solid understanding of how to solve adaptive machine learning and data analytics problems and be able to derive new algorithms for your own use cases. You will also c ...
Python ChallengesAugment your knowledge of Python with this entertaining learning guide, which features 100 exercises and programming puzzles and solutions. Python Challenges will help prepare you for your next exam or a job interview, and covers numerous practical topics such as strings, data structures, recursion, arrays, and more.
Each topic is addressed in its own separate chapter, starting with an introduction to the basics and followed by 10 to 15 exercises of various degrees of difficulty, helping you to improve your programming skills effectively. Detailed sample solutions, including the algorithms used for all tasks, are included to maximize your understanding of each area. Author Michael Inden also describes alternative solutions and analyzes possible pitfalls and typical errors.
Three appendices round out the book: the first covers the Python command line interpreter, which is often helpful for trying out the code snippets and examples in the book, followed by an overview of Pytest for ...
Fluent Python, 2nd EditionPython's simplicity lets you become productive quickly, but often this means you aren't using everything it has to offer. With the updated edition of this hands-on guide, you'll learn how to write effective, modern Python 3 code by leveraging its best ideas.
Don't waste time bending Python to fit patterns you learned in other languages. Discover and apply idiomatic Python 3 features beyond your past experience. Author Luciano Ramalho guides you through Python's core language features and libraries and teaches you how to make your code shorter, faster, and more readable.
Featuring major updates throughout the book, Fluent Python, second edition, covers:
Special methods: The key to the consistent behavior of Python objects;
Data structures: Sequences, dicts, sets, Unicode, and data classes;
Functions as objects: First-class functions, related design patterns, and type hints in function declarations;
Object-oriented idioms: Composition, inheritance, mixins, interfaces, operator ...