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 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: from fastai.vision.all import * # learn is your FastAI Learner torch....

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 · 7 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....

July 4, 2023 · 7 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. Add learn.export("<path>/cat_or_dog.pkl") with the full absolute export path at the end of the script: # ... learn = vision_learner(dls, resnet34, metrics=error_rate) learn....

June 21, 2023 · 2 min · Denis Nutiu

FastAI GPU Support

Hello everyone 👋, This is my first blog post about AI, it’s a quick post on how to enable GPU support for the FastAI library. I have avoided getting into AI for some time now, I thought that it would involve lots of complicated math, and I was not sure that it would be worth the effort, I did not get very good grates in my college math classes 😅....

June 20, 2023 · 3 min · Denis Nutiu

Getting Started with pdoc3 for Python

Hello everyone! 👋 In this article we’ll talk about documentation and how to document a Python project with pdoc. Documentation is an essential part of writing high-quality Python code. Not only does it make your code easier to understand, but it also makes it more maintainable and reusable. In this post, we’ll explore how to use pdoc to generate documentation for your Python code. pdoc is a powerful tool that can automatically generate documentation for your Python modules and classes based on their docstrings....

April 13, 2023 · 4 min · Denis Nuțiu

Working with Volumes in Microk8s

Introduction Hello 👋, In this quick tutorial 💻 we’ll explore how to use Volumes and PersistentVolumes with hostpath storage in Microk8s. We will deploy a simple nginx instance and mount a volume inside it that points to the ~/Downloads folder. Let’s get started! Note: The following image was generated with Stable Diffusion How-To You can follow along if you want to setup a quick deployment with a host path volume....

April 13, 2023 · 2 min · Denis Nuțiu