码迷,mamicode.com
首页 >  
搜索关键字:findall    ( 707个结果
TensorFlow object detection API应用二
前一篇讲述了TensorFlow object detection API的安装与配置,现在我们尝试用这个API搭建自己的目标检测模型。 一、准备数据集 本篇旨在人脸识别,在百度图片上下载了120张张钧甯的图片,存放在/models/research/object_detection下新建的imag ...
分类:Windows程序   时间:2018-09-17 19:43:07    阅读次数:491
xml模块
xml:模块 from xml.etree import ElementTree tree=ElementTree.parse(‘a.xml‘) #xml文件 root=tree.getroot() #拿到根 print(root.tag) #标签的名字 print(root.attrib) #看属性 print(root.text) #文本 #三种查找方式 #1.从子节点中找 print(root.find()) root.findall() #2.从整树型结构中查找 root.iter(‘rank‘) #全篇文件找 print(list(root.iter()))
分类:其他好文   时间:2018-09-13 23:12:29    阅读次数:198
re 模块
正则表达式 元字符 量词 贪婪和惰性匹配 默认贪婪 :尽可能多的匹配 回溯算法 惰性匹配:尽可能少的匹配 量词? . ?x re 模块 findall:从文件中选取需要的内容 (?P=组名)表示引用之前组的名字,引用部分匹配的内容必须和之前那个组名的内容相同 search: 验证用户输入内容“正则规 ...
分类:其他好文   时间:2018-09-11 18:02:42    阅读次数:140
正则模块
正则模块:re import re print(re.findall(‘\w‘,‘egon 123 + _ - *‘)) #\w匹配字母数据及下划线 print(re.findall(‘\W‘,‘egon 123 + _ - *‘)) #\W匹配非字母数据及下划线 print(re.findall(‘\s‘,‘egon\t 12\n3 + _ - *‘)) #\s匹配任意空白字符,等价于[\f\n\r\t] print(re.findall(‘\S‘,‘egon 123 + _ - *‘)) #\S匹配任意非空字符 print(re.findall(‘\d‘,‘egon\t 12\n3 + _ - *‘)) #\d匹配任意数字,等价于[0-9] print(re.findall(‘\D‘,‘egon\t 12\n3 + _ - *‘)) #\D匹配任意非数字 print(re.findall(‘\A‘,‘egon\t 12\n3 + _ - *‘)) #匹配字符串开始 print(re.findall(‘\n‘,‘egon\t 12\n3 + _ - *‘))
分类:其他好文   时间:2018-09-11 01:05:04    阅读次数:187
selenium使用
selenium使用:1、导入selenium模块2、启动浏览器driver=webdriver.chrome() driver.get('www.baidu.com')3、页面刷新driver.refresh()4、页面后退前进,driver.back(),driver.forward()5、设置 ...
分类:其他好文   时间:2018-09-06 23:54:24    阅读次数:298
正则表达式小记
import re str = "send_time=2018-09-05 13:58:00&msa_id=TISN456795112&version=4.0.0.0&terminal_id=200001173&txn_type=01&member_id=100025773&dgtl_envlp=2... ...
分类:其他好文   时间:2018-09-06 18:01:24    阅读次数:204
正则表达式 findall的扩展
1 # find扩展,对于分组的问题 2 # 仔细看下面这句代码,图片的地址有两个,我只想取一个 3 # 但这行代码并不能满足需求 会打印出两个地址 4 image_str2 = """<img alt="达浪妹妹哟的直播" data-original="https://rpic.douyucdn. ...
分类:其他好文   时间:2018-09-06 16:20:12    阅读次数:190
python正则表达式(5)--findall、finditer方法
findall方法 相比其他方法,findall方法有些特殊。它的作用是查找字符串中所有能匹配的字符串,并以结果存于列表中,然后返回该列表 注意: match 和 search 是匹配一次 findall 匹配所有。 1 pattern.findall方法 该方法的作用是在string[pos, e ...
分类:编程语言   时间:2018-09-03 13:36:40    阅读次数:222
python 爬虫 百度贴吧签到小工具
import requests,re,timeheader ={ "Cookie":"登陆过账号后的cookie 必须填写", "User-Agent":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Geck ...
分类:编程语言   时间:2018-09-03 02:20:34    阅读次数:161
[Sprint] Properties for project configuration
We might have some project specific configuration need to setup. The good approach to do this in Sprint is using 'Proptries'. In resouces/applicationC ...
分类:其他好文   时间:2018-09-02 15:04:26    阅读次数:157
707条   上一页 1 ... 27 28 29 30 31 ... 71 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!