save to txt:
my_list = responses[56]
with open('my_file2.txt', 'w', encoding="utf-8") as f:
for item in my_list:
f.write("%s\n" % item)
save to clipboard:
#!/bin/bash | |
### steps #### | |
# verify the system has a cuda-capable gpu | |
# download and install the nvidia cuda toolkit and cudnn | |
# setup environmental variables | |
# verify the installation | |
# https://gist.github.com/MihailCosmin/affa6b1b71b43787e9228c25fe15aeba | |
### |
save to txt:
my_list = responses[56]
with open('my_file2.txt', 'w', encoding="utf-8") as f:
for item in my_list:
f.write("%s\n" % item)
save to clipboard:
# use in a ipynb notebook | |
import os | |
from PIL import Image | |
from IPython.core.display import HTML, display as disp | |
import io | |
import base64 | |
# Disable truncating of text | |
pd.set_option('display.max_colwidth', None) |
import re | |
import json | |
from selenium import webdriver | |
def try_get_page(): | |
url = "https://bcy.net/illust/toppost100?type=week&date=20230612" | |
# You need to have the correct WebDriver executable (geckodriver for Firefox) in your PATH | |
driver = webdriver.Chrome() |
更新环境:
apt-get -y update && apt-get -y upgrade && apt-get -y install iftop libgl1
miniconda:
cd ~/
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -P miniconda.sh
bash miniconda.sh
#!/bin/bash | |
# Start the program | |
cd /root/webui | |
source /root/miniconda3/bin/activate /root/miniconda3/envs/py310 | |
python ~/webui/launch.py --lowram --no-half-vae --port 6006 --disable-console-progressbars --disable-safe-unpickle --api & pid=$! | |
# Wait for the program to start | |
while ! netstat -an | grep "LISTEN" | grep ":6006" > /dev/null; do | |
sleep 1 |