Python’s del: Remove References From Scopes and Containers

Python’s del statement will allow you to remove names and references from different namespaces. It’ll also allow you to delete unneeded items from your lists and keys from your dictionaries. If you want to learn how to use del in your Python code, then this tutorial is for you. The del statement empowers you to better manage memory resources in your code, making your programs more efficient. To get the most out of this tutorial, you should be familiar with […]

Read more

Staying secure by breaking Docker caching

When building Docker images, caching lets you speed up rebuilding images. But this has a downside: it can keep you from installing security updates from your base Linux distribution. If you cache the image layer that includes the security update… you’re not getting new security updates! There are a number of ways you can try to balance caching with getting security updates, with different tradeoffs. In this article we’ll cover: Caching by default, with recurring rebuild and redeploys. Deliberately breaking […]

Read more

Exploring the Ethical Implications of AI: A Closer Look at the Challenges Ahead

AI ethics is about releasing and implementing AI responsibly, paying attention to several considerations, from data etiquette to tool development risks, as discussed in a previous article. In this article, we’ll explore some of the ethical issues that arise with AI systems, particularly machine learning systems, when we overlook the ethical considerations of AI, often unintentionally. The 5 Common AI Ethical Issues 1. Bias propagation Although there’s a strong belief that algorithms are less biased than humans, AI systems are […]

Read more

Build a Maze Solver in Python Using Graphs

If you’re up for a little challenge and would like to take your programming skills to the next level, then you’ve come to the right place! In this hands-on tutorial, you’ll practice object-oriented programming, among several other good practices, while building a cool maze solver project in Python. From reading a maze from a binary file, to visualizing it using scalable vector graphics (SVG), to finding the shortest path from the entrance to the exit, you’ll go step by step […]

Read more

YAML: Python’s Missing Battery

Python is often marketed as a batteries-included language because it comes with almost everything you’d ever expect from a programming language. This statement is mostly true, as the standard library and the external modules cover a broad spectrum of programming needs. However, Python lacks built-in support for the YAML data format, commonly used for configuration and serialization. In this video course, you’ll learn how to work with YAML in Python using the available third-party libraries, with a focus on PyYAML. […]

Read more

How to Read Python Input as Integers

If you’ve ever coded an interactive text-based application in Python, then you’ve probably found that you need a reliable way of asking the user for integers as input. It’s not enough simply to display a prompt and then gather keystrokes. You must check that the user’s input really represents an integer. If it doesn’t, then your code must react appropriately—typically by repeating the prompt. In this tutorial, you’ll learn how to create a reusable utility function that’ll guarantee valid integer […]

Read more
1 116 117 118 119 120 928