LiuShen / 解决Matplotlib不显示汉字的问题
0 likes
0 forks
1 files
Last active 2 years ago
解决Matplotlib不显示汉字的问题,设置汉语字体
| 1 | import matplotlib.pyplot as plt |
| 2 | import matplotlib.font_manager as fm |
| 3 | |
| 4 | # 设置中文字体 |
| 5 | plt.rcParams['font.sans-serif'] = ['SimHei'] # 使用黑体 |
| 6 | plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 |
| 7 | |
| 8 | # 示例数据 |
| 9 | x = [1, 2, 3, 4] |
| 10 | y = [10, 20, 15, 25] |
LiuShen / cloudflare worker转发ghcr.io
0 likes
0 forks
2 files
Last active 2 years ago
使用worker转发,加速国内拉取速度
| 1 | <!DOCTYPE html> |
| 2 | <html lang="zh-CN"> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 6 | <title>V2镜像使用说明</title> |
| 7 | <style> |
| 8 | body { |
| 9 | font-family: 'Roboto', sans-serif; |
| 10 | margin: 0; |
LiuShen / CloudFlare反向代理Jsdelivr
0 likes
0 forks
1 files
Last active 2 years ago
可以设置自己的主页,加快国内Jsd速度,可以作为CDN源站
| 1 | const upstream = 'cdn.jsdelivr.net' |
| 2 | const upstream_mobile = 'cdn.jsdelivr.net' |
| 3 | |
| 4 | const blocked_region = ['KP', 'RU'] |
| 5 | const blocked_ip_address = ['0.0.0.0', '127.0.0.1'] |
| 6 | |
| 7 | const replace_dict = { |
| 8 | '$upstream': '$custom_domain', |
| 9 | '//cdn.jsdelivr.net': '' |
| 10 | } |
LiuShen / 多xlsx互评结果中取平均
0 likes
0 forks
1 files
Last active 2 years ago
将互评的结果,去掉最高,去掉最低,保留中间部分并求平均数
| 1 | import openpyxl |
| 2 | import numpy as np |
| 3 | |
| 4 | # 定义数据范围 |
| 5 | data_range = "C5:R39" |
| 6 | |
| 7 | # 定义源文件名称数组 |
| 8 | source_files = ["./1.xlsx", "./2.xlsx", "./3.xlsx", "./4.xlsx", "./5.xlsx", "./6.xlsx", "./7.xlsx", "./8.xlsx", "./9.xlsx"] |
| 9 | |
| 10 | # 定义目标文件名称 |
Newer
Older