Python tutorials

Simulate a Text File in Python

Testing applications that read files from a disk can be challenging. Issues such as machine dependencies, special access requirements, and slow performance often arise when you need to read text from a file. In this Code Conversation with instructor Martin Breuss, you’ll discover how to simplify this process by simulating text files with StringIO from the io module in Python’s standard library. In this video course, you’ll learn how to: Use io.StringIO to simulate a text file on disk Perform […]

Read more

Quiz: Python’s Built-in Exceptions: A Walkthrough With Examples

Interactive Quiz ⋅ 19 QuestionsBy Leodanis Pozo Ramos Share Or copy the link: Copied! Happy Pythoning! In this quiz, you’ll test your understanding of the most commonly used built-in exceptions in Python. Exception handling is a core topic in Python. Knowing how to use some of the most common built-in exceptions can help you to debug your code and handle your own exceptions. Good luck! The quiz contains 19 questions    

Read more

How to Write an Installable Django App

In the Django framework, a project refers to the collection of configuration files and code for a particular website. Django groups business logic into what it calls apps, which are the modules of the Django framework. There’s plenty of documentation on how to structure your projects and the apps within them, but when it comes time to package an installable Django app, information is harder to find. In this tutorial, you’ll learn how to take an app out of a […]

Read more

Quiz: Python Basics: Lists and Tuples

Interactive Quiz ⋅ 6 QuestionsBy Martin Breuss Share Or copy the link: Copied! Happy Pythoning! In Python Basics: Lists and Tuples, you’ve met two new and important data structures: Both of these data types are sequences, meaning they are objects that contain other objects in a certain order. They each have some important distinguishing properties and come with their own set of methods for interacting with objects of each type. In this quiz, youll    

Read more

Quiz: Getting Started With Testing in Python

Interactive Quiz ⋅ 19 QuestionsBy Martin Breuss Share Or copy the link: Copied! Happy Pythoning! In this quiz, you’ll test your understanding of testing your Python code. Testing in Python is a huge topic and can come with a lot of complexity, but it doesn’t need to be hard. You can get started creating simple tests for your application in a few easy steps and then build on it from there. With this quiz, you    

Read more

Quiz: Python Protocols: Leveraging Structural Subtyping

Interactive Quiz ⋅ 11 QuestionsBy Leodanis Pozo Ramos Share Or copy the link: Copied! Happy Pythoning! Test your understanding of how to create and use Python protocols while providing type hints for your functions, variables, classes, and methods. Take this quiz after reading our Python Protocols: Leveraging Structural Subtyping tutorial. The quiz contains 11 questions and there is no time limit. You’ll get 1 point for each correct answer. At    

Read more

Quiz: Logging in Python

Interactive Quiz ⋅ 9 QuestionsBy Philipp Acsany Share Or copy the link: Copied! Happy Pythoning! In this quiz, you’ll test your understanding of Python’s logging module. Logging is a very useful tool in a programmer’s toolbox. It can help you develop a better understanding of the flow of a program and discover scenarios that you might not have thought of while developing. Logs provide developers with an extra set of eyes that are constantly looking    

Read more

Quiz: Hugging Face Transformers

Interactive Quiz ⋅ 6 QuestionsBy Bartosz Zaczyński Share Or copy the link: Copied! Happy Pythoning! In this quiz, you’ll test your understanding of Hugging Face Transformers. This library is a popular choice for working with transformer models in natural language processing tasks, computer vision, and other machine learning applications. The quiz contains 6 questions and there is no time limit. You’ll get 1 point for each correct answer. At the    

Read more

Hugging Face Transformers: Leverage Open-Source AI in Python

Transformers is a powerful Python library created by Hugging Face that allows you to download, manipulate, and run thousands of pretrained, open-source AI models. These models cover multiple tasks across modalities like natural language processing, computer vision, audio, and multimodal learning. Using pretrained open-source models can reduce costs, save the time needed to train models from scratch, and give you more control over the models you deploy. Throughout this tutorial, you’ll gain a conceptual understanding of Hugging Face’s AI offerings and learn how to […]

Read more

pandas GroupBy: Grouping Real World Data in Python

Whether you’ve just started working with pandas and want to master one of its core capabilities, or you’re looking to fill in some gaps in your understanding about .groupby(), this course will help you to break down and visualize a pandas GroupBy operation from start to finish. This course is meant to complement the official pandas documentation and the pandas Cookbook, where there are self-contained, bite-sized examples. Here, however, you’ll focus on three more involved walkthroughs that use real-world datasets. […]

Read more
1 9 10 11 12 13 182