import numpy as np import cv2 as cv # Create a black image img = np.zeros((512,512,3), np.uint8) # Draw a diagonal blue line with thickness of 5 px cv ...
分类:
编程语言 时间:
2020-10-20 16:26:11
阅读次数:
32
一、使用cnpm 1.使用阿里定制的 cnpm 命令行工具代替默认的 npm,输入下面代码进行安装: $ npm install -g cnpm --registry=https://registry.npm.taobao.org 以后安装插件只需要使用cnpm intall即可。 二、仍然使用np ...
分类:
其他好文 时间:
2020-10-13 17:35:21
阅读次数:
27
这篇文章主要介绍了python调用摄像头的示例代码,帮助大家更好的理解和使用python,感兴趣的朋友可以了解下 一、打开摄像头 import cv2 import numpy as np def video_demo(): capture = cv2.VideoCapture(0)#0为电脑内置摄 ...
分类:
编程语言 时间:
2020-10-13 17:33:24
阅读次数:
33
Pandas的数据结构 导入pandas: 三剑客 import pandas as pd from pandas import Series,DataFrame import numpy as np 1、Series Series是一种类似与一维数组的对象,由下面两个部分组成: values:一组 ...
分类:
其他好文 时间:
2020-10-06 20:13:42
阅读次数:
31
方法一:使用np.random.shuffle state = np.random.get_state() np.random.shuffle(train) np.random.set_state(state) np.random.shuffle(label) 或者这么使用: train_row = ...
分类:
其他好文 时间:
2020-10-06 19:53:13
阅读次数:
44
在缺失值填补上如果用前后的均值填补中间的均值,比如,0,空,1,我们希望中间填充0.5;或者0,空,空,1,我们希望中间填充0.33,0.67这样。 可以用pandas的函数进行填充,因为这个就是线性插值法 df..interpolate() dd=pd.DataFrame(data=[0,np.n ...
分类:
编程语言 时间:
2020-09-24 21:23:08
阅读次数:
47
数据地址:https://tianchi.aliyun.com/competition/entrance/531830/information 1.导入模块和数据 import pandas as pd import numpy as np import matplotlib.pyplot as p ...
分类:
其他好文 时间:
2020-09-18 01:17:41
阅读次数:
52
npm相关操作 npm查源 npm config get registry npm换源: 淘宝源 npm --registry=https://registry.npm.taobao.org install 原源 npm config set registry https://registry.np ...
分类:
其他好文 时间:
2020-09-18 00:10:41
阅读次数:
24
我觉得要死了,不会导入文件,手动输入了600多行数据.. from matplotlib import pyplot as plt import numpy as np from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = A ...
分类:
编程语言 时间:
2020-09-17 22:27:24
阅读次数:
39
import os import numpy as np import matplotlib.pyplot as plt root = os.getcwd() list_data = [os.path.join(root, f) for f in os.listdir() if f.endswith ...
分类:
其他好文 时间:
2020-09-15 21:31:50
阅读次数:
55