Skip to content

Instantly share code, notes, and snippets.

View AndhikaWB's full-sized avatar
😶‍🌫️
I may be slow to respond.

AndhikaWB

😶‍🌫️
I may be slow to respond.
  • Southeast Asia
View GitHub Profile
@AndhikaWB
AndhikaWB / CUDA for Fedora Atomic.md
Last active May 14, 2026 18:51
Nvidia CUDA AI/ML on Fedora Silverblue/Kinoite/Atomic

Initial preparation

Setting the repos

First of all, enable the Nvidia RPM Fusion repo. This file should already exist on your system. Alternatively, you can enable it from GNOME Software or KDE Welcome Center. [^1]

sudo sed -ie 's/enabled=0/enabled=1/g' /etc/yum.repos.d/rpmfusion-nonfree-nvidia-driver.repo
@AndhikaWB
AndhikaWB / README.md
Created October 30, 2025 06:57
Use Docker (without Docker Desktop) from Arch Linux WSL

Why?

Docker Desktop on Windows is bloated, it requires running Docker Desktop all the time. Not to mention all the AI stuff that is being pushed to it. Running Docker on Linux (WSL) directly is more efficient as Docker Desktop uses a Linux VM too behind the scene.

Setup

Install Arch Linux WSL distro. You will enter Arch Linux automatically when it's done downloading.

wsl --install archlinux
@AndhikaWB
AndhikaWB / README.md
Last active October 2, 2025 10:46
SQLAlchemy Relationship, Cascade, and Passive Deletes Test

Objective

The purpose of this gist is to test the exact behavior of SQLAlchemy relationship when coded in a certain way. What are tested:

  • The existence of relationship() in the class
  • The value of cascade = XXX in the relationship()
  • The value of passive_deletes = XXX in the relationship()

Code

Code that will be used for experiment (using SQLAlchemy 2.0):

@AndhikaWB
AndhikaWB / README.md
Created September 12, 2025 14:23
Prefect Lazy Materialize

Intro

Click to expand

Decorator to lazily materialize an asset based on the task input/output value. The usage is very similar as the original materialize decorator, here's an example:

@lazy_materialize('{{out_dir}}', asset_deps = ['{{data_dir}}/raw'], output_as = 'out_dir')
def preprocess_data(data_dir: str, preproc_folder: str):