05 2017 档案

摘要:python3 调用 beautifulSoup 进行简单的网页处理 from bs4 import BeautifulSoupfile = open('index.html','r',encoding='utf-16-le') #此处有坑!!!soup = BeautifulSoup(file,'lxml')print (soup) # 打印读出的内容print ('\n ---------... 阅读全文
posted @ 2017-05-18 11:31 extendswind 阅读(376) 评论(0) 推荐(0) 编辑
摘要:当使用y=kx+b时,与x轴垂直的直线无法计算。因此使用法线式ysin(theta)+xcos(theta) = dist。貌似这么用有点复杂了,直接使用ax+by=1不知道能不能计算,未测试。 # 修改自 http://www.cnblogs.com/NanShan2016/p/5493429.html### 最小二乘法 python leastsq###import numpy as np... 阅读全文
posted @ 2017-05-12 10:56 extendswind 阅读(972) 评论(0) 推荐(0) 编辑
摘要:代码修改自 http://www.cnblogs.com/NanShan2016/p/5493429.html 网上百度了一下,主要是两个例子,一个利用了多项式函数,一个就是这个。有些细节没看懂,主要是忽略了p是个参数的数组而非一个数(Python基础问题),纠结完加上注释做个笔记 # 修改自 http://www.cnblogs.com/NanShan2016/p/5493429.htm... 阅读全文
posted @ 2017-05-11 20:55 extendswind 阅读(2747) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示