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

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

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

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

February 2, 2023 · 2 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

Python Singleton Pattern implementation with LRU

Hello and happy new year! 🥳🙌 I’ve made a video on how to implement the singleton pattern in Python using the LRU cache. Thank you!

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