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

Exploring SIMD instructions in Rust

Hello 👋, I started exploring Rust a week ago due to more and more web services being written in Rust at my work place and so far I like the language, it’s simple, fast and beautiful. My day to day programming tasks are in Python, Go and Java. I’ve also used C# for some personal projects. Picking up Rust is not that easy for me since everything I write is web services or Java programs that don’t have “low-level” logic. ...

March 25, 2023 · 18 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

Separate Audio from Video with ffmpeg and Powershell

Hello 👋, A while ago I wrote an article on how to separate audio from video with ffmpeg on Linux using bash. The article can be read here: Separate Audio from Video (with ffmpeg) Now I want to introduce you to the Windows version with some little Powershell functions that I’ve wrote. But why? If you’re a content creator and you are not using the free program Audacity for editing your audio files, I believe you’re missing out on some great features. In my opinion, the noise gate feature is very usefull for eliminating background sounds and breaths from your audio. My PC fan and keyboard strokes are pretty loud and I can easily eliminate them with these settings: ...

February 2, 2023 · 3 min · Denis Nuțiu

Timisoara Nord – Night Photography

Hello 👋 I’m a software developer by profession but I also enjoy photography, this is my first blog post related to photography, here are some photos I took with the Canon R6 and the EF 15-35mm F4L lens in Timisoara train station. I’ve taken the photos underexposed at 1/60, 6400 ISO and F4. It was a cold and rainy night and I couldn’t focus well on taking photos because I was waiting for the train. ...

January 28, 2023 · 1 min · Denis Nuțiu

Awesome✨ Command Line Tools for Software Engineers: fzf 🌸

Hello everyone! 👋 I’ve made an article a while ago on FZF because I think it’s a great tool and now, I’ve decided to make a video as well. Enjoy 😄 Thanks!

January 21, 2023 · 1 min · Denis Nuțiu

Python Development in Windows with WSL2

Hello, I’ve published a new video on my YouTube channel. It’s a short tutorial on how to develop Python project on Windows by setting the remote interpreter from Pycharm to use a WSL2 Python interpreter or by running Pycharm directly in WSL2. Thank you!

January 15, 2023 · 1 min · Denis Nuțiu