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
alias aget="aria2c -c -s 16 -x 16 -k 1M -j 16" |
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 re | |
import io | |
import chess.pgn | |
import requests | |
url = "https://lichess.org/onwfe9NcyG6W" | |
response = requests.get(url) | |
html = response.text | |
pgn_string = re.findall(r'<div class="pgn">(.*?)</div>', html, re.S)[0] | |
# print(game_pgn) |
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 os | |
from os import listdir | |
from os.path import isfile, join | |
current_dir = os.getcwd() | |
output_dir = os.path.join(current_dir, "out") | |
try: | |
os.makedirs(output_dir) | |
except: | |
pass |
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/env/bin python3 | |
# -*- coding: utf-8 -*- | |
# 读取系统文件用 | |
import sys | |
# base64 编码 | |
import base64 | |
# 网络请求库 | |
import requests | |
# 枚举类型 |
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 os | |
import mysql.connector | |
# edit this to your database | |
mydb = mysql.connector.connect( | |
host="localhost", | |
user="root", | |
password="example", | |
database="example", | |
) |
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/env/bin python3 | |
# -*- coding: utf-8 -*- | |
import os | |
import chess | |
import chess.pgn | |
import chess.svg | |
PGN_FILE_PATH = "./sample.pgn" |
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
version: '3' | |
services: | |
mysql: | |
image: mysql:latest | |
container_name: dev_mysql | |
restart: always | |
ports: | |
- "3306:3306" | |
volumes: |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"gorm.io/datatypes" | |
"gorm.io/driver/sqlite" | |
"gorm.io/gorm" | |
) |
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/env/bin python3 | |
# -*- coding: utf-8 -*- | |
import sys | |
import base64 | |
import requests | |
from enum import Enum | |
from PyQt5 import QtCore | |
from PyQt5.QtGui import QPixmap | |
from PyQt5.QtCore import QSize, pyqtSlot |
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
package ai | |
func Ai(q string) string { | |
if q == "你好" { | |
return "你好" | |
} else { | |
return "对不起,您输入的内容中包含敏感内容,根据相关法律法规,无法给出答复。" | |
} | |
} |
NewerOlder