What’s Lazy Evaluation in Python?

Interactive Quiz ⋅ 7 QuestionsBy Bartosz Zaczyński Lazy evaluation is a programming concept where the evaluation of an expression is deferred until its value is actually needed. This can lead to performance enhancements by avoiding unnecessary calculations, and it can also allow for the creation of potentially infinite data structures. As you embark on this quiz, you’ll test your knowledge of lazy evaluation in Python and learn how to apply this concept to write cleaner and more efficient code. The […]

Read more

Python Sequences: A Comprehensive Guide

Interactive Quiz ⋅ 12 QuestionsBy Martin Breuss In this quiz, you’ll test your understanding of Python sequences. By working through this quiz, you’ll revisit the basic characteristics of a sequence, operations common to most sequences, special methods associated with sequences, and how to create user-defined mutable and immutable sequences. The quiz contains 12 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 score. The […]

Read more

Python Basics Exercises: Scopes

On your Python journey, you’ve worked with functions and loops. To fully understand functions and loops in Python, you need to be familiar with the issue of scope. In this Python Basics Exercises video course, you’ll practice: Identifying the scope of objects Working with the global keyword Exploring the LEGB rule for scope resolution Using the return statement in a function Scope can be one of the more difficult programming concepts to understand, so in this video course, you’ll get […]

Read more

Write Unit Tests for Your Python Code With ChatGPT

Having a good battery of tests for your code may be a requirement for many Python projects. In practice, writing unit tests is hard and can take a lot of time and effort. Therefore, some developers don’t like to write them. However, with large language models (LLMs) and tools like ChatGPT, you can quickly create robust and complete sets of tests for your Python code. In Python, you can use multiple different tools for writing tests. The most commonly used […]

Read more

Using LoRA in Stable Diffusion

The deep learning model of Stable Diffusion is huge. The weight file is multiple GB large. Retraining the model means to update a lot of weights and that is a lot of work. Sometimes we must modify the Stable Diffusion model, for example, to define a new interpretation of prompts or make the model to generate a different style of painting by default. Indeed there are ways to make such an extension to existing model without modifying the existing model […]

Read more

Generate Realistic Faces in Stable Diffusion

Stable Diffusion’s latest models are very good at generating hyper-realistic images, but they can struggle with accurately generating human faces. We can experiment with prompts, but to get seamless, photorealistic results for faces, we may need to try new methodologies and models.In this post, we will explore various techniques and models for generating highly realistic human faces with Stable Diffusion. Specifically, we will learn how to: Generate realistic images using WebUI and advanced settings. Use Stable Diffusion XL for photorealistic […]

Read more

Python’s unittest: Writing Unit Tests for Your Code

Interactive Quiz ⋅ 12 QuestionsBy Leodanis Pozo Ramos In this quiz, you’ll test your understanding of testing your Python code with the unittest framework. 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 create simple tests for your application in a few easy steps and then build on them from there. With this quiz, you can check your understanding of testing with Python’s unittest framework. […]

Read more

Managing Multiple Python Versions With pyenv

Interactive Quiz ⋅ 9 QuestionsBy Martin Breuss In this quiz, you’ll test your understanding of how to use pyenv to manage multiple versions of Python. You’ll revisit how to install multiple versions of Python and switch between the installed versions. 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 quiz, you’ll receive a total score. The maximum score is 100%. Good luck! « Browse All […]

Read more

Practical Prompt Engineering

Interactive Quiz ⋅ 13 QuestionsBy Martin Breuss In this quiz, you’ll test your understanding of Practical Prompt Engineering for large language models (LLMs). By working through this quiz, you’ll revisit how to work with OpenAI’s GPT-3.5 and GPT-4 models through their API, apply prompt engineering techniques to a practical, real-world example, and use strategies like numbered steps, delimiters, few-shot prompting, chain-of-thought prompting, and roles in messages to improve your results. The quiz contains 13 questions and there is no time […]

Read more

Supercharge Your Classes With Python super()

Interactive Quiz ⋅ 5 QuestionsBy Martin Breuss In this quiz, you’ll test your understanding of inheritance and the super() function in Python. By working through this quiz, you’ll revisit the concept of inheritance, multiple inheritance, and how the super() function works in both single and multiple inheritance scenarios. The quiz contains 5 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 score. The maximum […]

Read more
1 2 3 859