- 博客(5)
- 收藏
- 关注
原创 Python及requests乱码问题的总结
今天在用requests抓取网页的时候,发现有个页面,r = requests.get(url)s = r.texts一直都有乱码以前每次碰到乱码问题,解决完了就过去了,今天想好好研究一下,免得以后再遇到又不知道怎么办了。下面是一些总结:以下为找到的资料:字符串在Python内部的表示是unicode编码,因此,在做编码转换时,通常需要以unicode作为中
2016-01-17 22:48:59
17500
1
原创 通过wget从oracle下载jdk 8
参考 http://blog.youkuaiyun.com/feihuadao/article/details/42835075wget –no-cookies –header “Cookie: oraclelicense=accept-securebackup-cookie;” http://download.oracle.com/otn-pub/java/jdk/8u60-b27/jdk-8u60-linu
2015-09-22 16:11:56
1145
原创 leetcode之Repeated DNA Sequences
用set去重复元素,最后 112 ms:class Solution: # @param s, a string # @return a list of strings def findRepeatedDnaSequences(self, s): d = {} i = len(s) l = [] ind
2015-02-15 14:52:16
712
原创 ubuntu下web.py加apache 实现简单服务器
做过的事如果不记下来很容易就忘了。。。还是应该养成记blog的习惯啊安装 easy_install:sudo apt-get install python-setuptools安装web.py:sudo easy_install web.py安装apache服务器:apt-get install apache2安装mod-wsgi:sudo apt-
2015-02-10 15:58:39
1053
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人