@ 一、环境介绍 系统版本 IP地址 主机名 角色 centos7.5 192.168.1.104 salt-master master centos7.5 192.168.1.105 salt-client client 环境说明: centos7.5默认的python环境是2.7版本。 官方说明 ...
分类:
系统相关 时间:
2021-01-26 12:01:22
阅读次数:
0
bool运算符的行为 操作符 操作定义 x and y 如果x为假,返回x,否则返回y x or y 如果x为真,返回x,否则返回y not x 如果x为假,返回真,否则返回假 例子 a = 1 b = 2 c = a and b print(c) # 2 a = 0 b = 2 c = a and ...
分类:
编程语言 时间:
2021-01-26 11:58:08
阅读次数:
0
说明 v2上有个老哥把编译后的whl放到github了,直接下载安装即可。在这里对他表示致谢。 地址:https://github.com/wizyoung/AppleSiliconSelfBuilds 下载后安装 下载 需要python环境,可以参考我的另一篇博客安装:https://www.cn ...
分类:
编程语言 时间:
2021-01-26 11:57:55
阅读次数:
0
Chapter 4 - Clustering Models Segment 3 - DBSCan clustering to identify outliers DBSCAN for Outlier Detection Unsupervised method that clusters core s ...
分类:
数据库 时间:
2021-01-26 11:57:37
阅读次数:
0
import tensorflow as tf import numpy as np ##使用numpy生成100个随机点 x_data=np.random.rand(200) y_data=x_data*0.1+0.2 #构造一个线性模型 b=tf.Variable(0.) k=tf.Variab ...
分类:
编程语言 时间:
2021-01-26 11:55:41
阅读次数:
0
官网下载地址(已存网盘):https://www.python.org 注:查看所有版本也可以选择32位或64位的解释器,X86就是32位、X86-64就是64位的 再推荐把官方文档也下载一下: 安装: 双击下载好的解释器exe文件 -- (install now 为安装位置;customize i ...
分类:
编程语言 时间:
2021-01-26 11:53:22
阅读次数:
0
在Python中有两种函数,一种是def定义的函数,另一种是lambda函数,也就是大家常说的匿名函数。今天我就和大家聊聊lambda函数,在Python编程中,大家习惯将其称为表达式。 1.为什么要用lambda函数? 先举一个例子:将一个列表里的每个元素都平方。 先用def来定义函数,代码如下 ...
分类:
编程语言 时间:
2021-01-26 11:50:43
阅读次数:
0
map()函数 map()是 Python 内置的高阶函数,它接收一个函数 f 和一个 list,并通过把函数 f 依次作用在 list 的每个元素上,得到一个新的 list 并返回。 1、当seq只有一个时,将函数func作用于这个seq的每个元素上,并得到一个新的seq。 例如,对于list [ ...
分类:
编程语言 时间:
2021-01-26 11:49:25
阅读次数:
0
import os def remove_filename(path_dir, start, end): files = [f for f in os.listdir(path_dir) if f.startswith(start) and f.endswith(end)] for file_nam ...
分类:
编程语言 时间:
2021-01-26 11:48:41
阅读次数:
0
一、说在前面 我在用pip下载包时经常有下载比较慢和如下错误的问题 Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/pipenv/ 二、解决方法 默认pip是使用Python官方的源,但是由于国外官方源经常被墙,导致不可用,我 ...
分类:
编程语言 时间:
2021-01-26 11:47:24
阅读次数:
0