This file contains 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
from datasets import load_dataset | |
from transformers.pipelines.pt_utils import KeyDataset | |
from transformers import pipeline as pipesetup | |
import tqdm | |
import jiwer | |
# Use a streaming dataset | |
fleurs = load_dataset("google/fleurs", "bn_in", split="train", streaming=True) | |
# Get an iterator for the dataset |
This file contains 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 | |
function sync_files { | |
input_dir=$1 | |
password=$2 | |
outdir=$3 | |
host=$4 | |
sudo apt install sshpass -y | |
rsync -ratlz --rsh="/usr/bin/sshpass -p $password ssh -o StrictHostKeyChecking=no -l cyan21" --ignore-existing --progress -r $input_dir cyan21@$host.computecanada.ca:$outdir --exclude='/.git' --filter=':- .gitignore' |
This file contains 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
filename | pred | |
---|---|---|
508 | female | |
921 | male | |
778 | female | |
324 | male | |
406 | male | |
424 | male | |
929 | female | |
189 | female | |
795 | female |
This file contains 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
curl -fsSL https://code-server.dev/install.sh | sh | |
# Use sed to modify bind-addr | |
sed -i 's/^bind-addr:.*$/bind-addr: 127.0.0.1:4040/' ~/.config/code-server/config.yaml | |
# Use sed to modify password | |
sed -i 's/^password:.*$/password: s/' ~/.config/code-server/config.yaml | |
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 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
Sayantan Das | |
Email: sayantan.das@queensu.ca GitHub: //ucalyptus | |
Alternate Email: sdas.codes@gmail.com LinkedIn: //ucalyptus | |
Research interests Artificial Intelligence, Machine Learning, Deep Learning, Computer Vision. |
This file contains 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
get_ipython().system_raw('/usr/sbin/sshd -D &') | |
print("Copy authtoken from https://dashboard.ngrok.com/auth") | |
import getpass |
This file contains 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 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 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 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 |
NewerOlder