This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip | |
unzip -qq -n ngrok-stable-linux-amd64.zip | |
apt-get install -qq -o=Dpkg::Use-Pty=0 openssh-server pwgen > /dev/null | |
echo root:$password | chpasswd | |
mkdir -p /var/run/sshd | |
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config | |
echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config | |
echo "LD_LIBRARY_PATH=/usr/lib64-nvidia" >> /root/.bashrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -eq 0 ]; then | |
echo "Usage: $0 <magnet_link>" | |
exit 1 | |
fi | |
magnet_link="$1" | |
transmission-cli --download-dir=/content/ "$magnet_link" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install transmission-cli -y | |
curl -fsSL https://code-server.dev/install.sh | sh | |
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list && sudo apt update && sudo apt install ngrok |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz | |
tar zxf ngrok-v3-stable-linux-amd64.tgz | |
./ngrok config add-authtoken $1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rsync -axvH --no-g --no-p $1 $2 | |
#rsync -axvH --no-g --no-p $HOME/mae $HOME/projects/def-amiilab/$USER/ is an EXAMPLE | |
#code is same for project to home/ | |
#using this doesn't change the gid from project group to user group. project group always has more storage | |
#see https://docs.alliancecan.ca/wiki/Frequently_Asked_Questions#Moving_files_between_scratch_and_home_filesystems |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VERSION=$1 | |
mkdir -p ~/.local/lib ~/.local/bin | |
curl -fL https://github.com/coder/code-server/releases/download/v$VERSION/code-server-$VERSION-linux-amd64.tar.gz | tar -C ~/.local/lib -xz | |
mv ~/.local/lib/code-server-$VERSION-linux-amd64 ~/.local/lib/code-server-$VERSION | |
rm ~/.local/bin/code-server | |
ln -s ~/.local/lib/code-server-$VERSION/bin/code-server ~/.local/bin/code-server | |
PATH="~/.local/bin:$PATH" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(base) β [ucalyptus@ucalyptus ~] β aplay /usr/share/sounds/alsa/Front_Center.wav | |
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono | |
(base) β [ucalyptus@ucalyptus ~] β sudo aplay -l | |
[sudo] password for ucalyptus: | |
**** List of PLAYBACK Hardware Devices **** | |
card 0: PCH [HDA Intel PCH], device 0: ALC3246 Analog [ALC3246 Analog] | |
Subdevices: 0/1 | |
Subdevice #0: subdevice #0 | |
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0] | |
Subdevices: 1/1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run this below line in terminal without the ! | |
!pip install instagrapi | |
###### | |
from instagrapi import Client | |
cl = Client() | |
PROXY = "139.59.1.14:1080" #@param{type:"string"} | |
CRITERIA = "socks5" #@param ["https","http","socks5"] | |
#cl.set_proxy("{CRITERIA}://USERNAME:PASSWORD@{PROXY}") if you need a proxy , use this or else use the below line | |
cl.login("USERNAME", "PASSWORD") | |
from pathlib import Path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fastai | |
from deoldify.visualize import * | |
import warnings | |
warnings.filterwarnings("ignore", category=UserWarning, message=".*?Your .*? set is empty.*?") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NOTE: This must be the first call in order to work properly! | |
from deoldify import device | |
from deoldify.device_id import DeviceId | |
#choices: CPU, GPU0...GPU7 | |
device.set(device=DeviceId.GPU0) | |
import torch | |
if not torch.cuda.is_available(): | |
print('GPU not available.') |