Boost Your Coding Productivity With Ptpython

Ptpython is a feature-rich and user-friendly Python REPL (Read-Eval-Print Loop) that takes your interactive Python coding experience to a whole new level. Unlike the standard Python REPL, ptpython offers a host of powerful features designed to boost productivity and streamline the development process. Its intuitive interface, syntax highlighting, and robust auto-completion capabilities make writing and exploring Python code a breeze. The interactive shell also provides the built-in ability to inspect Python objects, so you can quickly look up function references […]

Read more

Python Basics Exercises: Building Systems With Classes

In Python Basics: Building Systems With Classes, you moved beyond the basics of object-oriented programming (OOP), and started to put those classes to work. In this exercise course you will employ these capabilities to build more complex systems and write readable, reusable code. In this video course, you’ll practice the following: Compose classes together to create layers of functionality Inherit and override behavior from other classes to create variations Creatively mix and match these approaches Instantiate classes with attributes and […]

Read more

How to Run Your Python Scripts and Code

Watch Now This tutorial has a related video course created by the Real Python team. Watch it together with the written tutorial to deepen your understanding: Running Python Scripts A Python script or program is a file containing executable Python code. Being able to run Python scripts and code is probably the most important skill that you need as a Python developer. By running your code, you’ll know if it works as planned. You’ll also be able to test and […]

Read more

Speeding up Cython with SIMD

Cython allows you to write compiled extensions for Python, by translating Python-y code to C or C++. Often you’ll use it to speed up your software, and it’s especially useful for implementing small data science or scientific computing algorithms. But what happens when Cython is too slow? Often there’s still speed improvements you can do. In a previous article we focused on examples of optimizing your code to take advantage of things like instruction-level parallelism. In this article, we’ll focus […]

Read more

When should you upgrade to Python 3.12?

Python 3.12 is out now–but should you switch to it immediately? And if you shouldn’t upgrade just yet, when should you? Immediately after the release, you may not want to upgrade just yet. But from December 2023 and onwards, upgrading is definitely worth trying. To understand why, we need to consider Python packaging, the software development process, and take a look at the history of past releases. The problems with a new major Python release As with many open source […]

Read more

Python’s F-String for String Interpolation and Formatting

Python f-strings provide a quick way to interpolate and format strings. They’re readable, concise, and less prone to error than traditional string interpolation and formatting tools, such as the .format() method and the modulo operator (%). An f-string is also a bit faster than those tools! By the end of this tutorial, you’ll know why f-strings are such a powerful tool that you should learn and master as a Python developer. In this tutorial, you’ll learn how to: Interpolate values, […]

Read more

Python Basics Exercises: Object-Oriented Programming

In Python Basics: Object-Oriented Programming, you learned how OOP, or object-oriented programming, is a method of structuring a program by bundling related properties and behaviors into individual objects. In this video course, you’ll practice the following: Create a class, which is like a blueprint for creating an object Use classes to create new objects Instantiate classes with attributes and methods Use dunder methods like init() and str() This video course is part of the Python Basics series, which accompanies Python […]

Read more

Build a Blog From Scratch With Django

There are plenty of blogging platforms out there that you can use out of the box. However, building your own blog from scratch with Django is a great way to keep control over your content. Even if you’re just getting started with Django, its user-friendly features will allow you to focus on designing and posting your content. In this tutorial, you’ll learn how to: Set up a new Django project Create and edit blog posts Display posts to the user […]

Read more

Highlights from Machine Translation and Multilinguality in summer 2023

Here are short summaries of the papers I liked the most during the (academic) summer. Also, this time, I am posting both on GitHub pages and on Medium. The preprint from the University of Würzburg presents a recipe for recycling existing models to create a multilingual vision-language model. They start with the English-only language model BLIP-2, which allows images to be a part of its input (the output is always textual). They take the image encoder from this model and […]

Read more

How to Sort Unicode Strings Alphabetically in Python

Sorting strings in Python is something that you can almost take for granted if you do it all the time. Yet, it can become surprisingly tricky considering all the edge cases lurking in the vast Unicode standard. Understanding Unicode isn’t an easy feat, so prepare yourself for a whirlwind tour of surprising edge cases and effective ways of dealing with them. Note: In this tutorial, you’ll often use the term Unicode string to mean any string with non-Latin letters and […]

Read more
1 86 87 88 89 90 913