Exploring Python Closures: Examples and Use Cases

In Python, a closure is typically a function defined inside another function. This inner function grabs the objects defined in its enclosing scope and associates them with the inner function object itself. The resulting combination is called a closure. Closures are a common feature in functional programming languages. In Python, closures can be pretty useful because they allow you to create function-based decorators, which are powerful tools. In this video course, you’ll: Learn what closures are and how they work […]

Read more

What Does isinstance() Do in Python?

Python’s isinstance() function helps you determine if an object is an instance of a specified class or its superclass, aiding in writing cleaner and more robust code. You use it to confirm that function parameters are of the expected types, allowing you to handle type-related issues preemptively. This tutorial explores how isinstance() works, its use with subclasses, and how it differs from type(). By the end of this tutorial, you’ll understand that: isinstance() checks if an object is a member […]

Read more

AI Testing and Evaluation: Reflections

AMANDA CRAIG DECKARD: Thank you so much. SULLIVAN: In our intro episode, you really helped set the stage for this series. And it’s been great, because since then, we’ve had the pleasure of speaking with governance experts about genome editing, pharma, medical devices, cybersecurity, and we’ve also gotten to spend some time with our own Microsoft responsible AI leaders and hear reflections from them. And here’s what stuck with me, and I’d love to hear from you on this, as […]

Read more

Python Scope and the LEGB Rule: Resolving Names in Your Code

The scope of a variable in Python determines where in your code that variable is visible and accessible. Python has four general scope levels: local, enclosing, global, and built-in. When searching for a name, Python goes through these scopes in order. It follows the LEGB rule, which stands for Local, Enclosing, Global, and Built-in. Understanding how Python manages the scope of variables and names is a fundamental skill for you as a Python developer. It helps you avoid unexpected behavior […]

Read more

Getting Started With marimo Notebooks

marimo notebooks redefine the notebook experience by offering a reactive environment that addresses the limitations of traditional linear notebooks. With marimo, you can seamlessly reproduce and share content while benefiting from automatic cell updates and a correct execution order. Discover how marimo’s features make it an ideal tool for documenting research and learning activities. By the end of this video course, you’ll understand that: marimo notebooks automatically update dependent cells, ensuring consistent results across your work. Reactivity allows marimo to […]

Read more

Quiz: How to Debug Common Python Errors

Interactive Quiz ⋅ 7 QuestionsBy Geir Arne Hjelle Share In this quiz, you’ll test your understanding of How to Debug Common Python Errors. Debugging means identifying, analyzing, and resolving issues in your Python code. You’ll revisit reading tracebacks, using print() for value tracking, setting breakpoints to pause execution, and writing tests to catch errors. Good luck! The quiz contains 7 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 Debug Common Python Errors

Python debugging involves identifying and fixing errors in your code using tools like tracebacks, print() calls, breakpoints, and tests. In this tutorial, you’ll learn how to interpret error messages, use print() to track variable values, and set breakpoints to pause execution and inspect your code’s behavior. You’ll also explore how writing tests can help prevent errors and ensure your code runs as expected. By the end of this tutorial, you’ll understand that: Debugging means identifying, analyzing, and resolving issues in […]

Read more

AI Testing and Evaluation: Learnings from cybersecurity

CIARAN MARTIN: Well, thanks so much for inviting me. It’s great to be here. SULLIVAN: Ciaran, before we get into some regulatory specifics, it’d be great to hear a little bit more about your origin story, and just take us to that day—who tapped you on the shoulder and said, “Ciaran, we need you to run a national cyber center! Do you fancy building one?” MARTIN: You could argue that I owe my job to Edward Snowden. Not an obvious […]

Read more

How AI will accelerate biomedical research and discovery

Daphne Koller is the CEO and founder of Insitro, a machine learning-driven drug discovery and development company that recently made news for its identification of a novel drug target for ALS and its collaboration with Eli Lilly to license Lilly’s biochemical delivery systems. Prior to founding Insitro, Daphne was the co-founder, co-CEO, and president of the online education platform Coursera. Noubar Afeyan is the founder and CEO of Flagship Pioneering, which creates biotechnology companies focused on transforming human health and […]

Read more
1 10 11 12 13 14 985