Fredrik Sjöstrand

Fredrik Sjöstrand @fronkan

About: Software engineering. Interested in data science, machine learning, and automation. I also have a crush on python.

Location:
Linköping, Sweden
Joined:
Oct 22, 2019

Fredrik Sjöstrand
articles - 22 total

Writing a Text Editor in 7 Minutes using Textual

I was trying to prepare a lightning talk at work and thought about a small experiment I did with...

Learn More 0 0Jun 5

Tips & Tricks for Writing a Workaround

Most of you have probably written a workaround for some bug in a web API or a third-party package. If...

Learn More 0 0Aug 1 '22

A Personal .gitignore - Even for a Single Repository

I think I might be a bit messy, but maybe so are you? Either way, I quite often find myself with...

Learn More 15 0Jun 7 '22

Exploring Python: Using and Abusing the Iterator Protocol

The concept of iterators isn't in any way specific to Python. In the most general terms, it is an...

Learn More 6 0May 3 '21

Different Barmodes Simultaneously in Plotly Subplots (Python)

My first and most read blog post, by an order of magnitude, is this one about plotly: ...

Learn More 0 0Feb 4 '21

requirements.txt in your requirements.txt

Are you managing multiple requirements files for your Python project? Are you copy-pasting rows from...

Learn More 10 2Nov 19 '20

Pip Install a Git Repository

If you would like to install the latest version of flask, you would probably use pip install flask....

Learn More 13 2Oct 22 '20

A First Look at Python Protocols (PEP 544)

I really like the type hints added to python 3.5, PEP 484, but somehow I totally missed PEP 544 -...

Learn More 10 0Oct 5 '20

Game Jam Post Mortem - Supply Run

During two weeks I developed a game for the Game Jam, Kodsnacks Tvåveckorssylt - Fjärde Omgången....

Learn More 1 0Sep 6 '20

TIL: Python Recursion Limit When Accessing Elements in Recursive List

Earlier today I found this post by Ryan Westlund: ...

Learn More 6 4Aug 5 '20

Don't Try This at Work: Exception Driven Fizz Buzz V2

So I have decided I will embrace some of my, sometimes, let's call them "less practical ideas"....

Learn More 1 0Aug 1 '20

Don't Try This at Work: Exception Driven Fizz Buzz

So, I was catching up on some of the talks from PyCon 2020. First, I watched Steven Lott - Type...

Learn More 5 0Jun 27 '20

Is -2 < -1 < 0 true or false?

Before getting into the question posed in the title, lets look at mathematical notation so everyone...

Learn More 5 0Jun 7 '20

importlib.reload for Resting Modules Between Tests

Python modules can be thought of as a Singleton design pattern. They are initialized once, the first...

Learn More 9 0Apr 7 '20

Using Descriptors and Decorators to Create class-only Methods in Python

I ran across a post asking how you can create class-only methods in Python. A class-only method...

Learn More 11 2Mar 28 '20

Comparing C++ RAII and Python Context Managers

I was reading up on the practice in C++ called Resource Acquisition Is Initialization or RAII, after...

Learn More 19 4Mar 12 '20

DIY CLI-tool: Find and Activate Virtual Environments

In this post, I will cover my most used CLI-tool. It finds a virtual environment, created using...

Learn More 6 0Feb 24 '20

CLI tools example: show all tools

I wanted to have a simple tool as my first example in the series. So this first tool will just print...

Learn More 8 0Feb 8 '20

Settings for Making Python CLI-tools on Windows

In the previous post of this series, I showed how to set up a folder for our own CLI-tools in...

Learn More 7 0Jan 27 '20

TIL: What Happens When Using the Context Manager Outside its with-Statement

The other day I learned two things about context managers. The first one is that the variable,...

Learn More 6 0Jan 25 '20

Making your CLI-tools accessible in Windows

This is the first post in a series on creating Python CLI-tools in Windows. However, this post will...

Learn More 4 1Jan 18 '20

Stacked and Grouped Bar Charts Using Plotly (Python)

In this post, I will cover how you can create a bar chart that has both grouped and stacked bars...

Learn More 20 8Jan 8 '20