摘要: 1 import re 2 import requests 3 4 def getHTMLText(url): 5 try: 6 r = requests.get(url, timeout = 30) 7 r.raise_for_status() 8 r.encoding = r.apparent_encoding 9 ... 阅读全文
posted @ 2018-05-25 18:06 Kayden_Cheung 阅读(1309) 评论(0) 推荐(0) 编辑
摘要: 这是统计学习方法中的一道题目,下面是维特比算法的代码实现: 阅读全文
posted @ 2018-05-25 10:21 Kayden_Cheung 阅读(818) 评论(0) 推荐(0) 编辑
摘要: 正则表达式库re是非常重要的一个库。 首先正则表达式有两种表示类型,一种是raw string类型(原生字符串类型),也就是我们经常看到的r' '的写法,另一种是不带r的写法,称为string类型。raw string的作用是把转义字符当做普通的字符,所以一般来说,我们都是使用raw string类 阅读全文
posted @ 2018-05-25 00:08 Kayden_Cheung 阅读(2420) 评论(1) 推荐(0) 编辑
//目录