Skip to content

Instantly share code, notes, and snippets.

View pythongiant's full-sized avatar
🏠
Working from home

Srihari pythongiant

🏠
Working from home
View GitHub Profile
---- GIT STAT---
[alias]
# list files which have changed since REVIEW_BASE
# (REVIEW_BASE defaults to 'master' in my zshrc)
files = !git diff --name-only $(git merge-base HEAD \"$REVIEW_BASE\")
# Same as above, but with a diff stat instead of just names
# (better for interactive use)
stat = !git diff --stat $(git merge-base HEAD \"$REVIEW_BASE\")
@pythongiant
pythongiant / commands.sh
Created November 9, 2023 02:53
Commands for CUDA set up in Ubuntu EC2 instance
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 # Change this for you device
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
sudo apt-get update
sudo apt install cuda
# Reboot
echo 'export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}' >> ~/.bashrc
source ~/.bashrc
# Should be done now