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

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

Overflowing Buckets

Hello everyone 👋, Today I want to share with you a problem I’ve encountered along my journey. The problem is fairly simple: You have a finite number of water units. You have a finite number of buckets. You need to distribute the water units into the buckets. Each bucket has a maximum capacity. When a bucket is full, the water overflows into the next two buckets by splitting evenly. You need to print the number of the buckets that are full. The following diagram illustrates the problem: ...

June 15, 2023 · 3 min · Denis Nutiu

From Wordpress To Hugo

Introduction Hello everyone 👋, This is a quick post on how I migrated my blog from WordPress to Hugo. I will not go into details on how to install Hugo or how to use it, but I will share some of the things I learned along the way. I’ve also written a simple tool in Python to aid you in the migration process. You can find it here: https://dnutiu.github.io/jekyll-to-hugo/ Why not WordPress? I’ve been using WordPress for about 5 years now, and I’ve switched from free hosted WordPress to self-hosted and then to premium hosted WordPress. ...

June 5, 2023 · 3 min · Denis Nutiu

CAP Theorem

The CAP theorem, also known as Brewer’s theorem, is a concept in distributed computing that states that it is impossible for a distributed system to simultaneously provide all three of the following guarantees: Consistency: All nodes in the system see the same data at the same time. Availability: Every request made to the system receives a response, without guarantee that it contains the most recent version of the data. Partition tolerance: The system continues to function despite arbitrary message loss or failure of part of the system. In other words, when designing a distributed system, you can only choose two out of the three guarantees, and you have to sacrifice the third. This is because achieving all three is simply not possible in a distributed system. ...

May 9, 2023 · 2 min · Denis Nutiu, ChatGPT

Apache Cassandra Compaction

Introduction Apache Cassandra is a highly scalable and distributed NoSQL database that is designed to handle large volumes of data across multiple commodity servers. One of the key features of Cassandra is its ability to automatically manage data distribution, replication, and consistency across a cluster of nodes, providing high availability and fault tolerance. One important aspect of managing data in Cassandra is compaction. Compaction is the process of merging and removing unnecessary data from SSTables, which are the on-disk storage structures used by Cassandra. Over time, as data is written and deleted, SSTables can become fragmented and inefficient, which can impact performance and consume valuable disk space. Compaction helps to optimize the storage and access of data in Cassandra by merging multiple SSTables into a single, more efficient SSTable. ...

April 13, 2023 · 6 min · Denis Nutiu, ChatGPT

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. Docstrings are special strings that appear at the beginning of a module, function, or class definition, and provide a description of the object’s purpose, parameters, return values, and other relevant information. ...

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 · 3 min · Denis Nuțiu