博客功能测试(请忽略此文)


各种测试

提示信息样例:

成功啦o( ̄▽ ̄)ブ

有危险Σ(っ °Д °;)っ

有消息(・∀・(・∀・(・∀・*)

当心哦≧ ﹏ ≦

折叠内容样例:

折叠框的标题

被折叠的内容 1
被折叠的内容 2

展开预先折叠内容样例:

折叠框的标题

被折叠的内容 1
被折叠的内容 2

提示面板框样例:

面板框的标题

successs是面板框的类型,可以是:

successs
danger
info
warning

图片测试样例:

avatar

视频测试样例:

关于视频格式的解释:

链接测试样例:

More info: example

代码测试样例:

1
2
3
4
5
6
7
8
9
#include<iostream>

using namespace std;

int main()
{
cout<< "Hello,world!" <<endl;
return 0;
}

quote样例:

1.普通

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque hendrerit lacus ut purus iaculis feugiat. Sed nec tempor elit, quis aliquam neque. Curabitur sed diam eget dolor fermentum semper at eu lorem.


2.书中引用

Do not just seek happiness for yourself. Seek happiness for all. Through kindness. Through mercy.

David LevithanWide Awake

3.twitter引用

NEW: DevDocs now comes with syntax highlighting. http://devdocs.io


4.网络文章引用

Every interaction is both precious and an opportunity to delight.

表格测试样例:

Tables Are Cool
col 3 is right-aligned $1600
col 2 is centered $12
zebra stripes are neat $1

BP算法

训练集

其中


附录 Python常用命令

创建虚拟环境

python创建虚拟环境

1
2
3
4
5
6
7
8
9
10
11
12
md envs
# 创建虚拟环境
python -m venv env_name

cd env_name

cd Scripts
# 激活环境
.\activate

# 安装Django
pip install django

设置国内源

1
2
# 清华源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
1
2
# 阿里源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
1
2
# 腾讯源
pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple
1
2
# 豆瓣源
pip config set global.index-url https://pypi.douban.com/simple/

使用requirement.txt批量安装

pip安装 requirments.txt

1
pip install -r ./requirements.txt

对项目生成requirement依赖,以便于其他人对项目的fork

freeze-适用于虚拟环境

1
2
#生成requirement依赖
pip freeze > requirements.txt

检查cuda版本(cmd命令)

1
nvidia-smi

常用Python代码

python消除警告

1
2
import warnings
warnings.filterwarnings("ignore")

plt绘图中文乱码

1
2
3
plt.rcParams['font.sans-serif'] = ['KaiTi', 'SimHei', 'FangSong']  # 汉字字体,优先使用楷体,如果找不到楷体,则使用黑体
plt.rcParams['font.size'] = 12 # 字体大小
plt.rcParams['axes.unicode_minus'] = False # 正常显示负号

使用pip安装notebook

1
pip install jupyter notebook

更改juypter打开默认位置

1
jupyter notebook --generate-config