Skip to content

Instantly share code, notes, and snippets.

View jgwill's full-sized avatar

Guillaume Descoteaux-Isabelle jgwill

View GitHub Profile
@jgwill
jgwill / 05-init-linux-infrastructure.sh
Last active July 8, 2023 16:34
giaupscayl-prototyping-2307-infraless
input_file=test-img-lowres.jpg
output_base=_test-img-lowres-upres-gia
model_name="realesrgan-x4plus-anime"
#Init
sudo mkdir -p -m 777 /repos
cd /repos && git clone https://github.com/GuillaumeAI/giar-Real-ESRGAN.git \
&& cd giar-Real-ESRGAN
@jgwill
jgwill / gia-upscayler-env-setup.README.md
Last active June 12, 2023 19:07
gia-upscayler-env-setup @stcgoal Experimental attempt to package a Generative Adversarial Networking to Uprez Images

Installation

Env

conda create -n py310ESRGAN python=3.10 anacond

Activate

@jgwill
jgwill / vscode.README.md
Last active June 9, 2023 16:15
Terminal with Conda activating specific environment

Terminal with Conda activating specific environment

Specifically

"Conda PS 7 py310ESRGAN": {
      "path": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
      "args": ["-NoExit","-Command"," C:\\usr\\local\\anaconda\\shell\\condabin\\conda-hook.ps1 ; conda activate py310ESRGAN"]
    },
@jgwill
jgwill / rm-parenthesis-in-files-renamer.sh
Created December 28, 2022 03:41
Bash Rename files with parenthesis and remove them
cdir=$(pwd);for d in $(cat _dist.txt);do cd $d;for f in *;do echo $f;fx1=${f//\(/_};fx=${fx1//\)/};mv "$f" "$fx";done;cd $cdir;done
@jgwill
jgwill / dk-extract-apt-package
Created December 13, 2022 03:56
Extract what apt package are in the Dockerfile
cat Dockerfile.tmp | \
sed 's/\# RUN/#ABC/g' | \
sed 's/\#RUN/#ABC/g'| awk '/RUN apt/' | \
sed 's/RUN apt-get -y install//g' | \
sed 's/RUN apt-get install -y//g' | \
awk '/RUN apt/' | \
sed 's/RUN apt -y install//g' | \
sed 's/RUN apt install -y//g' | \
sed 's/--fix-missing//g'
##>> Dockerfile
@jgwill
jgwill / json.lua
Created November 13, 2022 01:43 — forked from tylerneylon/json.lua
Pure Lua json library.
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.
@jgwill
jgwill / 00-odinsr-awk-create-tailer.sh
Last active November 9, 2022 21:15
Odin SR -Create tailer
#!/bin/bash
cat _srrun_221109.sh | awk '/ bg/ { print "tail -f conf/logs/"$2".log &" }'
@jgwill
jgwill / 00-ocireg__ast__install-220429.sh
Last active April 30, 2022 02:04
Install AST on Windows for ocireG 220429
docker pull guillaumeai/server:ast-210606-singleone-v1-dev
@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