Getting the Most Out of the Python Standard REPL

The Python standard shell, or REPL (Read-Eval-Print Loop), allows you to run Python code interactively while working on a project or learning the language. This tool is available in every Python installation, so you can use it at any moment. As a Python developer, you’ll spend a considerable part of your coding time in a REPL session because this tool allows you to test new ideas, explore and experiment with new tools and libraries, refactor and debug your code, and […]

Read more

Build Robust Continuous Integration With Docker and Friends

Continuous integration (CI) has become essential to software development, allowing teams to merge code changes frequently and catch errors early. Docker containers help facilitate the continuous integration process by providing a consistent environment where you can test and ship code on each commit. In this tutorial, you’ll learn how to use Docker to create a robust continuous integration pipeline for a Flask web application. You’ll go through the steps of developing and testing the application locally, containerizing it, orchestrating containers […]

Read more

“Externally managed environments”: when PEP 668 breaks pip

You’re on a new version of Linux, you try a pip install, and it errors out, talking about “externally managed environments” and “PEP 668”. What’s going on? How do you solve this? Let’s see: What the problem looks like, and what causes it. The places you are likely to encounter it. A variety of solutions, depending on your use case. Symptoms: failed installs Consider the following Dockerfile, using a pre-release of Debian “Bookworm” 12, which will be released in June […]

Read more

Highlights from Machine Translation and Multilinguality in April 2023

Here is my monthly summray of what new papers and preprints are liked the most during the previous month. Several institutions in China did a thorough evaluation of how large language models work for machine translation One might think yet another paper like this, but this one is much better than what Tencent did with ChatGPT and just a few tests sentences. This paper uses the Flores 101 test set, a pretty standard large test for 101 languages. Everything is […]

Read more

Efficient String Concatenation in Python

String concatenation is a common operation in programming. It involves joining two or more strings to create a single new string. You’ll find several tools and techniques for concatenating strings in Python, each with its own pros and cons. In this tutorial, you’ll go through the most common tools and techniques for concatenating strings. You’ll also code examples for each of them, which will help you choose the best option for your specific problems. In this tutorial, you’ll: Understand what […]

Read more

Goodbye to Flake8 and PyLint: faster linting with Ruff

Flake8 and PyLint are commonly used, and very useful, linting tools: they can help you find potential bugs and other problems with your code, aka “lints”. But they can also be slow. And even if they’re fast on your computer, they may still be slow in your CI system (GitHub Actions, GitLab, or whatever else.) Happily, there’s a new linter available, Ruff, which is much faster. And it supports many of the same lints, including those from many of Flake8’s […]

Read more

Publishing Python Packages to PyPI

PyPI is the public hosting service where open-source Python packages live. When you pip install a package, that’s where it fetches it from. In this course, you’ll learn all about the structures of a package and how to upload your own to the PyPI server. In this video course, you’ll learn about: Why packages and virtual environments exist How to structure a package How to use build systems The contents of the pyproject.toml file How to use the build and […]

Read more
1 111 112 113 114 115 927