Downloading files with Python is super easy and can even be syntactically simple with robust libraries like requests. However, there is no standard library implementation to show a progress bar in python during a download. In this quick tutorial, we’ll show how to quickly implement such a feature to help avoid guesswork during long downloads.

Introduction: Understanding the Problem

Before we dive in we need to understand all the moving pieces of this problem. This will provide the framework by which we can concoct our approach of showing a progress bar while downloading a file via Python. An outline is as follows:

  1. Make an HTTP request to download a…

Writing is tough. Writing with Search Engine Optimization (SEO) in mind is even tougher. In this article, we’ll cut through the complexity of SEO for writers and focus on actions that have the greatest impact. We’ll learn how headings, paragraph length, and keywords all influence the reach of, and engagement with, your content.

Search Engine Optimization (SEO) is the practice of creating content with search engine indexing in mind. It helps content appear in search engines like Google for related keywords. Simply put, SEO helps your content find the right audience. …

Trying to find a way to measure how much a stock price changes on an average day? The Average Daily Range (ADR) is a technical indicator that provides a great measure of intraday volatility!

The Average Daily Range is a technical indicator used to measure volatility in an asset. It calculates the average difference between the highest and lowest price over a time interval. Typically, this indicator is used to signal a significant change in price action over the short term.


The Average Daily…

The Internet checksum is used in standard Internet Protocols such as IP, UDP, and TCP. This value is used to verify the integrity of data after transmission across the network. A client includes a checksum value in the segment header such that a receiver can use that value to directly verify data integrity.

How are Internet Checksums Calculated?

The means of calculating the Internet checksum are outlined by the 1988 RFC1071 and can be summarized as such:

  1. Convert data into a series of 16-bit integers;
  2. Calculate the sum of all 16-bit integers, allowing for the carry bit wrap around;
  3. Take the 1’s complement of the final sum (flip…

Metamask is a software wallet that helps users manage Ether and Ether-based cryptocurrency. It is available as a browser extension as well as a mobile application. This article walks through the process of adding custom tokens to MetaMask.

Metamask supports many popular tokens by default but newer or less popular tokens may not be immediately available. Fortunately, any ERC-20, ERC-721, or other ETH-compatible tokens can be added relatively easily to Metamask in a few easy steps.

Note: Metamask has a separate NFT section where ERC-721 tokens are viewable…

The Ethereum network, like all blockchains, allocates a unique numeric value for user accounts. The Ethereum Name Service (ENS) provides users with the ability to look up their hexadecimal address via a human-readable value. ENS reverse records do just the opposite — allowing users to look up the human-readable address via the full hexadecimal address.

The use-case for these records was outlined in EIP-181 include allowing users to see their human-readable account ID rather than full hexadecimal address when using dApps and asserting ownership of an address. On that second part — it’s important to recognize one can configure any name to resolve to a…

Looking to grow your Discord server? Chances are you’ll be fighting against spammers and abusive users at some point. These Discord moderation bots can put server management on Easy Mode.

discord moderation bots image

Discord is an incredible tool for growing online communities. It allows all the basic functionality one would expect from a next-gen messaging service and so much more. Having a Discord Moderation Bot can ensure communities suffer from spammers and unwanted users as little as possible.

Discord bots come with a…

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

The Python all() function is a built-in that evaluates an entire collection for truthiness. It can be used in static syntax or more dynamic implementations involving such features as list comprehension and generators. It can be used in combination with other language features to built powerful and succinct conditional statements.

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.

The Python abs() function is part of the standard built-in functions and provides a utility to calculate an absolute value. This function can be used to convert static values to their absolute value as well as dynamic values. …

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!

Python provides a host of built-in utilities for translating between encoded and numerical representations of values, strings, and everything in between. The Python ord function is a built-in utility that, given a single Unicode character, will return its ordinal value.

The term ordinal means countable and in the context of…

Zack West

Entrepreneur, programmer, designer, and lifelong learner. Can be found taking notes from Mother Nature when not hammering away at the keyboard.

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