Skip to content

Instantly share code, notes, and snippets.

View karanjakhar's full-sized avatar
😀

Karan Jakhar karanjakhar

😀
View GitHub Profile
@adujardin
adujardin / clean_jetson.sh
Last active January 10, 2025 05:03
Script to remove unnecessary stuffs from the Jetson to save disk space (WIP)
# https://elinux.org/Jetson/FAQ/BSP/RootFS_Reduction#Remove_installed_deb_packages
## Step 1, safe
sudo apt update
sudo apt autoremove -y
sudo apt clean
sudo apt remove thunderbird libreoffice-* -y
## Step 2, still safe but not recommended for dev use
# samples
from keras.datasets import mnist
from keras.utils import to_categorical
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten, Conv2D, MaxPooling2D
(x_train, y_train), (x_test, y_test) = mnist.load_data()
# save input image dimensions
img_rows, img_cols = 28, 28
@CMCDragonkai
CMCDragonkai / non_max_suppression.py
Last active July 3, 2021 18:10
Non-Maximum Suppression for Bounding Boxes #python #algorithms
import numpy as np
def non_max_suppression(boxes, scores, threshold):
assert boxes.shape[0] == scores.shape[0]
# bottom-left origin
ys1 = boxes[:, 0]
xs1 = boxes[:, 1]
# top-right target
ys2 = boxes[:, 2]
@jon-barker
jon-barker / coco2kitti.py
Created January 6, 2017 03:11
Script to convert MS COCO annotations file to Kitti bounding box label files Edit
"""coco2kitti.py: Converts MS COCO annotation files to
Kitti format bounding box label files
__author__ = "Jon Barker"
"""
import os
from pycocotools.coco import COCO
def coco2kitti(catNms, annFile):
@cferdinandi
cferdinandi / terminal-cheat-sheet.txt
Last active May 29, 2025 20:13
Terminal Cheat Sheet
# Terminal Cheat Sheet
pwd # print working directory
ls # list files in directory
cd # change directory
~ # home directory
.. # up one directory
- # previous working directory
help # get help
-h # get help