
python
文章平均质量分 77
qq_35923581
这个作者很懒,什么都没留下…
展开
-
高编作业(一)
高编作业(一)一、浏览Python主页,在博客下写下你的发现和收获1. Python有两种还在维护的版本,其中Python3不完全兼容Python2 2. Python有非常强大非常众多的库,如Web开发有Flask和Django等多种框架,游戏开发有Pygame,图像处理有Pillow,数据处理有Numpy和Scipy等,爬虫有Scarpy和BeautifulS...原创 2018-03-08 11:23:12 · 570 阅读 · 0 评论 -
高编作业(十)
Scipy作业10.1作业截图代码from scipy import linalg, statsimport numpy as npimport mathimport matplotlib.pyplot as pltm = 20n = 11A = np.random.randint(-10, 10, size = (m, n))b = np.random.r...原创 2018-06-05 20:44:00 · 216 阅读 · 0 评论 -
高编作业(十一)
Jupyter作业作业链接https://nbviewer.jupyter.org/github/schmit/cme193-ipython-notebooks-lecture/blob/master/Exercises.ipynb作业截图准备部分 要在控制台输入jupyter notebook,然后在弹出的网页上写代码。 自己的代码 第一题 第一题代码 ...原创 2018-06-12 10:41:21 · 285 阅读 · 0 评论 -
高编作业(九)
Matplotlib作业1题目截图 代码from scipy import linalgimport numpy as npimport matplotlib.pyplot as pltX = np.arange(0, 2.02, 0.02)Y = np.sin((X - 2) * np.exp(-X ** 2)) ** 2plt.plot(X, Y)p...原创 2018-05-25 11:09:57 · 330 阅读 · 0 评论 -
高编作业(七)
题目:26. Remove Duplicates from Sorted Array题目描述Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra ...原创 2018-05-08 11:27:30 · 206 阅读 · 0 评论 -
高编作业(六)
题目:66、Plus One题目描述Given a non-empty array of digits representing a non-negative integer, plus one to the integer.The digits are stored such that the most significant digit is at the head of ...原创 2018-04-27 20:17:13 · 167 阅读 · 0 评论 -
高编作业(八)
Numpy作业题目截图 生成A和Bfrom scipy import linalgimport numpy as npA = np.random.normal(0,1,100000).reshape(200,500)B = linalg.toeplitz(list(range(1,500)))9.1题目截图 代码 # 9.1print(A + A)...原创 2018-05-18 12:13:42 · 195 阅读 · 0 评论 -
高编作业(四)
第七章作业7-2 餐馆订位 :编写一个程序,询问用户有多少人用餐。如果超过8人,就打印一条消息,指出没有空桌;否则指出有空桌。people = int(input("请问有多少人用餐?\n"))if people>8: print("抱歉,已经没有空桌")else: print("有空桌") 7-3 10的整数倍 :让用户输入一个数字,并指出这个数...原创 2018-03-29 11:40:25 · 370 阅读 · 0 评论 -
高编作业(三)
第五章作业5-5 外星人颜色#3:将练习5-4中的if-else 结构改为if-elif-else 结构。 如果外星人是绿色的,就打印一条消息,指出玩家获得了5个点。 如果外星人是黄色的,就打印一条消息,指出玩家获得了10个点。 如果外星人是红色的,就打印一条消息,指出玩家获得了15个点。 编写这个程序的三个版本,它们分别在外星人为绿色、黄色和红色时打印一条消息。alien_c...原创 2018-03-22 11:23:18 · 1381 阅读 · 0 评论 -
高编作业(五)
第九章作业9-1 餐馆 :创建一个名为Restaurant 的类,其方法 _ init _() 设置两个属性:restaurant_name 和cuisine_type 。创建一个名为describe_restaurant() 的方法和一个名为open_restaurant() 的方法,其中前者打印前述两项信息,而后者打印一条消息,指出餐馆正在营业。 根据这个类创建一个名为restauran...原创 2018-04-08 10:32:42 · 1397 阅读 · 0 评论 -
高编作业(二)
第三章作业3-1 姓名: 将一些朋友的姓名存储在一个列表中,并将其命名为names 。依次访问该列表中的每个元素,从而将每个朋友的姓名都打印出来。names = ['python', 'c++', 'java', 'javascript', 'matlab']for name in names: print(name) 3-4 嘉宾名单 :如果你可以邀请任何人一起共进...原创 2018-03-15 15:20:36 · 428 阅读 · 0 评论 -
简单的验证码识别
这是我尝试写的第一篇技术博客,借鉴了很多博客和教程,写出了自己的代码,代码较为冗杂而且程序十分耗时。所以本文主要提供验证码识别的一个简单的思路,代码实现的部分还望各位大佬指点。 看了好几篇验证码图片识别的博文,不难归纳出验证码识别的大概思路是收集训练集——>图像处理——>得到图片特征值——>训练——>识别,其中图像处理部分又包括了灰度化、二值化、去噪、分割等过程。本文...原创 2018-03-08 17:36:51 · 30662 阅读 · 4 评论 -
高编作业(十二)
Sklearn作业作业截图 代码from sklearn import datasets,cross_validationfrom sklearn.naive_bayes import GaussianNBfrom sklearn.svm import SVCfrom sklearn.ensemble import RandomForestClassifierfrom...原创 2018-06-15 11:19:35 · 292 阅读 · 0 评论