摘要: 让指针指向一个常量对象,这样可以防止使用指针来修改所指向的量 将int对象a,转为常量对象,有指针c指向 #include<iostream> using namespace std; int main() { int a = 3; const int* c = &a; cout << *c << 阅读全文
posted @ 2022-02-20 17:19 xiecl 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 将CMake中的 OPENCV/OPENCV_ENABLE_ALLOCATOR_STATS 不打勾 阅读全文
posted @ 2020-05-05 16:32 xiecl 阅读(3828) 评论(1) 推荐(2) 编辑
摘要: 对flask的IP地址和端口号进行修改,发现并没有修改 主要是pycharm对flask项目修改的限制 解决方法: 将项目改为普通的python脚本工程,不使用flask工程 阅读全文
posted @ 2019-11-02 20:38 xiecl 阅读(2542) 评论(0) 推荐(0) 编辑
摘要: 机器学习中的监督学习是拟合函数$f$,使得对数据进行建模 $$ Y=f(X)+\epsilon $$ 通常,我们只能建模去逼近函数$f$, 即$\hat{f}$,所以预测得到$\hat{Y}$ $$ \hat{Y} = \hat{f}(X)+\epsilon $$ $\epsilon$ 是训练集本身 阅读全文
posted @ 2019-02-12 22:35 xiecl 阅读(261) 评论(0) 推荐(0) 编辑
摘要: python 代码 Reference: 阅读全文
posted @ 2019-01-25 11:15 xiecl 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1 借助python安装shadowsocks 2 配置代理文件 3 配置shadowsocks代理自启动 4 启动shadowsocks代理并验证 5 由于shadowsocks是socket5服务,需要使用privoxy将流量转到http/https上 6 配置privoxy服务 7 修改/et 阅读全文
posted @ 2018-12-24 15:10 xiecl 阅读(3) 评论(0) 推荐(0) 编辑
摘要: Ubuntu 安装的时候,已经默认安装了cron 服务 可以通过命令: 查看cron服务是否运行,如果运行,则返回进程的ID号 开启cron服务 关闭cron服务 重启cron服务 重新加载cron服务的配置 下面是对cron定时执行任务进行设置 编辑文件按照下面形式编辑 阅读全文
posted @ 2018-11-27 22:29 xiecl 阅读(2116) 评论(0) 推荐(0) 编辑
摘要: 1 htop: 提供更加美观、更方面的进程监控工具,可用于替代top命令 2 axel: 多线程下载工具,下载文件时可以替代curl、wget 3 tldr: 可以取代man的详细文档,显示简洁的介绍 4 shellcheck: shell脚本静态检查工具 5 cloc: 代码统计工具,能够统计代码 阅读全文
posted @ 2018-11-21 23:14 xiecl 阅读(526) 评论(0) 推荐(0) 编辑
摘要: 安装pydot,pip install pydot 出现OSError: pydot failed to call GraphViz.Please install GraphViz (https://www.graphviz.org/) and ensure that its executables 阅读全文
posted @ 2018-11-19 21:24 xiecl 阅读(830) 评论(0) 推荐(0) 编辑
摘要: ```python >>> import itertools >>> data = itertools.product(['A', 'B'], [1, 2, 3]) >>> list(data) [('A', 1), ('A', 2), ('A', 3), ('B', 1), ('B', 2), ('B', 3)] ``` 阅读全文
posted @ 2018-11-15 09:57 xiecl 阅读(987) 评论(0) 推荐(0) 编辑