Testing Tips: Avoid sleep in tests

Hi 👋, In this article I wanna show a testing tip that I’ve recently learned myself by reading Software Engineering at Google: Lessons Learned from Programming Over Time. The technique improved the way I write unit tests. When I’m writing bigger unit tests, I have execute something in the background, like for example publishing a message to a message broker, wait for the message to be published and then consume it to test that what I published is correct. ...

July 12, 2022 · 4 min · Denis Nuțiu

How to install Redis on Synology NAS (Container Manager)

Hello everyone! 👋 I run a small set of containers on my NAS at Home to monitor different weather and run automations. Because of this I wanted to install Redis on my NAS as well. Redis is a key value database that has a lot of extra modules such as: Redis Search: A query and indexing engine for Redis, providing secondary indexing, full-text search, vector similarity search and aggregations. Redis JSON: A NO-SQL Document Database Redis Graph: A graph database. Redis TimeSeries: A time series database. Redis Bloom: Bloom and Cuckoo filters implementation. Redis Streams: An append only Log These functionalities save me a lot of time and improve my software running inside my home. Redis is also a simple service to deploy and maintain. ...

December 16, 2024 · 1 min · Denis Nutiu

How to install DaVinci Resolve on Linux (Fedora Edition)

Hello everyone! 👋 In this article you will learn how to install DaVinci Resolve Free and Studio editions on Fedora 40 and Fedora 41. The first step is to download DaVinci Resolve from the official website, either with: Free Edition Studio Edition The next step is to download and install DaVinci Helper. 1 2 sudo dnf copr enable -y herzen/davinci-helper sudo dnf install -y davinci-helper Once you’ve installed DaVinci Helper, the following steps are simple. Simply circle through the tabs to on the left and select the DaVinci Resolve zip file when prompted. ...

November 30, 2024 · 1 min · Denis Nutiu

Changing Microk8s' default hostpath addon storage location

Hello everyone, This is a short guide on how to change Microk8s’ default storage path for the hostpath addon. First, ensure the addon is enabled: 1 microk8s enable hostpath-storage Then create a new directory in which you want to store volumes created in the Microk8s instance. 1 mkdir -p /var/microk8s-volumes Then create and apply the storage class yaml file: 1 2 3 4 5 6 7 8 9 kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: custom-storageclass provisioner: microk8s.io/hostpath reclaimPolicy: Retain parameters: pvDir: /var/microk8s-volumes volumeBindingMode: WaitForFirstConsumer To change the default storage class for Microk8s you need to run these commands: ...

August 9, 2024 · 1 min · Denis Nutiu

How to install HP LaserJet 107a Drivers on Linux

Hello everyone! 👋 I’ve recently installed Fedora on my main PC and I wanted to write this post to serve me as a memo on how to install the HP LaserJet 107 printer driver. The driver should also be compatible with the following products and generally HP’s LaserJet 100 printer series. HP LaserJet 107a HP LaserJet 105a HP LaserJet 103a Installing the Drivers Installing the drivers requires Python3 available on your system if I remember correctly, it should be already available on Fedora and Ubuntu. ...

February 21, 2024 · 2 min · Denis Nutiu

Convert a FastAI model to ONNX and CoreML

Hello there 👋, In this post, I will show you how to convert a FastAI model to ONNX and CoreML. Convert a FastAI model to Pytorch Before we can convert the model to ONNX format or CoreML, we need to convert it to Pytorch first. This is a simple process. Assuming that the model is trained, we need to call torch.save to export the model: 1 2 3 4 5 from fastai.vision.all import * # learn is your FastAI Learner torch.save(learn.model, "/models/model.pth") Convert a FastAI model to ONNX ONNX is a standard for machine learning models. It allows you to convert a model from a framework like PyTorch or TensorFlow to its format in order to be used in different runtimes, for exampl Windows, Android, Linux, MacOS and iOS and from various programming languages like C#, C++, Java, JavaScript and Python. ...

August 20, 2023 · 3 min · Denis Nutiu

Tracing Node.js APIs with OpenTelemetry

Hello everyone 👋, In this article, we’ll instrument a simple Node.js API with OpenTelemetry traces. OpenTelemetry is the new standard for distributed tracing and metrics. Trace data is used to monitor and troubleshoot complex distributed systems. At the end of this article, we’ll have a Node.js API that is instrumented with OpenTelemetry and we’ll be able to see the traces in Grafana Tempo: The API Let’s start by setting up our NodeJS project by installing the dependencies: ...

August 7, 2023 · 9 min · Denis Nutiu

Using an ONNX Resnet model in Java

Hello everyone! 👋 This is a follow-up post to the previous one, long story short I started taking the course from fast.ai to learn more about Deep Learning. I’ve built a simple Image Tagging model using the Resnet architecture (don’t worry about the paper I did not read it, GitHub Copilot suggested it while writing this blog post). FastAI is a high-level Python library that allows you to train complex ML models really fast and efficiently. After training my model, I’ve exported it into the ONNX format and in this post we’re using the model in a Java application. ...

July 4, 2023 · 8 min · Denis Nutiu

Image tagging with Deep Learning

Hello everyone 👋, I’ve been playing with FastAI and deep learning for a week or so and I’ve decided to combine my passion for software with my passion for photography. I’m working on an app or maybe a library that allows you to generate tags for a photo. For an amateur photographer like me it’s quite useful as I don’t always have inspiration to write tags for my photos and sometimes the tags I write are inconsistent. ...

July 2, 2023 · 3 min · Denis Nutiu

Deploy a FastAI model with FastAPI

Hello everyone 👋, In this quick post I’ll show you how to deploy a FastAI model using FastAPI. It’s a follow-up to my previous post from here and it is partially based on this FastAI lecture: Exporting the Model Before we create the API, we need to export the model as a pickle file. ...

June 21, 2023 · 3 min · Denis Nutiu