Python tutorials

Timesliced reservoir sampling: a new(?) algorithm for profilers

Imagine you are processing a stream of events, of unknown length. It could end in 3 seconds, it could run for 3 months; you simply don’t know. As a result, storing the whole stream in memory or even on disk is not acceptable, but you still need to extract relevant information. Depending on what information you need, choosing a random sample of the stream will give you almost as good information as storing all the data. For example, consider a […]

Read more

Quiz: Exploring Keywords in Python

Interactive Quiz ⋅ 6 QuestionsBy Joseph Peart Share In this quiz, you’ll test your understanding of Exploring Keywords in Python. By working through this quiz, you’ll revisit how to identify Python keywords, understand the difference between regular and soft keywords, categorize keywords by purpose, and avoid common pitfalls with deprecated keywords. The quiz contains 6 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total […]

Read more

Quiz: Test-Driven Development With pytest

Interactive Quiz ⋅ 8 QuestionsBy Joseph Peart Share In this quiz, you’ll test your understanding of Test-Driven Development With pytest. By working through this quiz, you’ll revisit creating and executing Python unit tests with pytest, practicing test-driven development, finding bugs before users, and checking code coverage. Use this quiz to confirm what you learned and spot gaps to review. Return to the video course for hands-on examples and guidance. The quiz contains 8 questions and there is no time limit. […]

Read more

Adding Python to PATH

You may need to add Python to PATH if you’ve installed Python, but typing python on the command line doesn’t seem to work. You might see a message saying that python isn’t recognized, or you might end up running the wrong version of Python. A common fix for these problems is adding Python to the PATH environment variable. In this video course, you’ll learn how to add Python to PATH. You’ll also learn what PATH is and why it’s essential […]

Read more

Quiz: Using Jupyter Notebooks

Interactive Quiz ⋅ 9 QuestionsBy Joseph Peart Share In this quiz, you’ll test your understanding of Using Jupyter Notebooks. By working through this quiz, you’ll review Jupyter Notebook basics: running code cells, switching modes, using shortcuts, formatting Markdown, managing the server, and exporting notebooks. Use it to check your workflow knowledge and spot areas to review. The quiz contains 9 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the […]

Read more

How to Use Ollama to Run Large Language Models Locally

Running Ollama in your terminal allows you to start chatting with a local large language model (LLM) quickly. You won’t need API keys, cloud services, or ongoing costs. Ollama is a free, open-source tool that lets you download and run models directly on your machine. By following this guide, you’ll install Ollama, chat with local models from your terminal, and use them to power agentic coding tools: Example of Using Ollama to Run an LLM Locally Large language models traditionally […]

Read more

Quiz: Interacting With REST APIs and Python

Interactive Quiz ⋅ 10 QuestionsBy Joseph Peart Share In this quiz, you’ll test your understanding of Interacting with REST APIs in Python. This quiz reviews REST principles, HTTP methods, status codes, and Python tools like requests, Flask, FastAPI, and Django REST Framework. Test your understanding of consuming and designing REST APIs, Pydantic validation, and endpoint design. For more practice, revisit the course page for guided lessons and examples. The quiz contains 10 questions and there is no time limit. You’ll […]

Read more

Quiz: Getting Started With Django: Building a Portfolio App

Interactive Quiz ⋅ 11 QuestionsBy Joseph Peart Share In this quiz, you’ll test your understanding of Getting Started With Django: Building a Portfolio App. By working through this quiz, you’ll review core Django concepts like projects, apps, URL routing, views, templates, models, and migrations. You’ll reinforce how Django’s framework pieces fit together to handle requests and interact with the database. This quiz helps solidify the foundations needed to build and structure real-world Django applications. The quiz contains 11 questions and […]

Read more

Quiz: Using Data Classes in Python

Interactive Quiz ⋅ 9 QuestionsBy Joseph Peart Share Revisit how Python data classes work with Python Data Classes. You’ll review how to define data classes, add default values to fields, customize ordering and comparisons, and work with immutable data classes. This quiz is based on the video course and reinforces the practical syntax and patterns you need to create concise classes and reduce boilerplate. The quiz contains 9 questions and there is no time limit. You’ll get 1 point for […]

Read more

How to Use Git: A Beginner’s Guide

This tutorial shows you how to use Git to track changes in a project using just a few core commands and save clean snapshots of your work. If you’ve ever changed a file, broken something, and wished you could undo it, version control makes that possible. Git keeps a running history of your files so you can see what changed and when. In this guide, you’ll set up Git locally and use the core workflow from the terminal to track […]

Read more
1 2 3 4 216