Skip to content

Instantly share code, notes, and snippets.

View jgwill's full-sized avatar

Guillaume Descoteaux-Isabelle jgwill

View GitHub Profile
@jgwill
jgwill / 00-gaia-cuda-install-220410-gpu-on-WSL
Last active April 10, 2022 09:48
x to run GPU NVIDIA on Gaia Windows - @stcgoal WSL GPU AST Training
# Inspired from :https://ubuntu.com/tutorials/enabling-gpu-acceleration-on-ubuntu-on-wsl2-with-the-nvidia-cuda-platform#3-install-nvidia-cuda-on-ubuntu
# Notes: the steps did not worked as written
# here is my order:
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.4.0/local_installers/cuda-repo-wsl-ubuntu-11-4-local_11.4.0-1_amd64.deb
#!/bin/bash
# This script will have what I love on Ubuntu so I could share and quickly install that on a new workstation/server machine.
# Screenshooting and annotating + sharing
apt install flameshot -y
## Pretty cool screenshot and annotation that you can quickly share to IMGUr
@jgwill
jgwill / jgwill-docker-node-210131-install.sh
Last active January 31, 2021 16:57
jgwill/node - Docker package installer running in the build script of the container
npm i node-gip --y
npm i ginol --g
npm i gixb --g
npm i miur --g
@jgwill
jgwill / gfs-git-dup.sh
Created January 24, 2021 04:54
Duplicate GIT branching - branch a file to a new one and keep the original using the same data in the repo so they wont be stored twice
#!/bin/bash
dupsrc=$1
newname=$2
branchname="dup-$dupsrc-$newname"
git checkout -b $branchname
git mv "$dupsrc" "$newname"
git commit . -m "dup:mv $dupsrc $newname"
@jgwill
jgwill / 00-git-dup-file-2101082331.md
Last active January 9, 2021 04:55
Branch copy-merge strategy for GIT to duplicate file that uses the same source in the repo

Branch copy-merge strategy for GIT to duplicate file that uses the same source in the repo

# I RAN BRANCHING twice with theses two dir with few operation at the end
export targetdir=gia-young-picasso-v05-2101082232
export srcdir1=gia-young-picasso-v05-add
export srcdir2=gia-young-picasso-v03-201216

## BRANCHING
for srcdir in $srcdir1 $srcdir2; do
@jgwill
jgwill / bash_aliases__hawk.sh
Created January 7, 2021 11:47
@stcgoal Enhance existing linux output commands (History)
#@STCGoal Enhance existing linux output commands
alias hawk="history | awk '// { print \$2\" \"\$3\" \"\$4\" \"\$5\" \"\$6\" \"\$7\" \"\$8\" \"\$9\" \"\$10\" \"\$11\" \"\$12\" \"\$13\" \"\$14\" \" }
## INSTALL
### ADD to .bash_aliases in $HOME
vi $HOME/.bash_aliases
@jgwill
jgwill / Can we tar achive via SSH? 201223171246.md
Last active December 23, 2020 23:41
Can we tar achive via SSH? 201223171246

#Can we tar achive via SSH?

YES

This script does :

  • connect to the host
  • change dir to the desired
  • extract into local dir desired
@jgwill
jgwill / gia-replicate-ref2012231720.pl
Created December 23, 2020 22:38
@stcissue How do you manage machine learning learning states adequately ?
import torch
import replicate
def train():
# Save training code and hyperparameters
experiment = replicate.init(path=".", params={...})
model = Model()
for epoch in range(num_epochs):
# ...
@jgwill
jgwill / bash-for-f-append-suffix.sh
Last active December 16, 2020 11:09
BASH Script appending suffix to each file in current dir to a target dir 2012160339 & related
td=/a/lib/results/_comparer_it-135k-300k-model_gia-young-picasso-201210_new
ext=jpg
suffix="-300k"
for f in x*1k* ; do ft=${f%.*} ;echo "cp $f $td/$ft$suffix.$ext" ; done
@jgwill
jgwill / remote-x11-bashrc-autoset-display.md
Created December 6, 2020 01:44
Remote X11 Forwarding - An auto setting of the SSH (remote) IP as a target for the display

Remote X11 Forwarding - An auto setting of the SSH (remote) IP as a target for the display

Add to .bashrc

export myip=$(export myipis=$(last | grep "still logged" | awk '/still/ { print $3 }') ; echo $myipis | awk '// { print $1 }')
export DISPLAY=$myip:0.0