-
get sudo
-
get linux version
nvidia-smi: highest cuda supportable installed
uname -smr: linux version
cat /etc/os-release: system version
''' | |
AdaIN | |
url: https://gist.github.com/Kei-jan/2cb4200ca0a5d136ed72c03a929e353c | |
usage: | |
normalized_feat = adaptive_instance_normalization(content_feat, style_feat) | |
content_feat: Tensor[B,C,*,] | |
style_feat: Tensor[B,C,*] | |
normalized_feat: Tensor[B,C,*] (equal to content_feat) |
def type2type(sourcepath:str,savepath:str,sourcetype:str,savetype:str): | |
''' | |
See sub-files | |
sourcepath: | |
''' | |
pass | |
from tqdm import tqdm | |
import time | |
for i in tqdm(range(100)): | |
for j in tqdm(range(100)): | |
tqdm.write(f'epoch{j}\nwithin{i}') | |
#tqdm.external_write_mode(print("Epoch: {}",i)) | |
time.sleep(1) | |
# note : use f string has the better use of tqdm.write method as this could escape from the error happens when wanna print structuralized string with args. |
import matplotlib.pyplot as plt | |
import random | |
import matplotlib | |
import numpy as np | |
def generate_random_decimal_list(x): | |
return [round(random.uniform(0, 1), 4) for _ in range(x)] | |
#matplotlib.rc('font', family='SimHei', weight='bold') | |
rsync -avz -e "ssh -p [port]" /path/to/source/ user@ipaddress:/path/to/target/ |
#!/bin/bash | |
# Set the environment variable | |
HF_ENDPOINT="https://hf-mirror.com" | |
# Define the maximum number of retries, e.g., retry up to 5 times | |
MAX_RETRIES=5 | |
RETRIES=0 | |
# Loop until we either succeed or reach the maximum number of retries |