Create a huggingface token
Put it in the repo secrets with name like HF_TOKEN
in related Github repo setitngs:
- https://github.com/<user_name>/<repo_name>/settings/secrets/actions
Run following commands in the git root folder:
Create a huggingface token
Put it in the repo secrets with name like HF_TOKEN
in related Github repo setitngs:
Run following commands in the git root folder:
sudo su
bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)
Thanks @NINOMAE1995 very much!
#%% | |
from PyPDF2 import PdfReader | |
from iteration_utilities import deepflatten | |
class PdfTocProcessor: | |
def __init__(self): | |
self.fn = "新媒体蓝皮书2022 - 带书签.pdf" | |
self.reader = PdfReader(self.fn) | |
self.page_num = len(self.reader.pages) | |
self.outline = self.reader.outline |
See this link before you really want to install pure Python by yourself instead of miniconda:
pyenv install <version>
connect to python.org time out
Hansimov/proxies.md
Download pyenv-installer and run it:
Get current time:
sudo date -s "29 Nov 2023 11:25:00+08:00"
import datetime | |
import functools | |
import inspect | |
import logging | |
import os | |
import shutil | |
import subprocess | |
from termcolor import colored | |
# TMUX Guide | |
# https://tmuxguide.readthedocs.io/en/latest/tmux/tmux.html#tmux-conf | |
# tmux(1) - Linux manual page | |
# https://man7.org/linux/man-pages/man1/tmux.1.html#FORMATS | |
# 256 Colors - Cheat Sheet - Xterm, HEX, RGB, HSL | |
# https://www.ditig.com/256-colors-cheat-sheet | |
# kill tmux process (if stuck) with following commands | |
# ps aux | grep tmux | |
# kill -9 <pid> |
Following this guide
Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg