提交 b5bdfb7d 编写于 作者: H hypox64

add WindowsTerminal-setting.md

上级 8b8b9e0c
......@@ -143,11 +143,11 @@ WORKERS = int((input("cpu_workers(defult=4):").strip()).replace("'",""))
EXTEND = 1.6
Del_Blur_Score = 20 # normal-> 20 | clear -> recommed 50
IS_random_EXTEND = False
MODEL = 'cnn' # 'hog' | 'cnn'
MODEL = 'hog' # 'hog' | 'cnn'
SAVE_MASK = True
MASK_TYPE = 'rect' # rect | contour
HIGH_MASK = 0.2 # more vertical mask
LOADSIZE = 512 # load to this size and process
LOADSIZE = 1024 # load to this size and process
outdir='./output/'+outname
......
```json
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"globals": {
"alwaysShowTabs": true,
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols": 80,
"initialRows": 25,
"keybindings": [
{
"command": "closeTab",
"keys": [
"ctrl+w"
]
}
],
"requestedTheme": "system",
"showTabsInTitlebar": true,
"showTerminalTitleInTitlebar": true
},
"profiles": [
{
"acrylicOpacity": 0.5,
"closeOnExit": true,
"colorScheme": "Campbell",
"commandline": "powershell.exe",
"cursorColor": "#FFFFFF",
"cursorShape": "bar",
"fontFace": "Hack",
"fontSize": 13,
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"historySize": 9001,
"icon": "ms-appx:///ProfileIcons/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
"name": "Windows PowerShell",
"padding": "0, 0, 0, 0",
"snapOnInput": true,
"startingDirectory": "%Workspaces%",
"useAcrylic": true
},
{
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": false,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure"
}
],
"schemes": [
{
"background": "#0C0C0C",
"black": "#0C0C0C",
"blue": "#0037DA",
"brightBlack": "#767676",
"brightBlue": "#3B78FF",
"brightCyan": "#61D6D6",
"brightGreen": "#16C60C",
"brightPurple": "#B4009E",
"brightRed": "#E74856",
"brightWhite": "#F2F2F2",
"brightYellow": "#F9F1A5",
"cyan": "#3A96DD",
"foreground": "#CCCCCC",
"green": "#13A10E",
"name": "Campbell",
"purple": "#881798",
"red": "#C50F1F",
"white": "#CCCCCC",
"yellow": "#C19C00"
}
]
}
```
PowerShell 中激活anaconda的虚拟python环境
```shell
conda install -n root -c pscondaenvs pscondaenvs
```
以管理员身份启动PowerShell,并执行
```shell
Set-ExecutionPolicy RemoteSigned
```
注意激活时不要加conda,直接activate env就ok
\ No newline at end of file
......@@ -25,6 +25,27 @@ $ umount /dev/hda2
$ umount /usr
#参数可以是设备文件或安装点
```
### linux应用设置
* 百度盘
```bash
# 无法登录
rm -rf ~/baidunetdisk #这个蛇皮的bug不知道啥时候才能修复
```
* goldendict
```bash
# 安装
sudo apt install goldendict
sudo apt install goldendict gawk
# 添加谷歌翻译
git clone https://github.com/soimort/translate-shell
cd translate-shell/
make
sudo make install
```
打开GoldenDict,【编辑】-【词典】-【词典来源】-【程序】,点击【添加】,勾上【已启用】,填写【类型】Html 和【名称】Google,在【命令行】中输入
```
trans -e google -s auto -t zh-CN -show-original y -show-original-phonetics n -show-translation y -no-ansi -show-translation-phonetics n -show-prompt-message n -show-languages y -show-original-dictionary n -show-dictionary n -show-alternatives n ''%GDWORD%''
```
### shell 中运行基本应用
```bash
nautilus #文件管理器
......
......@@ -12,6 +12,20 @@ if __name__ == '__main__':
```python
for i,file in enumerate(files,0):
```
### sort
```python
'''
对列表进行排序并相应地更改另一个列表
我有两个列表:一个包含一组x点,另一个包含y点。Python以某种方式管理x点,或用户可以。我需要按照从最低到最高的顺序对它们进行排序,并且移动y点以跟随它们的x个对应点。
'''
>>> xs = [5, 2, 1, 4, 6, 3]
>>> ys = [1, 2, 3, 4, 5, 6]
>>> xs, ys = zip(*sorted(zip(xs, ys)))
>>> xs
(1, 2, 3, 4, 5, 6)
>>> ys
(3, 2, 6, 4, 1, 5)
```
### read and write txt
* read
```python
......@@ -230,7 +244,7 @@ args , _ = parse.parse_known_args(sys.argv[1:])
SAVEDIR = args.savedir
```
## numpy
* zeros
* zeros/ones
```python
np.zeros(shape, dtype=float, order='C')
'''
......@@ -246,7 +260,21 @@ u,unicode,u24
```python
a.tolist()
```
* .dtype .shape .astype .reshape
```python
a.dtype #查看数据类型
a.shape #查看形状
a.astype #修改数据类型
a.reshape #修改形状
```
* 根据某一列进行排序
```python
#按照数组的第一列进行排序
data = data[np.argsort(data[:,0])]
```
## pyinstaller
```bash
pyinstaller test.py-F
```
......
......@@ -38,7 +38,9 @@ def get_cpu_freq():
# Cpu freq
def get_cpu_temp():
if os.path.isfile('/sys/class/hwmon/hwmon0/device/hwmon/hwmon0/temp1_input'):
if os.path.isfile('/sys/class/thermal/thermal_zone0/temp'):
temp_str = os.popen('cat /sys/class/thermal/thermal_zone0/temp').read()
elif os.path.isfile('/sys/class/hwmon/hwmon0/device/hwmon/hwmon0/temp1_input'):
temp_str = os.popen('cat /sys/class/hwmon/hwmon0/device/hwmon/hwmon0/temp1_input').read()
elif os.path.isfile('/sys/class/hwmon/hwmon0/device/hwmon0/temp1_input'):
temp_str = os.popen('cat /sys/class/hwmon/hwmon0/device/hwmon0/temp1_input').read()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册