Skip to content

Instantly share code, notes, and snippets.

View p3jitnath's full-sized avatar
:octocat:
Think Different.

Pritthijit Nath p3jitnath

:octocat:
Think Different.
View GitHub Profile
@p3jitnath
p3jitnath / driver-rtl8192eu.sh
Last active April 25, 2020 14:19
RTL8192eu Driver Installation
sudo apt-get install git linux-headers-generic build-essential dkms
git clone https://github.com/Mange/rtl8192eu-linux-driver
cd rtl8192eu-linux-driver
sudo dkms add .
sudo dkms install rtl8192eu/1.0
echo "blacklist rtl8xxxu" | sudo tee /etc/modprobe.d/rtl8xxxu.conf
echo -e "8192eu\n\nloop" | sudo tee /etc/modules
echo "options 8192eu rtw_power_mgnt=0 rtw_enusbss=0" | sudo tee /etc/modprobe.d/8192eu.conf
sudo update-grub; sudo update-initramfs -u
systemctl reboot -i
@p3jitnath
p3jitnath / cuda-setup.sh
Last active November 26, 2021 21:42
Setup CUDA in Ubuntu 20.04 LTS
# Nvidia Driver installation
sudo apt install nvidia-driver-440
sudo reboot
# CUDA installation
sudo apt update
sudo apt install nvidia-cuda-toolkit # Focal: version 10.1
nvcc --version
# Download cuDNN from Nvidia: https://developer.nvidia.com/rdp/cudnn-download for version 10.1
from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession
config = ConfigProto()
config.gpu_options.allow_growth = True
session = InteractiveSession(config=config)
import tensorflow.compat.v1 as tf # Tensorflow 2.0 support for 1.x
os.environ['TF_CPP_MIN_LOG_LEVEL'] = 2
import os
DIRECTORY = 'mox_voc/'
ANNOTATION_PATH = 'MOXA/Annotations/'
IMAGES_PATH = 'MOXA/JPEGImages/'
EXTENSION = 'xml' # 'txt
NAME = 'MOXA'
# file_names = os.listdir(DIRECTORY)[:10]
file_names = os.listdir(DIRECTORY)
@p3jitnath
p3jitnath / opencv-4.2.0-cuda-10.1-Ubuntu-20.04.md
Last active May 15, 2024 10:11
Step-by-Step Guide to build OpenCV 4.2.0 with CUDA 10.1 on Ubuntu 20.04

How to install OpenCV 4.2.0 with CUDA 10.1 on Ubuntu 20.04 LTS (Focal Fossa)

Install updates and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Install required libraries:

@p3jitnath
p3jitnath / coco.data
Last active May 13, 2020 02:01
Google Cloud Configuration to train YOLO
classes=80
train=coco/trainvalno5k.txt
valid=coco/testdev2017.txt
names=data/coco.names
backup=backup/
eval=coco
This file has been truncated, but you can view the full file.
/home/user/darknet/coco/test2017/000000466319.jpg
/home/user/darknet/coco/test2017/000000523573.jpg
/home/user/darknet/coco/test2017/000000308929.jpg
/home/user/darknet/coco/test2017/000000057540.jpg
/home/user/darknet/coco/test2017/000000579853.jpg
/home/user/darknet/coco/test2017/000000413171.jpg
/home/user/darknet/coco/test2017/000000296903.jpg
/home/user/darknet/coco/test2017/000000540552.jpg
/home/user/darknet/coco/test2017/000000186384.jpg
/home/user/darknet/coco/test2017/000000509990.jpg
@p3jitnath
p3jitnath / install-vscode.sh
Created May 15, 2020 21:17
Install VSCode in Ubuntu 20.04 LTS
sudo apt update
sudo apt install software-properties-common apt-transport-https wget
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt install code
@p3jitnath
p3jitnath / configure-ssh.sh
Last active May 15, 2020 21:24
Configure SSH
ssh-keygen
ssh-copy-id username@host
# OR
cat ~/.ssh/id_rsa.pub | ssh username@host "mkdir -p ~/.ssh && touch ~/.ssh/authorized_keys && chmod -R go= ~/.ssh && cat >> ~/.ssh/authorized_keys"
# Check your GitHub SSH
ssh -T [email protected]
@p3jitnath
p3jitnath / install-docker.sh
Last active December 21, 2024 09:19
Docker and Nvidia Docker installation in Ubuntu 20.04 LTS
# WARNING : This gist in the current form is a collection of command examples. Please exercise caution where mentioned.
# Docker
sudo apt-get update
sudo apt-get remove docker docker-engine docker.io
sudo apt install docker.io
sudo systemctl start docker
sudo systemctl enable docker
docker --version