> For the complete documentation index, see [llms.txt](https://cifar.gitbook.io/note/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cifar.gitbook.io/note/ruan-jian-xue-xi-ri-ji.md).

# 软件学习日记

## 2022年

#### 多边形计算 iou

[帖子 ](https://stackoverflow.com/questions/61577406/how-to-calculate-the-iou-of-polygons-in-python/61578383#61578383)  [python](https://shapely.readthedocs.io/en/latest/manual.html)  [java](https://projects.eclipse.org/projects/locationtech.jts)  [github](https://github.com/locationtech/jts)

#### apache

[apache 服务重启](https://www.cnblogs.com/lvfish/p/10248835.html)

> 授权服务
>
> 1. docker ps
> 2. docker exec -it d138 /bin/bash
> 3. cd bin && ./apachectl restart

容器中启动nginx ，（默认没启动）<img src="/files/K5eUi2Zc81FckdetcKgi" alt="" data-size="line">

#### 010 Editor&#x20;

> 二进制以十六进制查看软件

#### 逆向工程软件

> frida ，dex2jar ,  Inspeckage

## 2021.第四季度

1、[Linux文件名后出现问号？](#2021.-jiu-yue)

2、现象 ：文件夹压缩后的压缩包太大，超过百度网盘限制4g

解决方案：拆包  [LINUX大文件分包压缩和批量解压命令TAR](https://www.cnblogs.com/sien6/p/8110567.html)    （windows 软件也可分包压缩）

3、[linux 下通过命令行操作百度网盘](https://www.cnblogs.com/dhqy/p/15945043.html)

4、linux和windowd  txt格式问题：[dos2unix](https://www.cnblogs.com/kerrycode/p/5077969.html)

## 2021.九月

### 9.30

[Nginx读取多个配置文件](https://blog.csdn.net/weixin_43912429/article/details/102526683)

### 9.8

[非对称加密 和 https](https://mp.weixin.qq.com/s/cU0sKl3PWn2eWUqrEV_fsg)

## 2021.八月

[vscode 无法连接远端服务器](https://blog.csdn.net/suixuejie/article/details/94724022)：服务端删除   rm -rf \~/.vscode-server&#x20;

> 服务器 用户密码是否被修改。 linux 用户密码 默认90天重置一次。

vscode自动保存：当失去焦点时

![](/files/-Mgnm-NCOFppJILzqkxd)

## 2021.六月

### 6.29

[解密m3u8/ts视频流](https://blog.csdn.net/floatinglong/article/details/105880489)

### 6.11

音频

&#x20;[波形展示](https://my.oschina.net/ahaoboy/blog/2962218)&#x20;

模拟信号是连续的，数字信号是离散的。&#x20;

数字信号是对模拟信号的采样。

&#x20;[音频处理基本知识](https://blog.csdn.net/Robin_Pi/article/details/112228917)

&#x20;[pydub字段解释](https://blog.csdn.net/Robin_Pi/article/details/109607764)&#x20;

[audioop开发者手册](https://cloud.tencent.com/developer/section/1369787)

&#x20;[Python对图片和音频进行格式检测、以及格式转换](https://www.cnblogs.com/traditional/p/12391872.html)

### 6.7

连接阿里云网络软件

&#x20;[Secure networking](https://openvpn.net/)

## 2021.五月

### 5.17

**opencv**

[opencv读取png](https://blog.csdn.net/weixin_32759777/article/details/109078802)&#x20;

[jpg添加通道](https://blog.csdn.net/qq_36387683/article/details/98768293)

### 5.14

[使用GPU硬件加速FFmpeg视频转码](https://www.jianshu.com/p/59da3d350488)

c++ [硬件加速解码](https://ffmpeg.org/doxygen/trunk/hw_decode_8c-example.html)

ffmpeg  [参数解释](https://www.hack520.com/668.html)

[ffmpeg 编译](https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu)

> ffmpeg 后面加上 -loglevel quiet

popen 取消输出，ffmpeg 输出

```python
cmder = 'ffmpeg -i {} -vf boxblur=3:1:cr=0:ar=0 -strict -2  {} '.format(img_path, save_img_path)
subprocess.Popen(cmder, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
```

### 5.13

**ffmpeg**

[高斯模糊](https://blog.csdn.net/hutianyou123/article/details/78126575)

&#x20;[调整视频颜色](https://www.it610.com/article/1294159435991687168.htm)

[十种图像模糊算法的总结与实现](https://zhuanlan.zhihu.com/p/125744132)

### 5.12

协同坚哥处理数据收获：

1、软删除 mv 到 bk 备份数据（比如：一个月以后手动删除。）&#x20;

2、C++ java 等多线程，cpu可以获知for循环执行多少次。比如64次，八个线程，每个线程即循环八次。

### 5.7

ls | grep R | wc -l

ll ll -h htop

```
ls -lR|grep ".mp4"|wc -l
```

## 2021.四月

### 4.28

春雨在装服务器时，他的操作

| 操作                      | 解释                                                           | 备注                                               |
| ----------------------- | ------------------------------------------------------------ | ------------------------------------------------ |
| 服务器安装 CentOs 而不是 Ubuntu | ubuntu自动更新，是我们不想要的                                           | 安装后 ubuntu 5g 左右，centos  3g 左右，文件多就可能有其他的东西，例如后门 |
| 增大 var 目录               | docker 目录，默认不修改的话，docker在这个文件夹                               | 服务器上部署很多docker 适合增大此目录                           |
| swap 交换                 | 当内存不够用时，从硬盘拿点用                                               | 一半装好系统后会手动关闭，也可以不用管                              |
| arm x86                 | <p>cpu 区别：指令集不同 <br> 功耗等arm占优势，省电等等其他方面  <br> arm 开源 ，国产</p> |                                                  |

### 4.27

python定时任务&#x20;

[APScheduler](https://www.cnblogs.com/xiao-xue-di/p/14081790.html) Advanced Python Scheduler

<https://blog.csdn.net/somezz/article/details/83104368> <https://www.cnblogs.com/henrytee/p/10976740.html> <https://www.deeplearn.me/2383.html> <https://www.pianshen.com/article/37861336408/>

可以采用装饰器的写法，更简洁

### 4.26

[流形学习的基本思想](https://www.zhihu.com/question/24015486)

&#x20;[AE脚本-三维透视多画面视频墙扭曲变形画轴效果](https://www.lookae.com/transformer-221/)

### 4.25

selenium&#x20;

driver = webdriver.Chrome() 问题

```
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 87
Current browser version is 90.0.4430.85 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
```

解决办法：下载对应chromedriver.exe 同自己浏览器同版本&#x20;

地址:<https://npm.taobao.org/mirrors/chromedriver/>&#x20;

并放在脚本当前目录（推荐），或者环境变量地址 place it in any location on their [PATH](https://en.wikipedia.org/wiki/PATH_%28variable%29) except for `%SYSTEMROOT%\System32` (e.g. **do not** put in `C:\Windows\System32`).

### 4.20

[base64原理](https://blog.csdn.net/weixin_42420703/article/details/81384901)

### 4.19

网站

&#x20;[零度解说](https://www.freedidi.com/)

&#x20;[孟坤工具箱](http://tool.mkblog.cn/)&#x20;

博客 学 Python 都用来干嘛的？ - 朱卫军的回答 - 知乎 <https://www.zhihu.com/question/34098079/answer/881335591>

### 4.16

写文晶[自定义logo检索](http://note.youdao.com/s/3nIG690z)的经验：&#x20;

1、能用绝对路径，就不要弄相对路径，可能存在莫名的bug。相对路径也会自动拼接成绝对路径，毕竟要知道文件在什么地方。程序运行的环境，需要读环境变量里的地址，也可以同等理解。寻址读值。&#x20;

2、windows 下opencv读取图片读不到，存在问题，在ubuntu 上不会。&#x20;

3、tmux 内的conda环境，存在和不适用tmux 窗口 环境问题。莫名bug，读取torch 问题&#x20;

4、工程操作（见图）调试 ![](https://upload-images.jianshu.io/upload_images/19407955-09a8276be8f8eafe.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

![](/files/-Md_7HrSDpgyh3ZZqGRq)

### 4.15

#### 工具网站

[个人信息生成](https://www.fakepersongenerator.com/) [wikihow](https://zh.wikihow.com/%E9%A6%96%E9%A1%B5) [临时邮箱](https://temp-mail.org/zh)

### 4.14

windows的沙箱就是 Vmware 虚拟机 Linux 的沙箱就是 docker 虚拟环境 python 的沙箱就是 conda 环境 可见沙箱机制何等重要，我现在想装solidwork 但是要动注册表，这我太害怕了，上次动注册表电脑被迫重装了，现在又动？不存在的，我有沙箱，虚拟一个没问题的话，再在本机装。

### 4.13

#### 爬虫

[在线api](https://api.apiopen.top/api.html)

**代理池**

[Python爬虫添加代理IP池](https://blog.csdn.net/weixin_41996197/article/details/89427121) [github](https://github.com/jhao104/proxy_pool)

**UserAgent**

解决浏览器 from fake\_useragent import UserAgent

**工程**

```python
解析返回message 中文编码问题
print(str(per_day_danmu_byte, encoding = "utf-8"))
```

### 4.7

这个windows应用<https://u.tools/>，比较好用

### 4.6

[B站用户](https://blog.csdn.net/Qwertyuiop2016/article/details/89226209)

## 2021.三月

### 3.31

**python 函数传参（受 3.30 函数装饰器启发）**

[decorated(*args, \**&#x6B;wargs)](https://eastlakeside.gitbook.io/interpy-zh/args_kwargs)

#### [python 进阶](https://eastlakeside.gitbook.io/interpy-zh/args_kwargs)

| 标志         | 解释            | 存储类型     | 解释                   | 备注                 |
| ---------- | ------------- | -------- | -------------------- | ------------------ |
| \*args     | 位置参数          | tuple 元组 | 接受传未知的位置参数           | 类型为 print（args）的类型 |
| \*\*kwargs | keyword 关键词参数 | dict 字典  | eg：a=3 接受传未知个数的关键词参数 |                    |

### 3.30

[Python 函数装饰器](https://www.runoob.com/w3cnote/python-func-decorators.html)

**笔记**

| 标题             | 学习笔记                                                                                                                                                                                                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 一切皆对象          | hi 变量  ；   hi() 带括号为hi函数调用                                                                                                                                                                                                                                                                      |
| 在函数中定义函数       | <p>无论何时你调用hi(), greet()和welcome()将会同时被调用。<br> 然后greet()和welcome()函数在hi()函数之外是不能访问的</p>                                                                                                                                                                                                          |
| 从函数中返回函数       | <p>其实并不需要在一个函数里去执行另一个函数，我们也可以将其作为输出返回出来  <br>   <code>a</code>现在指向到hi()函数中的greet()函数 <br>   在语句中我们返回 greet 和 welcome，而不是 greet() 和 welcome()  <br>  因为当你把一对小括号放在后面，这个函数就会执行；<br> 然而如果你不放括号在它后面，那它可以被到处传递，并且可以赋值给别的变量而不去执行它  <br>  我们还可以打印出 hi()()，这会输出 now you are in the greet() function。</p> |
| 将函数作为参数传给另一个函数 | doSomethingBeforeHi， 感觉装饰器就是hook 钩子函数                                                                                                                                                                                                                                                           |
| 蓝本规范           | 转到3.31号 ，python 传参  decorated(*args, \**&#x6B;wargs)                                                                                                                                                                                                                                            |

```python
from functools import wraps
def decorator_name(f):
    @wraps(f)
    def decorated(*args, **kwargs):
        if not can_run:
            return "Function will not run"
        return f(*args, **kwargs)
    return decorated

@decorator_name
def func():
    return("Function is running")

can_run = True
print(func())
# Output: Function is running

can_run = False
print(func())
# Output: Function will not run

# can_run 怎么传参：王士昂解释为函数先在args中寻找，发现没有，会去更上一层，全局变量中寻找，并取值
```

### 3.29

词云&#x20;

中文分词 jieba 英文分词 [nltk](https://blog.csdn.net/zhuzuwei/article/details/80484501)&#x20;

[python](https://www.jianshu.com/p/cf5c5b206633)&#x20;

[wordcloud安装方法（Windows10）](https://blog.csdn.net/weixin_45231460/article/details/104273699)

echarts版本 [echarts 词云](https://zhuanlan.zhihu.com/p/113312256)

### 3.26

**开发环境：开发**

测试环境：测试用 生产环境：上线

### 3.24

[python 一个list根据另一个list排序](https://blog.csdn.net/u011675334/article/details/101271021) [Python3 sorted() 函数](https://www.runoob.com/python3/python3-func-sorted.html)

### 3.23

[echarts Y轴不同刻度](https://segmentfault.com/a/1190000018437019)

### 3.22

相关协议基础

http协议：[传送门](https://www.cnblogs.com/an-wen/p/11180076.html) json序列格式：[传送门](https://www.sojson.com/json/json_index.html) xml序列格式：[传送门](https://www.w3school.com.cn/xml/xml_intro.asp) protobuf序列格式：[传送门](https://www.jianshu.com/p/a24c88c0526a)

### 3.18

[Robo3T 连接其他mongodb](https://blog.csdn.net/weixin_44050791/article/details/105021628)

Python Mongodb 插入当前时间

```python
# pip install python-dateutil
from dateutil import parser
now = parser.parse(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))
mongo.db['records'].insert_one({'time': now})
```

结果

```javascript
# 数据库中
{
    "time" : ISODate("2020-08-28T19:26:02.000Z")
}
# 打印输出
{
    'time': datetime.datetime(2020, 8, 28, 19, 26, 2)
}
```

### 3.16

blob = Binary large Object [blob](http://caibaojian.com/blob.html) [VUE 打包下载图片](https://www.cnblogs.com/wangshishuai/p/13144019.html) [StreamSaver](https://github.com/jimmywarting/StreamSaver.js)

[如何下载 blob url 地址的视频？](https://www.zhihu.com/question/354737430) 神器1：谷歌小插件---HDS/HLS Video Downloader. 神器2：[m3u8视频下载工具](http://blog.luckly-mjw.cn/tool-show/m3u8-downloader/index.html) 神器3：[神器3其实神器2的胞弟](https://segmentfault.com/a/1190000025182822)

### 3.11

[VUEX](https://zhuanlan.zhihu.com/p/100941659)

![](https://upload-images.jianshu.io/upload_images/19407955-20ff86ba2de521a7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

#### 莫谈他人高薪,且看闲时谁在拼.

### 3.9

[Protocol Buffer](https://github.com/protocolbuffers/protobuf) 1. Protocol Buffer 与 XML、JSON 的区别

* 首先，Protocol Buffer 序列化之后得到的数据不是可读的字符串，而是二进制流
* 其次，XML 和 JSON 格式的数据信息都包含在了序列化之后的数据中，不需要任何其它信息就能还原序列化之后的数据；但使用 Protocol Buffer 需要事先定义数据的格式(.proto 协议文件)，还原一个序列化之后的数据需要使用到这个定义好的数据格式
* 最后，在传输数据量较大的需求场景下，Protocol Buffer 比 XML、JSON 更小（3到10倍）、更快（20到100倍）、使用 & 维护更简单；而且 Protocol Buffer 可以跨平台、跨语音使用
* commdan: protoc&#x20;

  sudo apt install protobuf-compiler

### 3.8

python 日志

```python
self.logname = os.path.join(log_path, '%s.log' % time.strftime('%Y_%m_%d'))
```

[全示例](https://www.jb51.net/article/88449.htm) 多个logger时 [logger配置文件](https://blog.csdn.net/qq_34182808/article/details/100735895) logger 层级关系 [子向父传递日志](https://www.pynote.net/archives/1995) 可选关闭 [logging](https://www.cnblogs.com/nancyzhu/p/8551506.html) [tornado的日志进行每间隔一天进行分割](https://blog.csdn.net/jw690114549/article/details/69392129) [tornado初步搭建及日志功能的使用](https://blog.csdn.net/lwcaiCSDN/article/details/84975461) 通过时间分割的日志，不带时间的。是当前正在进行的日志。缓存区。时间已到会自动转移到对应时间日志文件下。（盲猜测是重命名，然后生成新的 定义的logger name file）

> 控制台输出，就是标准输出终端。

### 3.3

class ： bety 转 str ，常用 b'\xe4\xb8\xad\xff'.decode('utf-8', errors='ignore') [python 字符处理](https://blog.csdn.net/weixin_34910922/article/details/106677575)

## 2021.二月

### 2.22

python multitasking

### 2.2

* 鲁棒性：抗干扰能力，同一张图片，（裁剪，模糊，光亮等等操作后，还能能不能很好的识别）即抗鲁棒性。
* 模型检测标准：精度、召回、鲁棒性

### 2.1

* ubuntu ：  ext4 日志文件系统

## 2021.一月

### 番外篇

[黑猫投诉](https://tousu.sina.com.cn/)

### 1.28

* 针对小米logo的yolov5目标检测，[降低误检测率及小目标检测系列笔记](https://blog.csdn.net/weixin_44836143/article/details/105952819)

### 1.27

**修正：1.19号对路径的操作os.path模块为老式写法。python3.6之后的新模块Pathlib**

* [使用pathlib替代os.path](https://zhuanlan.zhihu.com/p/87940289)

  [属性](https://blog.csdn.net/weixin_42484997/article/details/108594478)

### 1.19

* python 跨平台路径分隔符 separate  [os.sep](https://www.cnblogs.com/bit-ter/p/9900940.html)
* python 字符串 截取，去掉不需要的部分。[str.strip(\[chars\])](https://www.runoob.com/python/att-string-strip.html)、[str.rstrip(\[chars\])](https://www.runoob.com/python/att-string-rstrip.html)、[str.lstrip(\[chars\])](https://www.runoob.com/python/att-string-lstrip.html)
* python 判断文件扩展名（Filename Extension） [os.path.splitext](https://www.cnblogs.com/jielongAI/p/9323257.html) 区别于 str.split()

### 1.15

* [Latex](https://www.bilibili.com/video/BV11h41127FD)
* [拖拽布局DraggablePageLayout](https://pyecharts.org/#/zh-cn/composite_charts?id=page%ef%bc%9a%e9%a1%ba%e5%ba%8f%e5%a4%9a%e5%9b%be)

  这简直是骚操作，不符合常规。

### 1.12

vscode 插件

* [代码规范](https://blog.csdn.net/weixin_42731853/article/details/109174860)

### 1.6

* xpath 取值为：//\*\[@id="downul"]/li/input/@value   使用 /@

## 2020.十二月

### 12.30

* 硬件软件国产化

  华为昇腾NPU Atlas 910/MindSpore框架  [MindSpore](https://www.mindspore.cn)

#### 在人类所有的美德中，勇敢是最稀缺的

### 12.22

* 问题：除了UUID编码，还有什么生成唯一ID方法？

  ulid：    [https://github.com/ulid/spec](https://github.com/ulid/spec?spm=a2cl9.devops_devops2020_goldlog_.0.0.21d23ea2eDKXGr)

  shortid：    [https://github.com/dylang/shortid](https://github.com/dylang/shortid?spm=a2cl9.devops_devops2020_goldlog_.0.0.21d23ea2eDKXGr)

### 12.22

* [评判标准](https://blog.csdn.net/y_xiansheng/article/details/82456577)  <img src="/files/qzBxxA0Qs2D0Mm5B2Cvw" alt="" data-size="line">
* 精度（precision）：TP/ （TP+FP） 【正类正确 / 预测的正类】
* 召回（recall）：TP / (TP+FN)   【正类正确 / 实际真实正类】
* 准确率（Accuracy）： (TP + TN )/( TP + FP + TN + FN)

### 12.18

* 感受野  ，没有足够的感受野训练和测试会丢失特征，预测就不准甚至错掉。AtrousConv在不增加参数的情况下，提高卷积的感受野。也可以代替pooling操作增加感受野，捕获多尺度上下文信息

  [深度学习CV领域最瞩目的成果top46](https://mp.weixin.qq.com/s/F7P5dFodx3WvRqmk64dfFg)
