人工智能第二课(雅礼2020级高二下选修课)
2022-03-07 22:49 作者:Lit_费米子の选择_on | 我要投稿
UOS系统介绍:Linux内核&Deepin基础&国产系统


2.终端使用
Matplotlib尝试 :Hexbin 演示
转自Matplotlib:
import numpy as np
import matplotlib.pyplot as plt
# Fixing random state for reproducibility
np.random.seed(19680801)
n = 100000
x = np.random.standard_normal(n)
y = 2.0 + 3.0 * x + 4.0 * np.random.standard_normal(n)
xmin = x.min()
xmax = x.max()
ymin = y.min()
ymax = y.max()
fig, axs = plt.subplots(ncols=2, sharey=True, figsize=(7, 4))
fig.subplots_adjust(hspace=0.5, left=0.07, right=0.93)
ax = axs[0]
hb = ax.hexbin(x, y, gridsize=50, cmap='inferno')
ax.axis([xmin, xmax, ymin, ymax])
ax.set_title("Hexagon binning")
cb = fig.colorbar(hb, ax=ax)
cb.set_label('counts')
ax = axs[1]
hb = ax.hexbin(x, y, gridsize=50, bins='log', cmap='inferno')
ax.axis([xmin, xmax, ymin, ymax])
ax.set_title("With a log color scale")
cb = fig.colorbar(hb, ax=ax)
cb.set_label('log10(N)')
plt.show()
尝试:OHHHHHHHHH

3.建立虚拟环境
(1).清华:计图 jittor 华为:昇思
(2)Anaconda:base环境等
NOTE:代码包与环境必须适配
(3)部分简单代码及操作
*按前两个代码,再用Tab补全
*mkdir 新建文件夹
*rm -rf 删除
*cd 进入
*jupyter-notebook 网页python?
*netstat-nultp 查看正在运行的程序
*top 看活跃程序
*ls 目录中所有文件
*pwd 查看目录路径
* . 自己
* .. 上一级
*开启:conda active jittor
*杀死:conda deactive
Note:安装时注意版本,如 python 3.7.5