![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
呆博士实验室
大家好,我是呆博士,一枚正在努力沉迷可解释性机器学习的研究僧
展开
-
【python爬虫实战】爬取NeurIPS 2020文章列表
Hello大家好我是ZincRain,最近在看NeurIPS2020的文章,因此想写一个爬虫来爬取所有文章的题目信息,同时从摘要中通过关键词搜索。分析网页打开NeurIPS的网站,找到我们想要的会议年份,例如我们想要2020年的文章列表,那我们就选择Advances in Neural Information Processing Systems 33 pre-proceedings (NeurIPS 2020)之后我们来浏览网页的源码,找到文章列表对应的html代码,可以发现所有的文章都包含在原创 2020-12-09 10:59:28 · 561 阅读 · 0 评论 -
python爬虫速查
最近在看北京理工大学的Python网络爬虫与信息提取,开个博客记录一下我认为重要的知识点。课程主页:中国大学Mooc课程的练习和测验都在python123上本博客面向有一定基础或是学习过课程的人,用于查找方便,持续更新Requests库1.安装pip install requrstsrobots协议...原创 2020-11-13 17:56:47 · 151 阅读 · 0 评论 -
python正则表达式笔记
更新中正则表达式(regular expression),也简称regex,是用于简洁表达一组字符串的表达式。例1:对于字符串组'PN','PYN','PYTN','PYTHN','PYTHON'可以用正则表达式P(Y|YT|YTH|YTHO)?N表示;例2:对于字符串组'PY','PYY','PYYY','PYYYY',……,'PYYYY……'可以用正则表达式PY+表示;例3:以'PY'开头,后续存在不多余10个字符,后续不存在'P'和'Y'可以用正则表达式PY[^PY]{0,10}表示;原创 2020-11-13 11:31:42 · 557 阅读 · 0 评论 -
瓜的python小技巧集合
python小技巧集合python交换两个变量时间处理将字符串转换为时间时间之差python交换两个变量a,b=1,2a,b=b,a时间处理将字符串转换为时间import datetimemy_time_1='01:02:03'FMT = '%H:%M:%S'print(datetime.datetime.strptime(my_time_1, FMT))时间之差直接用时间的减法即可import datetimemy_time_2='01:03:04'FMT = '%H:%M原创 2020-11-12 15:20:40 · 133 阅读 · 1 评论 -
python包管理大全
问题:ModuleNotFoundError: No module named ‘cv2’ModuleNotFoundError: No module named 'cv2'错误方法:pip install cv2conda install cv2解决方法:pip install opencv-pythonconda install opencv-pythoncv2是包含在opencv中的原创 2020-10-28 11:27:37 · 257 阅读 · 0 评论 -
Setup Jemdoc in Mac High Sierra
cd where jemdoc.py issudo cp jemdoc.py /usr/local/bin/jemdoc原创 2019-09-15 21:48:24 · 223 阅读 · 0 评论 -
python gexf.write 无法写入的问题
在官网上的程序from gexf import Gexf# test helloworld.gexf gexf = Gexf("Paul Girard","A hello world! file") graph=gexf.addGraph("directed","static","a hello world graph")graph.addNode("0","hello") gra...原创 2019-09-13 22:30:34 · 301 阅读 · 0 评论 -
Error with igraph library - deprecated library
DeprecationWarning: To avoid name collision with the igraph project, this visualization library has been renamed to ‘jgraph’. Please upgrade when convenient.解决方法见:解决方法转载 2019-08-13 02:15:13 · 174 阅读 · 0 评论 -
MacOs python from mpi4py import MPI 报错
今天在读其他人的程序时遇到了from mpi4py import MPI报错Reason: image not found搜索了以后发现了问题所在refer1但是在sudo rm -r ./mpi4py后使用pip(更新前后)和conda均不能安装,错误为error: Cannot compile MPI programs. Check your configuration!!!...原创 2019-07-24 04:46:50 · 2644 阅读 · 0 评论 -
一些Python的小东西
生成动态变量for i in range(10): #name='a'+str(i) locals()['a'+str(i)]=i print(a1,a2,a3,a4)原创 2019-07-19 04:10:32 · 120 阅读 · 0 评论