Skip to content

Instantly share code, notes, and snippets.

View vinesmsuic's full-sized avatar
💸
Fly, My Wings

Max Ku vinesmsuic

💸
Fly, My Wings
View GitHub Profile
@vinesmsuic
vinesmsuic / gist:8c9544da6a0e6d59d348b7764183db77
Created January 23, 2024 22:44
Fixing "The NVIDIA driver on your system is too old" issue
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
@vinesmsuic
vinesmsuic / script.sh
Created November 14, 2023 00:21
Only keep multiple folders with same file name. Align is the reference folder.
#!/bin/bash
# Define the path to your root folder
rootFolder="."
# Define the path to your input folder (folderA)
folderA="$rootFolder/align"
# Function to delete excess files and print file count
delete_excess_files () {
@vinesmsuic
vinesmsuic / script.sh
Created November 10, 2022 04:44
Batch convert HEIC to jpg on MacOS
for file in *.HEIC; do
echo "${file%.*}"
convert $file -resize "1920>" -quality 75 "${file%.*}.png"
done
@vinesmsuic
vinesmsuic / readme.md
Last active October 31, 2022 06:51
Check nvidia-smi every 0.5 second
watch -n 0.5 nvidia-smi
# alternatively
nvidia-smi -l 0.5
@vinesmsuic
vinesmsuic / readme.md
Last active April 6, 2022 09:35
download big files on Google Drive

Replace FILEID and FILENAME with id and filename (there are 2 FILEID and 1 FILENAME to replace)

wget – load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget – quiet – save-cookies /tmp/cookies.txt – keep-session-cookies – no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt

Problem

A lot of GitHub projects need to have pretty math formulas in READMEs, wikis or other markdown pages. The desired approach would be to just write inline LaTeX-style formulas like this:

$e^{i \pi} = -1$

Unfortunately, GitHub does not support inline formulas. The issue is tracked here.

Investigation

@vinesmsuic
vinesmsuic / note.sh
Created July 2, 2020 11:42
Python Install package
$ python -m pip install [package]
@vinesmsuic
vinesmsuic / InstallQT.md
Last active May 14, 2020 06:09
install QT on linux

Main Steps

sudo apt-get install build-essential

sudo apt-get install qtcreator

sudo apt-get install qt5-default

Note: The version you installed is 5.9.5.

@vinesmsuic
vinesmsuic / readme.md
Created February 12, 2020 05:58
Find my ~/.bashrc

For MacOS

$ cd /etc/; sudo nano bashrc

For Linux

$ gedit ~/.bashrc