自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(23)
  • 收藏
  • 关注

原创 安装WSL遇到【The requested operation requires elevation.】解决方法

以“Administrator”身份打开windows powershell,运行以下命令:wsl --install

2021-10-08 05:08:55 1854

转载 python: plt.figure()和plt.legend()有什么用

The purpose of usingplt.figure()is to create a figure object.The whole figure is regarded as the figure object. It is necessary to explicitly useplt.figure()when we want to tweak the size of the figure and when we want to add multiple Axes objects in...

2021-09-14 17:10:41 960

转载 keras: fit()参数verbose

By setting verbose 0, 1 or 2 you just say how do you want to 'see' the training progress for each epoch.verbose=0will show you nothing (silent)verbose=1will show you an animated progress bar like this:Train on 186219 samples, validate on 20691 sam..

2021-09-14 16:15:29 448

原创 batch_size笔记

Batch sizeis a term used inmachine learning and refers to the number of training examples utilised in one iteration. The batch size can be one of three options:batch mode: where the batch size is equal to the total dataset thus making the iteration and..

2021-09-14 16:10:32 199

翻译 keras: Flatten()是以何种顺序展开矩阵的?

Flatten() 运算符从最后一个维度开始展开值(至少对于 Theano 而言,它是“通道优先”,而不是像 TF 那样的“通道最后”。)。这等价于 numpy.reshape 与 'C' 排序:‘C’表示使用类似C的索引顺序读取/写入元素,最后一个axis索引变化最快,回到第一个axis索引变化最慢。这是一个独立示例,说明了使用 Keras Functional API 的 Flatten 运算符:import numpy as npfrom keras.layers import I

2021-09-14 14:56:29 786

翻译 python: numpy reshape中的-1含义

简单来说,-1是指reshape之后的array的新形状“面积”是与原始形状相同。-1就表示未知的长或者宽。numpy 允许我们将新的形状参数之一指定为 -1(例如:(2,-1) 或 (-1,3) 但不是 (-1, -1))。 它只是意味着它是一个未知的维度,我们希望 numpy 找出它。 numpy 将通过查看“数组的长度和剩余维度”并确保它满足上述标准来计算这一点。举个例子:z = np.array([[1, 2, 3, 4], [5, 6, 7, 8],

2021-09-10 10:04:55 3122

转载 python: type dtype astype 的用法

1.type 获取数据类型2.dtype 数组元素的类型3.astype 修改数据类型

2021-09-10 09:46:25 127

翻译 keras: train_test_split中random_state如何理解

train_test_split 将数组或矩阵拆分为随机的训练和测试子集。 这意味着每次在不指定 random_state 的情况下运行它时,都会得到不同的结果,这是预期的行为。 例如:Run 1:>>> a, b = np.arange(10).reshape((5, 2)), range(5)>>> train_test_split(a, b)[array([[6, 7], [8, 9], [4, 5]]), array

2021-09-10 01:06:30 2451

转载 Jenkins: pipeline实现编译完成后钉钉机器人通知

在Jenkins中配置好钉钉,参考这里。pipeline代码:pipeline { agent any stages { stage('Hello') { steps { script { println("Hello world") } } } } post { f

2021-09-08 16:12:59 1176

转载 jenkins:集成钉消息通知

前言在使用jenkins的时候,经常需要将本次的构建结果以邮件的方式通知到相关的使用人员,jenkins集成邮件通知是比较常用也是比较传统的使用方式,但是也有不方便的地方,比如邮箱的即时性不够好,一旦邮件过多很容易被淹没,随着钉钉的崛起,不少公司的日常办公和内部交流都开始移到钉钉上,自此,jenkins也提供了对于钉钉的集成,通过安装插件和配置相应的信息即可完成构建通知消息推送到钉钉,下面来说明一下集成的具体步骤钉钉配置1、安装钉钉,这一步直接忽略了2、创建一个钉钉群,获取机器人token进

2021-09-08 15:22:17 447

原创 Jenkins: freestyle和pipeline item

freestyle项目的“配置”选项中有“构建后操作”这一步,但是pipeline并没有;而pipeline项目中有“流水线”这一步(用来写Jenkinsfile),但是freestyle没有,但是freestyle可以直接写batch用。一般我们写Jenkinsfile用比较常见,那么怎么在pipeline中添加“构建后操作”这一选项呢?答案是在Jenkinsfile中添加post{}例:pipeline { agent any stages { sta

2021-09-08 14:56:17 515

转载 bat: 调用WinRAR.exe压缩文件

备份数据前用WinRAR压缩一下是个不错的注意,这样做至少有以下优点:1.节省空间。这个要视源文件的性质而定,一般而言,文字型的办公文档压缩比要高一些,而多媒体文件压缩效果往往不明显。2.加快复制速度。备份文件往往需要复制到N个不同的位置/存储介质,即使压缩后文件体积变化不大,最好也用“存储方式”压缩一下,因为在同样大小的情况下,大块的单个文件比零散的很多文件复制速度要快。3.保密。可以利用压缩密码来对文件进行加密。不过每次都右键点击文件/文件夹,然后设置密码,实在很麻烦,好在WinRAR支

2021-09-02 11:03:08 1458

转载 SourceTree:3.x.x安装时跳过注册方法

SourceTree 3.1.3 安装时跳过注册方法SourceTree 3.1.3 版本跳过bitbucket注册方法,而不是网上所谓的SourcetreeEnterprise跳过bitbucket注册方法。首先下载并安装好git程序。 接着下载并执行SourceTreeSetup-3.1.3.exe,会进入登录或注册bitbucket的界面。我只是想用软件,并不想去注册账号。怎么办?请往下看。 3.关闭上述安装窗口,打开%LocalAppData%\Atlassian\Sourc.

2021-09-02 10:37:22 430

转载 selenium: 判断元素是否存在,显示,被选中

element=driver.find_element_by_name("XXX")element.is_enabled() # 元素是否可以点击element.is_displayed() # 元素是否显示element.is_selected() # 元素是否被选中

2021-09-01 14:29:15 846

原创 bat: Xcopy命令

官方文档将文件夹A中的文件copy到文件夹B中:Xcopy D:\A D:\B /s /e /y /h/s:拷贝文件夹和子文件夹,不拷贝空文件夹。如果没有/s则只拷贝单一文件夹;/e:拷贝所有文件夹和子文件夹,就算是空的也拷贝。和/s /t一块用一般;/t:拷贝子文件夹的树状结构而不拷贝文件,也不拷贝空文件夹除非和/e一块用;/h:拷贝文件夹中的隐藏和系统文件,Xcopy的默认设定是不拷贝隐藏或者系统文件的;/y:不提示是否覆盖现有文件(直接覆盖了);/-y:提示是否要覆盖

2021-09-01 14:24:41 1929

转载 python + selenium: 命名截图并保存到指定文件夹

1,需要导入pathlib的Path类:from pathlib import Path2,截图函数:可以使用以下两种driver.save_screenshot()driver.get_screenshot_as_file()3,实现:i=1scrpath='D:\\Ex3' #指定的保存目录capturename = '\\'+str(i) + '.png' #自定义命名截图wholepath=scrpath+capturenameif Path(scrpat.

2021-08-31 16:21:39 1440 1

原创 python: traceback保留异常日志

try: self.driver.find_element_by_name(name.data).click() except Exception as msg: traceback.print_exc(file = open(r'D:\01_test_results\errorlog.txt', 'a'))需要import trace;控制台的traceback不会显示,而是被写进errorlog.txt文件里。...

2021-08-31 15:01:20 235

原创 python: 使用try except做异常捕获

try: # self.driver.find_element_by_name(name.data).click() # 这里填写你的指令 except [这里填写异常的名称,比如:AttributeError] as e: print('错误类型是', e.__class__.__name__) print('错误明细是', e)错误类型是 AttributeError...

2021-08-31 12:05:03 745

转载 python: PyFormat %s %d 在python string中的用法

%s 是从 C语言借来的string formatting syntax;#Python2name = raw_input("who are you? ")print "hello %s" % (name,)#Python3+name = input("who are you? ")print("hello %s" % (name,))The%stoken allows me to insert (and potentially format) a string. Notice ...

2021-08-31 11:25:45 160

原创 git: clone 和 pull 的区别

git clone git@xxxx.git 是clone下所有的代码(包括gitlab/hub repo里子repo中的代码);git pull git@xxxx.git 是在本地之前clone过的基础上从repo里pull最新的代码,一般是有individual branch往master branch merge之后就用pull更新一下本地的repo。...

2021-08-30 17:51:13 369

原创 bat: 超级基本的命令

@echo offecho 'abc'echo%errorlevel%pause

2021-08-30 17:43:32 72

原创 bat: 调用python脚本

个人笔记》》@echo offcd [python file location]start python [python file name]

2021-08-30 14:25:58 296

转载 bat: 删除文件、文件夹

个人笔记》》1、rd命令rd /s /Q c:\temp会将temp文件夹也删除2、rd命令+md命令rd /s /Q c:\tempmd c:\Temp删除后再重建3、del命令del /s /Q c:\temp只能删除文件,而不能删除子文件夹4、del命令+rd命令,先刪除文件,再进入temp文件夹删除目录del /s /Q c:\tempcd C:\temprd /s /q c:\temp—————————————————————原文链接:h

2021-08-30 14:22:55 10250

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除