Python’s all() function is so powerful that it was declared part of the built-in library. Understanding how to use this chaining conditional function can make your code more concise, flexible, and *pythonic* to boot!

Python all() function
Python all() function
Image: αlphαrihtms


Finding the absolute value has applications in nearly every field where numbers are involved. In this article, we’ll learn how Python celebrates this universal applicability by offering a powerful built-in function for calculating the absolute value of a number.

Image by: alpharithms
# Calculate the absolute value of a static number
>>> abs(-42)
42
# Calculate the absolute value…

Ordinal values are fun ways to find the numerical representation of characters. These numbers can help translate text between machines, encode data across networks, and maybe even create your own secret language! Python’s built-in ord() function makes converting between numbers and characters a breeze!

Image by: alpharithms

Leverage the power of the standard textwrap library to format text like a pro!

Decorative stationary
Decorative stationary
Photo by Kira auf der Heide on Unsplash

Text Wrapping In Python


Image processing is a breeze in Python when using the Pillow library. However, getting text to play nicely isn’t always an easy task. Learn how to wrap text like a pro and start churning out memes by the thousand in no time flat!

Image: αlphaαrithms.com

Python is the most popular language for financial analysis and comes with many libraries to make things super convenient, efficient, and fast! The one common prerequisite of all is financial data. Luckily, getting financial data in Python is a breeze with the help of several public APIs, free data sources, and well-developed libraries!

Python Financial Data αlphαrithms
Python Financial Data αlphαrithms
Image from alpharithms.com

Highlights

  • Understanding structured vs. unstructured financial data
  • What is…


TL;DR — Using Custom Fonts in Pillow


Facebook recently announced their latest AI-driven project TextStyleBrush, a self-supervised model that can copy the style of text in a photo using a single sample. This tech stands to support breakthrough applications in fields of real-time data analysis, deepfake detection, and consumer-level visual imaging technologies.

Exampls of Facebook’s TextBrushStyle
Exampls of Facebook’s TextBrushStyle

Our disentanglement approach is further trained in a self-supervised manner, allowing the use of real photos for training, without style labels.


The Python dictionary is a powerful data structure of key-value pairs indexed by a non-mutable data type. They are inherently unordered though will preserve the order by which items are added. There is no way to sort a python dictionary directly, so we must get a little creative.

Python Sorted Dictionary Banner — Overcoded
Python Sorted Dictionary Banner — Overcoded
Image by overcoded
# Create a dictionary with randomly ordered keys
d = {5: 'f', 3: 'd', 0: 'a', 2: 'c', 6: 'g', 1: 'b'}
# Sort by converting to list using lambda
d…


The role of histamine in our bodies is complex, to say the least. The endeavor to understand how genetics and nutrition influence this widely-used molecule may prove fruitful in addressing issues such as Histamine Intolerance, Mast-Cell activation syndrome (MCAS), and a myriad of other conditions.

Source: Optimus Medica

Highlights

  • Histamine plays a complex role in the human body

Zack West

Entrepreneur, Computer Science Student, Designer, and self-confessed health nut that enjoys productivity hacks, developing better habits, and Mother Nature.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store