Skip to content

Curly Braces

Golden nuggets where no entry is longer than my expected attention span

  • Articles
  • Contact Me!
  • Policy
  • Internal

Category: Python

Taming PyInstaller: My Journey to a Working Backtesting Executable

Posted on March 27, 2025 by Peter Andersson

When I set out to build an executable for my backtesting application using PyInstaller, I ran into a series of errors that taught me a […]

Continue reading »
0
Development, Python, Trading

Choosing the Right Python Deployment Strategy: Pros and Cons with Examples

Posted on February 6, 2025 by Peter Andersson

Intro Deploying Python applications can be done in several ways, each with trade-offs. Here, we compare three common approaches: 1. Deploying Source Code or Using […]

Continue reading »
0
Development, Python

The Major Algorithms You Should Study to Solve AdventOfCode Problems

Posted on December 19, 2024 by Peter Andersson

If you’ve ever participated in AdventOfCode, you’ll know it’s a thrilling yet challenging journey of solving programming puzzles. While your language of choice matters, the […]

Continue reading »
0
Development, Python

Tracking Orders with Interactive Brokers API: The Importance of reqOpenOrders and Client ID

Posted on October 28, 2024 by Peter Andersson

When working with the Interactive Brokers (IB) API, one of the most essential components for effective order tracking is understanding the role of client ID […]

Continue reading »
0
Development, Python, Trading

Building a Simple and Consistent Log Structure for Python Programs with Log Rotation

Posted on October 4, 2024 by Peter Andersson

Logging is an essential part of any robust Python application. It provides insights into how your program runs, tracks errors, and helps with debugging. In […]

Continue reading »
0
Development, Python

Filling Missing Data in Time Series Using Python and Pandas

Posted on September 17, 2024 by Peter Andersson

Handling missing data in a time series is a common challenge when working with datasets, especially in domains like finance or IoT, where data might […]

Continue reading »
0
Development, Python

Efficiently Using bump2version with Python and Git

Posted on August 12, 2023 by Peter Andersson

Versioning your software is crucial for tracking changes, debugging, and ensuring compatibility. When working with Python projects in Git, one popular tool to help automate […]

Continue reading »
0
Development, Python

High Performance Python

Posted on March 7, 2023 by Peter Andersson

Python is a high-level programming language known for its ease of use and readability. However, its interpreted nature often leads to performance issues when compared […]

Continue reading »
0
Development, Python

Setting up Python logging efficiently

Posted on October 25, 2022 by Peter Andersson

The Python logging framework has been around for a long time, and with such a mature framework, it’s quite natural that the number of features […]

Continue reading »
0
Development, Python

Running a Python Flask application under Apache

Posted on August 15, 2022 by Peter Andersson

When developing a Flask application, you normally run it from the terminal using flask run or in the code app.run() But when the app is […]

Continue reading »
1
Apache, Development, Linux, Network, Python

Howto setup a Python Flask application as a system service on Linux

Posted on June 9, 2022 by Peter Andersson

With Flask you can have your backend coded in minutes, and with for example a Linode server you can get a $10/month-server up and running […]

Continue reading »
0
bash, Development, Linux, Network, Python

A simple JWT example with NodeJS and Python (part 1)

Posted on June 6, 2022 by Peter Andersson

The following example is built using a Python Flask backend, a CURL-script to test it, and a simple React frontend that logs in, gets an […]

Continue reading »
0
Development, Javascript, Linux, Node, Python

Adding a million rows from CSV file to a Mysql database table using Python and Pandas!

Posted on April 17, 2022 by Peter Andersson

Do you have a lot of CSV files, with sometimes many rows of data that you need to import to a Mysql database? You could […]

Continue reading »
0
Development, Python

Detecting colors in a webcam feed

Posted on November 26, 2020 by Peter Andersson

A friend asked me to help debug an app that tried to detect three different colors. It was written in Python and used three precreated […]

Continue reading »
0
Development, Imaging, Python, Video

Solution to pyenv problem

Posted on July 17, 2020 by Peter Andersson

If you get this (or similar) error when running: /home/peter/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pandas/compat/__init__.py:117: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use […]

Continue reading »
0
Python

The amazing power of Python and the Pandas framework!

Posted on April 11, 2020 by Peter Andersson

This code connects to a Mysql database, reads ths content of a table and imports it into a Dataframe. From there you can twist and […]

Continue reading »
0
Development, Python

Setting up Python for development

Posted on June 13, 2019 by Peter Andersson

Perfecting your Python development setup by RealPython Perfect Your Python Development Setup (Learning Path) – Real Python Optimize your Python development setup with this learning […]

Continue reading »
0
Development, Python

Managing multiple Python versions with multiple virtual environments

Posted on May 3, 2019 by Peter Andersson

Since I was used to use rvm to handle multiple ruby versions, and a .ruby-version file which automatically switched version for me, of course I […]

Continue reading »
0
Development, Python

Download EOD data from Yahoo Finance to a Python Pandas Dataframe

Posted on April 17, 2019 by Peter Andersson

If you use the Pandas DataReader and get this message: pandas_datareader.exceptions.ImmediateDeprecationError: Google finance has been immediately deprecated due to large breaks in the API without […]

Continue reading »
0
Development, Python, Trading

Pythons argparse for dummies

Posted on January 11, 2019 by Peter Andersson

Python is a great language, but sometimes it makes life more complicated than necessary. I don’t know if this is because it’s heritage (C) or […]

Continue reading »
0
Development, Python

Installing OpenCV 3.4.1 using Python 3 on Raspbian Stretch

Posted on September 11, 2018 by Peter Andersson

UPDATED OCT 2020 See this link for a much better procedure: https://medium.com/@aadeshshah/pre-installed-and-pre-configured-raspbian-with-opencv-4-1-0-for-raspberry-pi-3-model-b-b-9c307b9a993a   This is left for archiving purposes: As usual, I will keep this […]

Continue reading »
0
Development, Python, Raspberry Pi

Controlling an USB camera from a Raspberry Pi, and doing some image magic! (Part1)

Posted on August 2, 2018 by Peter Andersson

The Raspberry Pi is a fantastic piece of equipment, and what I like the most is that it resembles a standard computer with Ubuntu, just […]

Continue reading »
0
Development, Python, Raspberry Pi, Video

Från bloggen

AI Ajax Apache bash Development Docker Git Google Gradle Heroku HTML and CSS Imaging IOS Java Javascript Linux Math MIcroservices Microsoft MySQL Network Node OSX Palmemordet Patterns Photo PHP Python Raspberry Pi React Ruby Ruby on Rails Samba Spring Boot Tankar Thoughts Trading Uncategorized Video Visual Studio Code Vue Web Wordpress XCode
June 2025
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
« Mar    

Articles

Favourite Links

  • A Rock Solid Rails 5 API App with a React Frontend
  • Rails 5.1's form_with tag
  • Complex Rails forms
  • Rails is scalable

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Powered by WordPress and Momentous.