Your Python Coding Environment on Windows: Setup Guide

Are you interested in writing Python code on a Windows machine? Maybe you’re a lifelong Windows user getting into coding with Python, or perhaps you’re just beginning to branch out from macOS or Linux. In this tutorial, you’ll walk through an easy-to-follow and flexible Python coding setup on Windows 10. Note: Most of the steps here will work equally well on Windows 11. To set up your Windows machine for Python coding, you’ll: Clean and update a new Windows install […]

Read more

Finding performance bottlenecks in Celery tasks

When your Celery tasks are too slow, and you want them to run faster, you usually want to find and then fix the performance bottleneck. It’s true, you can architect a solution where slow tasks don’t impact faster ones, and you may sometimes need to. But if you can manage to make all your tasks fast, that is ideal. To speed up your code, you need to identify the bottlenecks: which task is slow, and why it’s slow. In this […]

Read more

Custom Python Dictionaries: Inheriting From dict vs UserDict

Creating dictionary-like classes may be a requirement in your Python career. Specifically, you may be interested in making custom dictionaries with modified behavior, new functionalities, or both. In Python, you can do this by inheriting from an abstract base class, by subclassing the built-in dict class directly, or by inheriting from UserDict. In this tutorial, you’ll learn how to: Create dictionary-like classes by inheriting from the built-in dict class Identify common pitfalls that can happen when inheriting from dict Build […]

Read more

Using the Python not Operator

Python’s not operator allows you to invert the truth value of Boolean expressions and objects. You can use this operator in Boolean contexts, such as if statements and while loops. It also works in non-Boolean contexts, which allows you to invert the truth value of your variables. Using the not operator effectively will help you write accurate negative Boolean expressions to control the flow of execution in your programs. In this course, you’ll learn: How Python’s not operator works How […]

Read more

Build a Flashcards App With Django

Flashcards are a great tool when you want to memorize a new topic or learn a new language. You write a question on the front of the card and the answer on the back of the card. Then you can test your memory by going through the flashcards. The more often you show a card to yourself, the better your chances of memorizing its content. With Django, you can build your own flashcards app. By following this tutorial, you’ll build […]

Read more

NumPy’s max() and maximum(): Find Extreme Values in Arrays

You’ve now seen examples of all the basic use cases for NumPy’s max() and maximum(), plus a few related functions. Now you’ll investigate some of the more obscure optional parameters to these functions and find out when they can be useful. Reusing Memory When you call a function in Python, a value or object is returned. You can use that result immediately by printing it or writing it to disk, or by feeding it directly into another function as an […]

Read more

SQLite and SQLAlchemy in Python: Moving Your Data Beyond Flat Files

All programs process data in one form or another, and many need to be able to save and retrieve that data from one invocation to the next. Python, SQLite, and SQLAlchemy give your programs database functionality, allowing you to store data in a single file without the need for a database server. You can achieve similar results using flat files in any number of formats, including CSV, JSON, XML, and even custom formats. Flat files are often human-readable text files—though […]

Read more

Python and TOML: New Best Friends

TOML—Tom’s Obvious Minimal Language—is a reasonably new configuration file format that the Python community has embraced over the last couple of years. TOML plays an essential part in the Python ecosystem. Many of your favorite tools rely on TOML for configuration, and you’ll use pyproject.toml when you build and distribute your own packages. In this tutorial, you’ll learn more about TOML and how you can use it. In particular, you’ll: A new module for TOML parsing is being added to […]

Read more

4 Business AI Predictions for 2022-2023

AI as a field, especially in the context of real-world applications, has been progressing at a rapid pace. This has been further accelerated by the onset of the COVID-19 pandemic. In fact, AI was found to be the most discussed technology in 2021. Having worked with numerous clients, big and small, in the integration of AI, here are 4 Business AI predictions in 2022 and beyond. #1 Many more “deployed” models In the recent past, businesses have had trouble operationalizing […]

Read more

Machine Translation and Multilinguality in May and June 2022

After a while, here is a dump of what I found most interesting on arXiv about machine translation and multilinguality, covering May and June of this year. Google Research published a pre-print of their NAACL paper: SCONES (Single-label Contrastive Objective for Non-Exclusive Sequences). The paper is about a simple trick: they replace softmax with binary classifiers with a sigmoid output and use the sum of binary cross-entropies as their loss function. It gets a slightly better BLEU and BLEURT score […]

Read more
1 153 154 155 156 157 914