流水账
文章平均质量分 54
流水账
刘刘刘刘刘英迪
其作始也简,其将毕也必巨
展开
-
Python读写文件
if __name__ == '__main__': # 一次性读取文件所有内容 with open('temp.txt', 'r') as file: data = file.read() print(data) print('----------------------') file.close() # 按行读取文件 with open('temp.txt', 'r') as file: line_ind原创 2021-01-12 22:13:54 · 202 阅读 · 0 评论 -
JDK1.8新特性:lambda表达式
一、先准备一个实体类Person(String name, Integer age, Boolean gender),添加无参、带参构造方法,添加所有属性的get、set方法: class Person { private String name; private Integer age; private Boolean gender; public Person() { su...原创 2019-12-03 15:37:34 · 169 阅读 · 0 评论 -
matplotlib 绘图:标题、坐标轴名称和范围、网格线、线条颜色和样式、保存图像、添加图示
import numpy as np import matplotlib.pyplot as plt if __name__ == '__main__': X = np.linspace(-10, 10, 100) y_sin = np.sin(X) y_cos = np.cos(X) # 设置图像标题 plt.title('Comparison of sin(x) and cos(x)') # 设置坐标表示的含义 plt.xlabel('x-v原创 2021-01-28 10:59:02 · 1111 阅读 · 0 评论 -
一文搞定Numpy基础!
numpy 百度百科传送门 文章目录1. 导入numpy并查看版本2. 创建numpy数组2.1 np.array(list):创建一维数组(向量)2.2 np.array(list):创建多维数组(矩阵)2.3 np.zeros(shape, dtype):创建元素值全为0的numpy数组2.4 np.ones(shape, dtype):创建元素值全为1的numpy数组2.5 np.full(fill_value, shape, dtype):创建元素值全为指定元素的numpy数组3. numpy区间与原创 2021-01-27 15:19:06 · 236 阅读 · 0 评论 -
Markdown之机器学习中的特殊符号
常用数学符号 参考博客:https://blog.csdn.net/katherine_hsr/article/details/79179622 数学符号 markdown中的表述 描述 ∑\sum∑ $$\sum$$ 求和 ∑i=0n\sum_{i=0}^ni=0∑n $$\sum_{i=0}^n$$ 求连续和 ∏\prod∏ $$\prod$$ 求积 ∏i=1n\prod_{i=1}^ni=1∏n $$\prod_{i=1}^n$$ 求连续积 ∇\nabla∇ $原创 2021-01-30 11:23:40 · 200 阅读 · 0 评论