ylliX - Online Advertising Network

Guide to Strings in Python

A string in Python is a sequence of characters. These characters can be letters, numbers, symbols, or whitespace, and they are enclosed within quotes. Python supports both single (‘ ‘) and double (” “) quotes to define a string, providing flexibility based on the coder’s preference or specific requirements of the application. More specifically, strings […]

Guide to Heaps in Python

In this guide, we’ll embark on a journey to understand heaps from the ground up. We’ll start by demystifying what heaps are and their inherent properties. From there, we’ll dive into Python’s own implementation of heaps, the heapq module, and explore its rich set of functionalities. So, if you’ve ever wondered how to efficiently manage […]

Calling AWS Bedrock from code

Image by Author Using Python in a Jupyter notebook Many of you will know that every man and his dog are producing AI products or LLM’s and integrating them with their products. Not surprisingly AWS — the biggest cloud services provider — is also getting in on the act. What is bedrock? Its AI offering […]

Guide to Hash Tables in Python

While Python doesn’t have a built-in data structure explicitly called a “hash table”, it provides the dictionary, which is a form of a hash table. Python dictionaries are unordered collections of key-value pairs, where the key is unique and holds a corresponding value. Thanks to a process known as “hashing”, dictionaries enable efficient retrieval, addition, […]

Guide to Queues in Python

From storing simple integers to managing complex workflows, data structures lay the groundwork for robust applications. Among them, the queue often emerges as both intriguing and ubiquitous. Think about it – a line at the bank, waiting for your turn at a fast-food counter, or buffering tasks in a computer system — all these scenarios […]

Guide to Stacks in Python

At its core, a stack is a linear data structure that follows the LIFO (Last In First Out) principle. Think of it as a stack of plates in a cafeteria; you only take the plate that’s on top, and when placing a new plate, it goes to the top of the stack. The last element […]

Python at Scale: Strict Modules

Welcome to the third post in our series on Python at scale at Instagram! As we mentioned in the first post in the series, Instagram Server is a several-million-line Python monolith, and it moves quickly: hundreds of commits each day, deployed to production every few minutes. We’ve run into a few pain points working with […]