This file contains hidden or 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/bash | |
| # path of program | |
| BIN= | |
| # command line args for $BIN | |
| OPTS= | |
| # description | |
| DESCRIPTION= | |
| cmd=$1 | |
| case $cmd in |
This file contains hidden or 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 -*- | |
| """ | |
| 三门问题 | |
| 数学上的解释: | |
| 此问题中有两个动作, 它们先后发生: A: "从 0,1,2 号门中随机选择一个", B: "主持人打开一扇门" |
This file contains hidden or 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
| # 配置文件优先级 | |
| # ./matplotlibrc | |
| # ~/.config/matplotlib/matplotlibrc | |
| # $PYTHONENV/Lib/site-packages/matplotlib/mpl-data/matplotlibrc | |
| font.family: Inziu Iosevka SC | |
| # 推荐使用 Inziu 系列字体 |
This file contains hidden or 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
| # Aria2 配置文件 | |
| # 需要保存在路径 ~/.aria2 之下 | |
| # 允许rpc | |
| enable-rpc=true | |
| # 允许所有来源 | |
| rpc-allow-origin-all=true | |
| # 允许非外部访问 | |
| rpc-listen-all=true | |
| # rpc 端口 |
This file contains hidden or 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
| """Vultr Ping Tests | |
| Example | |
| ======= | |
| >>> from vultr_ping import main_ping, show_ping | |
| >>> main_ping() | |
| >>> show_ping() | |
| """ |
This file contains hidden or 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 -*- | |
| from base64 import b64encode # 将图片编码为 Base64 | |
| import win32clipboard | |
| PNG_BASE64_TEMP = "data:image/png;base64,{code}" # 插入 data URL scheme 的模板 | |
| """复制文件, 从剪贴板 CF_HDROP 读取路径, 将其以二进制模式打开并编码为base64, 再存入系统剪贴板 CF_TEXT.""" |
This file contains hidden or 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
| print("进度:%4.2f%%"%(i/EXAM_COUNT*100), end='\r') |
NewerOlder