- 博客(6)
- 收藏
- 关注
原创 Crawl byBeautifulSoup
基础知识 HTML-hyper text markup language,超文本链接标示语言。利用类似<a>, <\a>的标签来识别内容,然后通过浏览器的实现标准来翻译成精彩的页面。当然,一个好看的网页并不仅仅有HTML,毕竟字符串是静态的,只能实现静态效果,要做出漂亮的网页还需要能美化样式的CSS和动态效果的JavaScript。 DOM-document object ...
2019-01-22 12:15:36
293
原创 io+plt+cv2
搞清楚skimage、matplotlib、cv2之间的共通与区别。 skimage skimage下有很多包,常用的应该是io,data,transform # read and show image img1 = io.imread(fname) # dtype=uint8 print(img1.shape) print(img1[:1,:3,:]) io.imshow(img1) io.sh...
2019-01-15 11:21:00
278
原创 txt+csv
##---txt---## def open(file, mode='r', ...): 'r' read only 'w' override 'a' appending open 之后: with open(file, 'r') as f: # 不全部放在内存里,即用即读 for line in f: do_sth(line) ...
2019-01-15 11:20:15
247
原创 os+glob
os import os os.getcwd() # 显示当前文件夹路径 os.listdir(dir_path) # 列举目录下的所有文件 os.listdir('.') # 显示当前文件夹下的所有文件 # os.path os.path.abspath(path) # 返回path的绝对路径 os.path.split(os.getcwd()) # 将路径分解为(文件夹,文件名),返回元组...
2019-01-15 11:01:16
240
原创 argparse
recommended command-line parse module ls - default usage ls dir - position argument 位置参数,仅依赖于 where on the command line ls -l - optional argument --help - come across a program without using it before...
2019-01-15 10:59:50
138
原创 json
json文件的使用方式 json 全称 JavaScript object notation,是一种轻量级的数据交换格式。python中的json模块提供了json数据的处理功能。 python中最常用的基本数据结构之一就是字典,其典型结构如下: d = { 'a': 123, 'b': { 'x': ['A', 'B', 'C'] } } 而json的结...
2019-01-15 10:55:33
220
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人