# Mathspp Blog

### A blog dedicated to mathematics and programming!

This blog has a really interesting assortment of articles on mathematics and programming. You can use the tags to your right to find topics that interest you, or you may want to have a look at

You should also subscribe to the blog newsletter.

##### Finding similar photos

Go through the complete code for a Python project that consists in finding similar photographs in a folder. This tutorial will make use of classical techniques and is suitable for beginners.

##### Implementing a case-insensitive dictionary

How do you implement a case-insensitive (or caseless) dictionary? In this article we explore solutions where we inherit from the built-in dict, the abstract base class MutableMapping from the standard module collections.abc, and the UserDict in the standard module collections.

##### Problem #063 – arbitrarily many primes in arbitrarily big intervals

Can you prove that there are arbitrarily many primes in arbitrarily big intervals?

##### Finding and fixing over 10,000 bugs on GitHub

Learn how I found over +10,000 bugs in Python code all over GitHub and how all those bugs could have been fixed by importing the Python module string and using the constants ascii_lowercase and ascii_uppercase.

##### Connecting Python and Dyalog APL with sockets

This article shows how to communicate between Python and Dyalog APL through the use of sockets. We will use the module socket from Python and the Conga workspace from Dyalog.

##### How to work with case-insensitive strings

This is a short and practical tutorial that guides you on how to work with case-insensitive strings in Python and teaches how to use the str.lower, str.upper, and str.casefold methods.

##### Running Python inside ChatGPT

Running Python inside ChatGPT shows some amazing capabilities that ChatGPT has to understand Python code and evaluate it for you.

##### TIL #054 – type hint Any

Today I learned about the type hint Any and its bidirectional compatibility with all other types.

##### TIL #053 – precision of Python floats

Today I learned what precision Python floats have.

##### TIL #052 – deleting a file with pathlib

Today I (re)learned how to delete a file in Python with the module pathlib.

##### TIL #051 – Heron's formula

Today I (re)learned Heron's formula to compute the area of a triangle from its three sides.

##### TIL #050 – add a suggestion

Today I learned that you can add suggestions directly when reviewing pull requests on GitHub.

##### TIL #049 – edit multiple file locations in VS Code

Today I learned how to edit multiple lines in the VS Code code editor.

##### How to create a Python package in 2022

How do you create a Python package? How do you set up automated testing and code coverage? How do you publish the package? That's what this article teaches you.

##### Smoosh all the things

This is the written version of my EuroPython 2022 lightning talk “Smoosh all the things”.

##### Obfuscated "Hello, world!"

This is the most obfuscated “Hello, world!” program I have ever seen!

##### The most obscure "Hello, world!" program

In this article we go over the most obscure “Hello, world!” Python program I have ever seen.

##### Object initialisation with __init__

Learn about the dunder method __init__, responsible for initialising class instances.

##### Dunder methods | Pydon't 🐍

This is an introduction to dunder methods in Python, to help you understand what they are and what they are for.

##### Custom JSON encoder and decoder

This article explains how to extend the JSON format by using a custom encoder and a custom decoder to turn arbitrary Python objects into JSON and back.