
python
乌拉拉_
学习中……
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
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 · 1071 阅读 · 0 评论 -
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 · 724 阅读 · 0 评论 -
Python及requests乱码问题的总结
今天在用requests抓取网页的时候,发现有个页面, r = requests.get(url) s = r.text s一直都有乱码 以前每次碰到乱码问题,解决完了就过去了,今天想好好研究一下,免得以后再遇到又不知道怎么办了。下面是一些总结: 以下为找到的资料: 字符串在Python内部的表示是unicode编码,因此,在做编码转换时,通常需要以unicode作为中原创 2016-01-17 22:48:59 · 17519 阅读 · 2 评论