int
整型。任意大小的整数,支持多种进制。0b100
二进制0o100
八进制0x100
十六进制
float
浮点型。支持数学写法123.456
和科学计数写法1.234e5
str
字符串型。- 一般用单引号
'
或双引号"
包住
- 一般用单引号
- 使用
\
转义引号,或者使用与字符串内引号不同的引号
Download https://github.com/yuk7/ArchWSL/releases/download/20.4.3.0/Arch.zip
# nano /etc/pacman.d/mirrorlist
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/sh | |
# https://github.com/lengthmin/lengthm.in | |
# set authorized_keys | |
# curl lengthm.in/keys.sh | sh | |
exists() { | |
command -v "$1" >/dev/null 2>&1 | |
} |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
### | |
# proxy for wsl2 | |
# run this after modification | |
# source ~/.bashrc | |
alias wslproxy="source /home/tingle/.proxy.sh" |
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 mkdir -p /etc/docker | |
sudo tee /etc/docker/daemon.json <<-'EOF' | |
{ | |
"registry-mirrors": [ | |
"https://kxqx9fw7.mirror.aliyuncs.com", | |
"https://hub-mirror.c.163.com", | |
"https://mirror.baidubce.com", | |
"http://f1361db2.m.daocloud.io" | |
] | |
} |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
获取免费游戏的网络请求方式来自 RSSHub /epicgames 路由 | |
https://github.com/DIYgod/RSSHub/blob/master/lib/routes/epicgames/index.js | |
处理免费游戏的信息方法借鉴 pip 包 epicstore_api 示例 | |
https://github.com/SD4RK/epicstore_api/blob/master/examples/free_games_example.py |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import os | |
from PIL import Image | |
# 所有待替换的前缀规则,文件名应类似于:talent.Mondstadt.png talent.Mondstadt.1.png weapon.Liyue.5.png talent.Inazuma.3.png | |
startFlags = ['talent.Mondstadt', 'weapon.Mondstadt', 'talent.Liyue', 'weapon.Liyue', 'talent.Inazuma', 'weapon.Inazuma'] | |
# 建议将此文件存至图片集同文件夹内 |
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
import nonebot | |
from nonebot import require | |
from nonebot.adapters.cqhttp import Bot, Message | |
from nonebot.adapters.cqhttp.event import MessageEvent | |
from nonebot.log import logger | |
from nonebot.plugin import on_command | |
from nonebot.typing import T_State | |
import time | |
from playwright.async_api import async_playwright |
OlderNewer