Python News: What’s New From January 2023

The new year has arrived, and January brought a flurry of new and interesting Python enhancement proposals (PEPs). Topics range from f-string formalization and no-GIL Python to packaging. There’s been ample discussion on the Python Discourse forum about the implications of these PEPs, and if you’re still a bit wary of diving deeper into the discussions, then you can get a softer introduction here. There have also been a couple of noteworthy new releases, first and foremost the fourth alpha […]

Read more

How to Split a Python List or Iterable Into Chunks

Splitting a Python list into chunks is a common way of distributing the workload across multiple workers that can process them in parallel for faster results. Working with smaller pieces of data at a time may be the only way to fit a large dataset into computer memory. Sometimes, the very nature of the problem requires you to split the list into chunks. In this tutorial, you’ll explore the range of options for splitting a Python list—or another iterable—into chunks. […]

Read more

Otázky a odpovědi o ChatGPT a velkých jazykových modelech

Poslední dobou se v médiích poměrně často píše o ChatGPT a jazykových modelech a mám pocit, že ne úplně všechno se říká úplně správně. Proto jsem připravil několik otázek a odpovědí, které snad pomůžou vyjasnit, o čem se to vlastně mluví. Otázky: Co je to (velký) jazykový model? Co je to ChatGPT? Je GPT-3.5 a ChatGPT to nejlepší, co existuje? Jsou nějaké dostupné alternativy, ideálně open source? Jaktože umí ChatGPT česky, používá strojový překlad? Kde se berou znalosti, které má ChatGPT? […]

Read more

Python Basics: Building Systems With Classes

In the previous course in the Python Basics series, you learned how to use classes to create new objects. Now that you understand the basics of object-oriented programming (OOP), it’s time to put those classes to work. In this video course, you’ll learn how to: Compose classes together to create layers of functionality Inherit and override behavior from other classes to create variations Creatively mix and match these approaches With these capabilities, you’ll be able to build more complex systems […]

Read more

Highlights from Machine Translation and Multilinguality in December 2022 and January 2023

Here is what I found interesting on arXiv in December 2022 and January 2023. At the beginning of January, there a relatively few new pre-prints in general. But now it is catching momentum again, with more papers appearing every day. BLOOM+1: Adding Language Support to BLOOM for Zero-Shot Prompting In this paper, folks from the Big Science Workshop elaborate on how to add language support to the already trained BLOOM model. They tried two approaches: MAD-X (clever stuff with adapters, […]

Read more

Build a Wordle Clone With Python and Rich

In this tutorial, you’ll build your own Wordle clone for the terminal. Since Josh Wardle launched Wordle in October 2021, millions of people have played it. While you can play the original game on the Web, you’ll create your version as a command-line application and then use the Rich library to make it look good. As you follow along in this step-by-step project, you’ll practice how to set up a simple prototype game before iteratively developing it into a solid […]

Read more

The problem with float32: you only get 16 million values

Libraries like NumPy and Pandas let you switch data types, which allows you to reduce memory usage. Switching from numpy.float64 (“double-precision” or 64-bit floats) to numpy.float32 (“single-precision” or 32-bit floats) cuts memory usage in half. But it does so at a cost: float32 can only store a much smaller range of numbers, with less precision. So if you want to save memory, how do you use float32 without distorting your results? Let’s find out! In particular, we will: Explore the […]

Read more

Don’t bother trying to estimate Pandas memory usage

You have a file with data you want to process with Pandas, and you want to make sure you won’t run out of memory. How do you estimate memory usage given the file size? At times you may see estimates like these: “Have 5 to 10 times as much RAM as the size of your dataset”, or “several times the size of your dataset”, or 2×-3× the size of the dataset. All of these estimates can both under- and over-estimate […]

Read more

Build a JavaScript Front End for a Flask API

Most modern web applications are powered by a REST API under the hood. That way, developers can separate JavaScript front-end code from the back-end logic that a web framework like Flask provides. Following this step-by-step project, you’ll create an interactive single-page application with HTML, CSS, and JavaScript. The foundation is an existing Flask project with a REST API and a connected SQLite database, which you’ll grab in just a moment. In this tutorial, you’ll learn how to: Navigate a full-stack […]

Read more

Using the Terminal on Linux

The terminal can be intimidating to work with when you’re used to working with graphical user interfaces. However, it’s an important tool that you need to get used to in your journey as a Python developer. Even though you can substitute some workflows in the terminal with apps that contain a graphical user interface (GUI), you may need to open the terminal at some point in your life as a Python developer. In this Code Conversation, you’ll follow a chat […]

Read more
1 105 106 107 108 109 913