Posts for the python Category

No matching distribution found for pkg-resources==0.0.0

Wonder what the f**k pkg-resources==0.0.0 is? This is caused by an error of the virtualenv library. Learn how to fix it.

Yannic Schröer

· 3 min read

Decorators in Python

Have you ever seen “@” symbols in Python code and wondered how they work and what they do? The expressions used with them are called decorators, and while they may seem magical at first glance, understanding them is not a masterpiece. In this post we are going to demystify the decorators in Python and explain what they do, how they work, and how you can create them yourself!

Jonas Scholl

· 6 min read

Bubble Sort, Big O and visualization with Python

In this post about the bubble sort algorithm in Python, we want to look into how to implement and visualize it. Bubble sort isn’t quite an efficient algorithm when it comes to time complexity. However, it is easy to code and to understand, so it is often an introductory problem for computer science students and pupils.

Yannic Schröer

· 9 min read

Visualize K Means Algorithm in Python

In this article we want to take a look at the k-means algorithm. The k-means algorithm is used to determine clusters. It is often the first algorithm you will see in any machine learning introduction, as it is easy to understand. We will code the algorithm in Python and also visualize it.

Yannic Schröer

· 15 min read

Dictionary-Tricks in Python

In Python, the dictionary is one of the most powerful data structures you can use. There are many features and techniques concerning dictionaries that you may not have on your radar yet, but they will help you to simplify your code and gain more flexibility. This post will present you the 10 most important dictionary-tricks in Python!

Jonas Scholl

· 11 min read

Marching Cubes Algorithm

The Marching Cubes Algorithm is a meshing algorithm in the field of computer graphics. It is used to extract a polygonal mesh out of an isosurface from a three- or two-dimensional scalar field. It is primarily used for visualization modeling because it makes it easy to adjust the generated mesh.

Jonas Scholl

· 5 min read

Midpoint Line Algorithm

The midpoint line algorithm is a drawing algorithm in the field of computer graphics. It is used to determine how lines are translated into pixels.

Yannic Schröer

· 8 min read

7 Python Easter Eggs

Python is an exciting language and has always some surprises in store, no matter how long you have been working with it. In this Post, I will present 7 really cool easter eggs in Python. Feel free to try them out on your own, I hope you enjoy it!

Jonas Scholl

· 5 min read

Python Switch-Statement Alternative

Most common programming languages feature the switch-case statement, while Python doesn't. Although Python3.10 introduced structural pattern matching, there are other smart alternatives you should be aware of!

Jonas Scholl

· 6 min read

Underscores in Python

Python is a great language in my eyes, it’s simple to understand, write and its indentation forces at least a bit of styling into the code. But when it comes to underscores, there’s often confusion.

Yannic Schröer

· 4 min read

Concurrency in Python

Concurrency is a powerful concept to execute various commands parallely. It is available in nearly any programming language but is often difficult to understand or implement. I will focus on explaining this in the context of a current Windows OS and the concurrency how-tos will use Python as a language.

Yannic Schröer

· 10 min read

Use Python Type Hints!

Python differs from other programming languages in many ways, one of them is dynamic typing. You can't specify explicit types for variables, functions, or any other object. However, since the missing type declarations can be confusing and misleading, Python 3.5 introduced type hints!

Jonas Scholl

· 5 min read