python学习
一只小菜ji
这个作者很懒,什么都没留下…
展开
-
PytestDeprecationWarning:The‘junit_famiLy‘defauLtvaluewillchangeto‘xunit2‘inpytest6.‘junit_family=x
pytest-html报错PytestDeprecationWarning:The’junit_famiLy’defauLtvaluewillchangeto’xunit2’inpytest6.'junit_family=x unit 1’to your pytest.ini file to keep the current format in future versions of py test and siLence this warning在test目录下创建pytest.ini文件。文件中写[原创 2021-02-24 16:02:26 · 195 阅读 · 0 评论 -
Tesseract-OCR的使用---提取图片中的文字,用于验证码的获取
driver = webdriver.Chrome() driver.maximize_window() driver.get('http://admin-ceshi.eyyb.vip:81/login') # driver.get("http://admin-stable.eyyb.vip/login") def VerficationCode(self): self.driver.get_screenshot_as_file(datapath+"pic..转载 2021-01-11 17:51:48 · 382 阅读 · 0 评论 -
python安装wordcloud时的错误
想安装wordcloud库很久了,一直显示error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": 问了很多了也百度了一会,要不就是说我没安装visual,要不就是说我的visual版本低,搞了好久,今天终于got一个好方法。首先进入[https://pypi.org...翻译 2018-12-03 19:17:12 · 583 阅读 · 0 评论 -
英语词频统计
filetest.txt文本take myself as example,I used to be one of the students who had no interest andconfidence in learning English well.One day,a friend of mine recommended a bookto me,and I was totally ...原创 2018-11-28 20:25:43 · 1465 阅读 · 0 评论 -
科赫雪花小包裹
import turtledef koch(size,n): if n==0: turtle.fd(size) else: for angle in [0,60,-120,60]: turtle.left(angle) koch(size/3,n-1)if __name__ == '__main_...原创 2018-11-25 17:14:59 · 209 阅读 · 0 评论 -
python七段数码管和倒计时
8是典型的七段数码管的例子,因为刚好七段都有经过,这里我写的代码是从1开始右转。这是看Mooc视频写的一个关于用七段数码管显示当前时间# -*-coding:utf-8 -*-import turtle as timport timedef drawGap(): t.penup() t.fd(5)def drawLine(draw): drawGap() ...原创 2018-11-22 22:29:37 · 10373 阅读 · 3 评论 -
MOOC嵩天@Pyhon123作业
练习题2turtle正方形绘制使用turtle库,绘制一个正方形import turtle as t #给turtle库取个别名 t,方便for i in range(4): t.fd(100) t.left(90)turtle六边形绘制使用turtle库,绘制一个六边形import turtleturtle.color("black")turtle.pens...原创 2018-11-19 21:11:40 · 648 阅读 · 1 评论 -
MOOC嵩天@python123作业
练习4整数加减和编写程序计算如下数列的值:1-2+3-4…966其中,所...原创 2018-11-21 20:28:39 · 9038 阅读 · 2 评论 -
MOOC嵩天@Pyhon123作业
练习3三次方格式化获得用户输入的一个数字,可能是整数或浮点数,a,计算a的三次方值,并打印输出。输出结果采用宽度20个字符、居中输出、多余字符采用减号(-)填充。...原创 2018-11-20 18:53:39 · 2468 阅读 · 4 评论 -
MOOC嵩天@Pyhon123作业
练习1Hello World垂直输出"Hello World",全部代码不超过2行print('\n'.join('Hello World'))N的多次方编写一个程序,计算输入数字N的0次方到5次方结果,并依次输出这6个结果,输出结果间用空格分隔。其中:N是一个整数或浮点数。...原创 2018-11-18 23:39:12 · 976 阅读 · 2 评论