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

LeetCode: Removing Stars From a String & Simplify Path

Hello 👋, I’ve started doing some LeetCode dailies with Paula and I’d like to share our solutions for the last two problems. https://leetcode.com/problems/removing-stars-from-a-string/ https://leetcode.com/problems/simplify-path/ I also want to warmly welcome the new nuculabs.dev subscribers! Thank you for subscribing! If you want to attempt the problems by yourself then stop reading otherwise you’ll be spoiled with solutions. Removing Stars From a String In this problem you are given a string with stars ‘*’ and when you encounter a start you’ll need to remove the start along with the character to it’s left. ...

April 12, 2023 · 2 min · Denis Nuțiu, Paula Rusti

LeetCode: Boats to Save People

Introduction Hello everyone! 👋 I’ve been practicing with some Leetcode daily challenges lately and since I’ve recently moved to Substack I wanted to make my first post here 😁 Boats to Save People The problem Boats to Save People is solved using a Greedy approach. Given a number of people and their weights, along with a carry limit for the boat. You must find the number of boats needed to carry the people. A boat can carry a maximum of two people at a time. ...

April 8, 2023 · 2 min · Denis Nuțiu, Paula Rusti

How to Pack JavaScript Array Elements into a Byte Buffer and Create a New Numeric Array from the Buffer

Hello 👋, In this short article we’ll talk about packing integers into binary data in JavaScript using the Buffer, ArrayBuffer and DataView classes. Sometimes in JavaScript, it may be necessary to pack the elements of an array into a byte buffer and then create a new numeric array from the buffer’s contents. This can be achieved using the DataView object in JavaScript. First, create an array of elements you want to pack, for example: ...

March 30, 2023 · 3 min · Denis Nuțiu

How to create a ServiceMonitor in Microk8s: Observability Tutorial

Hello, In this quick tutorial we will explore how to create a ServiceMonitor in microk8s when you have the observability addon enabled. When you enable the observability addon with: 1 microk8s enable observability It will create the obserability namespace and install the Kubernetes Prometheus Stack. 1 2 3 4 5 6 7 8 9 10 11 k get pods -n observability NAME READY STATUS RESTARTS AGE kube-prom-stack-prometheus-node-exporter-htzw9 1/1 tempo-0 2/2 Running 4 (16h ago) 27h alertmanager-kube-prom-stack-kube-prome-alertmanager-0 2/2 kube-prom-stack-kube-prome-operator-cbf896985-fb5fc 1/1 kube-prom-stack-kube-state-metrics-57c8c84df6-hflgj 1/1 kube-prom-stack-grafana-74d8979894-sjv77 3/3 prometheus-kube-prom-stack-kube-prome-prometheus-0 2/2 loki-0 1/1 loki-promtail-sg8bv 1/1 Running You will get a Grafana configured with a Prometheus data source and other data sources as well. ...

March 29, 2023 · 2 min · Denis Nuțiu

Parallel Processing in Python with concurrent.futures

Hello 👋, In this short article I want to talk about parallel processing in Python. Introduction Sometimes you will need to process certain things in parallel. If you’re using Python you may know about the global interpreter lock abbreviated GIL for short. The GIL is a lock that allows only a single thread to control the Python Interpreter at a time (per process), that means that your multi-threaded Python program will have only a single thread executing code at the same time. ...

March 18, 2023 · 3 min · Denis Nuțiu

How to fix DaVinci Resolve audio issues on Ubuntu 20.10

Hello 👋, To fix audio issues on a fresh install of DaVinci Resolve 18 on my Ubuntu 20.10 PC I did the following things: 1. List all the available sound cards 1 2 3 4 5 6 7 8 9 cat /proc/asound/cards 0 [NVidia ]: HDA-Intel - HDA NVidia HDA NVidia at 0xfc080000 irq 94 1 [AI1 ]: USB-Audio - RODE AI-1 RODE Microphones RODE AI-1 at usb-0000:2d:00.3-1.3, full speed 2 [Generic ]: HDA-Intel - HD-Audio Generic HD-Audio Generic at 0xfc400000 irq 96 3 [U0x46d0x81b ]: USB-Audio - USB Device 0x46d:0x81b USB Device 0x46d:0x81b at usb-0000:2d:00.3-1.4, high speed List all the available sound cards a chose a default. I like playing audio though my headphones when editing and the headphones are connected to my USB Audio Interface RODE AI-1, this is what I want to use as the default card. ...

December 11, 2022 · 2 min · Denis Nuțiu

Separate Audio from Video (with ffmpeg)

Hello 👋 In this short article I will show you how to split audio from video using ffmpeg. When I worked on my Udemy course I needed a way to process audio in Audacity and edit the video in Kdenlive. So I wrote two bash scripts, one for spliting audio and video and another one to combine the processed audio (usually a .wav file with the same name) with the video. The result is the following ...

December 8, 2022 · 1 min · Denis Nuțiu