Skip to content

Instantly share code, notes, and snippets.

@agtbaskara
agtbaskara / ubuntu-24.04.md
Last active July 15, 2026 00:51
Setup guide for Ubuntu 24.04

Ubuntu 24.04 Installation Recipe

A guide to setting up Ubuntu 24.04

Operating System Install

  1. Download the Ubuntu ISO (https://releases.ubuntu.com/24.04/).
  2. Build a bootable USB using Rufus (https://rufus.ie/) or balenaEtcher (https://etcher.balena.io/).
  3. Boot from the USB and start the installation.
  4. Fill in your name, username, and password.
  5. Do not change the location (use New York / US).
  6. Restart after the install completes.
  7. Log in.
@agtbaskara
agtbaskara / docker_cheatsheet.md
Created November 18, 2023 02:24
Docker Cheatsheet

Using Docker

Before building the docker image go to the cloned whill-robot directory

cd ~/catkin_ws/src/whill-robot

Build Docker images

@agtbaskara
agtbaskara / verilog_tutorial.txt
Created August 14, 2023 21:16
verilog tutorial
My recommendation is to start with RTL basics in verilog using one of the online platforms.
https://hdlbits.01xz.net/wiki/Main_Page
https://chipdev.io/question-list
https://www.edaplayground.com/
And verilog docs:
@agtbaskara
agtbaskara / png_alpha_remove.txt
Last active November 18, 2023 02:25
Remove alpha channel from png file
mogrify -alpha off *.png
@agtbaskara
agtbaskara / generate_englighten.py
Created March 17, 2023 06:58
Enchance images in a directory using EnlightenGAN
import os
import cv2
from enlighten_inference import EnlightenOnnxModel
from tqdm import tqdm
# Set input and output path
input_path = 'image_rgb'
output_path = 'image_enlighten'
@agtbaskara
agtbaskara / rename.py
Created January 30, 2023 07:38
rename files in directory to orderly numbered filename
import os
import shutil
from tqdm import tqdm
from natsort import natsorted
if __name__ == '__main__':
dirlist = ['tut-sync/tut-ringroad/day/image_depth', 'tut-sync/tut-ringroad/night/image_depth',
'tut-sync/tut-backyard/day/image_depth', 'tut-sync/tut-backyard/night/image_depth']
@agtbaskara
agtbaskara / grayscale_resize.py
Created January 30, 2023 07:37
Convert and resize images in a directory into grayscale images compatible with seqslam program
import os
import argparse
import cv2
# Setup Argument Parser
parser = argparse.ArgumentParser()
parser.add_argument('-i', '--image_dir', type=str, default='', help='input directory')
@agtbaskara
agtbaskara / README.md
Last active October 18, 2022 09:20
Run this python script to turn off MSI Mystic 1562 Keyboard RGB (https://gitlab.com/CalcProgrammer1/OpenRGB/-/issues/2289)

Place the python scripts on ~/.custom_scripts/msi-mystic-1562-rgb-off.py then add this to Ubuntu Startup to turnoff keyboard light at boot (change agtbaskara to your username)

Name:

msi-mystic-1562-rgb-off

Command:

@agtbaskara
agtbaskara / video.py
Created June 3, 2022 19:58
create synchronized video from dataset
import os
import cv2
import skvideo.io
import numpy as np
import pandas as pd
from tqdm import tqdm
if __name__ == '__main__':
reference_file_path = os.path.join('town07.csv')
@agtbaskara
agtbaskara / faiss_cosine.py
Last active July 1, 2024 12:36
FAISS Cosine similarity example
# Just adding example if noob like me came here to find how to calculate the Cosine similarity from scratch
# Source https://github.com/facebookresearch/faiss/issues/95
import numpy as np
import faiss
dataSetI = [.1, .2, .3]
dataSetII = [.4, .5, .6]
#dataSetII = [.1, .2, .3]