Skip to content

Instantly share code, notes, and snippets.

@shwu-nyunai
shwu-nyunai / treelike.py
Created June 20, 2024 15:49
Prints tree structure given a path/str
class PrintUtils:
res = ""
@staticmethod
def DIR_KEY(x): return f'+ {x.name}/'
@staticmethod
def FILE_KEY(x): return f'- {x.name}'
@staticmethod
@shwu-nyunai
shwu-nyunai / update-cmake.sh
Last active April 21, 2024 17:06
Update cmake
# Remove any existing CMake installation
echo "Removing existing CMake installation..."
sudo apt remove cmake -y
# Install build-essential package
echo "Installing build-essential package..."
sudo apt-get install build-essential
# Download CMake 3.2.2 source code
echo "Downloading CMake 3.2.2 source code..."
@shwu-nyunai
shwu-nyunai / install-tgi.sh
Last active April 22, 2024 12:47
Install TGI
# docker pull ghcr.io/huggingface/text-generation-inference:latest
# install cmake v3.2
# sudo apt remove cmake -y
# sudo rm -rf kineto
# sudo rm -rf cmake-3.29.2.tar.gz cmake-3.29.2/
sudo rm -rf text-generation-inference/
tree -L 3
# install openssl
@shwu-nyunai
shwu-nyunai / download-coco-dataset.sh
Created April 18, 2024 10:04
Download COCO dataset
# Create the coco directory and cd into it
mkdir coco
cd coco
# Create the images directory and cd into it
mkdir images
cd images
# Download the dataset zip files in parallel
wget http://images.cocodataset.org/zips/train2017.zip &
@shwu-nyunai
shwu-nyunai / install-nvtop.sh
Last active June 14, 2024 09:06
Installs nvtop
wget https://github.com/Syllo/nvtop/releases/download/3.1.0/nvtop-x86_64.AppImage
chmod u+x nvtop-x86_64.AppImage
# update bashrc
echo 'alias nvtop="~/nvtop-x86_64.AppImage"' >> ~/.bashrc
source ~/.bashrc
# Enjoy nvtop
nvtop