Projects

Dockerized WordPress on a Raspberry Pi

This blog runs on a a Raspberry Pi since 9th April 2019 and surprisingly the Pi performs quiete well. WordPress on itself does not need too many ressources for my use case since i don’t have hundreds of visitors per day, leaving capcaity for other applications.

The current setup includes an out of the box docker-compose and a backup script which uploads files to the dropbox cloud storage. In this series i would like to give you a short introduction how my setup works and how you could set it up by yourself.

Recent Posts

dummy-img

Migrating WordPress Site to another Domain – hungsblog goes international

Hung ManhOct 29, 20235 min read

For some years now hungsblog was available under the .de top level domain. However, recently I was able to obtain the corresponding .com. So, naturally I was very excited to migrate the website from one domain to the other and…

dummy-img

Python – Pass by object: Practical pitfall

Hung ManhSep 19, 20233 min read

Inside a loop I was accessing an object within a dictionary multiple times, transform and visualize it. The intention was, to have all transformation isolated from each other. What actually happened though, was that those transformations accumulated because of Python’s…

dummy-img

Signal Processing – Filters

Hung ManhAug 24, 20232 min read

Never really have been working with signals before, I first needed a basic fundamental understanding of filters. The following are my notes about low-pass and high-pass filters taking of the youtube video made by ritvikmath. Terminology low frequency: signal doesn’t…

How to divide two timestamps in equal chunks

How to divide two timestamps in equal chunks

Hung ManhAug 9, 20233 min read

TLDR: pd.date_range(start=s, end=e, periods=period) Task Given two timestamps, how to create equally spaced out times between them? My first thought, when it comes to creating evenly spaced numbers is using linspace. This would require transforming the datetimes into unix timestamps,…

Duplicate Keys when Generating a Json from a Dictionary in Python

Duplicate Keys when Generating a Json from a Dictionary in Python

Hung ManhJan 25, 20232 min read

TLDR: A dictionary in json treats all keys as string, while a python dict distinguishes not only between the content but also its datatype (see stackoverflow). When saving a dictionary into a json and reloading the dictionary from it, you…

ChatGPT Debug Assistant

ChatGPT Debug Assistant

Hung ManhJan 14, 20234 min read

I tried to implement a Flask Restful Endpoint with the webargs framework, which i already did back in 2020. Although, i copied the old code and made some tiny adjustments with the request call, i could not make it work…

How To Create A Superset Guest Token With Python To Embed Dashboards

How To Create A Superset Guest Token With Python To Embed Dashboards

Hung ManhDec 30, 20224 min read

The ulterior motive is to embed a Superset Dashboard into e.g. a REACT application. To achieve this, one step includes the creation of guest tokens (service accounts). This process is (in my opinion) not sufficiently well documented, which is why…

Airflow – Fill Dagbag takes too long

Airflow – Fill Dagbag takes too long

Hung ManhDec 14, 20223 min read

TLDR: It is possible to dynamically create dags with only one dag script. However, at task execution the original dag script will be parsed once again. This results in unnecessary parsing iterations of dags, which are not the parent dag…

PyTorch – expected scalar type Float but found Double

PyTorch – expected scalar type Float but found Double

Hung ManhDec 14, 20222 min read

TLDR: The default datatype of a numpy array translates to double/float64. If a Tensor is created from that array using torch.as_tensor it will adopt that datatype, which is not compatible with the default datatype of a neural network model which…

Migrating existing OCI Kubernetes to VCN-Native Cluster with Terraform

Migrating existing OCI Kubernetes to VCN-Native Cluster with Terraform

Hung ManhDec 2, 20222 min read

Your OCI Kubernetes Cluster might have a little tool tip which states “migration required”. This is because, “in earlier releases (before March 16, 2021), Container Engine for Kubernetes provisioned clusters with Kubernetes API endpoints that were not integrated into your…

Recent Posts

Learnings |  Machine Learning Engineering

Signal Processing – Filters

Never really have been working with signals before, I first needed a basic fundamental understanding of filters. The following are my notes about low-pass and high-pass filters taking of the youtube video made by ritvikmath. Terminology low frequency: signal doesn’t change much over time high frequency: signal does change a lot over…

Read More
Machine Learning Engineering |  Troubleshooting

Training languagemodel – RuntimeError the expanded size of the tensor (100) must match the existing size (64) at non singleton dimension 1.

Context I trained a new languagemodel from scratch using huggingface’ framework and a preconfiguration of Roberta Model on a custom dataset. Now i wanted to vectorize a new dataset using the pretrained model. Observation I receive an error: RuntimeError the expanded size of the tensor (100) must match the existing size (64)…

Read More
How to |  Machine Learning Engineering

How to evaluate the Transformer Trainer

If you initialized a Trainer object, it will do the training boiler plate for you. Using the TrainingArguments, you can additionally customize your training process. One important argument is the evaluation_strategy which is set to “no” by default, thus no evaluation is done while training. You can set it up either per…

Read More
Others |  Troubleshooting

ChatGPT Debug Assistant

I tried to implement a Flask Restful Endpoint with the webargs framework, which i already did back in 2020. Although, i copied the old code and made some tiny adjustments with the request call, i could not make it work in 2023. By asking ChatGPT for help, i gained a…

Read More
How to |  Others

How to autostart a video in Windows

The other day a friend asked me to help with a practical prank. For his girlfriend, he prepared a laptop as a gift, however he wanted to tease her a bit by automatically starting a scary video whenever she logs in.
Read More
How to |  Others

#3 How to backup WordPress and what to consider

There are several possibilities to backup WordPress, depending on your knowledge and user privileges. In this post I want to show you how we can backup our WordPress instance which we previously deployed through our docker-compose. For this feat we need to know what we want to backup and how…

Read More
How to |  Others

#0 Introduction to Docker and WordPress

A short introduction to Docker and WordPress including the underlying necessary services and how it will interact with each other. Table of Contents: 1. What is Docker? 2. Advantages of Container 3. What is WordPress ? 4. What is behind WordPress? 4.1. Caddy as a Webserver 4.2. MySQL and MariaDB…

Read More
1 2
hungsblog | Nguyen Hung Manh | Dresden
Scroll to Top