码迷,mamicode.com
首页 >  
搜索关键字:coding    ( 12955个结果
一个简单的Python网络爬虫(抓图),针对某论坛.
1 #coding:utf-8 2 import urllib2 3 import re 4 import threading 5 6 #图片下载 7 def loadImg(addr,x,y,artName): 8 data = urllib2.urlopen(addr).read()...
分类:编程语言   时间:2015-01-30 14:37:43    阅读次数:150
[Leetcode][Python]28: Implement strStr()
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'28: Implement strStr()https://oj.leetcode.com/problems/implement-strstr/Implement strStr()...
分类:编程语言   时间:2015-01-30 06:40:37    阅读次数:221
[Leetcode][Python]27: Remove Element
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'27: Remove Elementhttps://oj.leetcode.com/problems/remove-element/Given an array and a val...
分类:编程语言   时间:2015-01-30 06:38:01    阅读次数:212
[Leetcode][Python]26: Remove Duplicates from Sorted Array
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'26: Remove Duplicates from Sorted Arrayhttps://oj.leetcode.com/problems/remove-duplicates-...
分类:编程语言   时间:2015-01-30 06:35:01    阅读次数:183
perl CGI重构原则
帝都的宇宙中心,古老文明的发源地,coding的传统在码农手中世代延续,CGI作为传承了一千多年的古老工艺,并没有被AJAX收割殆尽,仍在这里焕发着勃勃生机。--舌尖上的ABCD 背景 借着开发Stroy的机会,把一个古老的CGI脚本做了一下重构,有点心得,赶紧写下来,因为以后不太可能有机会经常接触perl的CGI了。 产品中现有的CGI并非像很多年以前那样用来产生web页面,而是作为系...
分类:其他好文   时间:2015-01-29 17:47:25    阅读次数:202
[Leetcode][Python]24: Swap Nodes in Pairs
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'24: Swap Nodes in Pairshttps://oj.leetcode.com/problems/swap-nodes-in-pairs/Given a linked...
分类:编程语言   时间:2015-01-29 01:23:35    阅读次数:178
Python 检查网站可用性
#!/usr/bin/env?python #?coding=utf-8 import?socket s?=?socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.connect((‘www.sina.com.cn‘,80)) s.send(‘GET?/?HTTP/1.1\r\nHost:www.sina.com.cn\r\...
分类:编程语言   时间:2015-01-28 19:57:14    阅读次数:377
LeetCode --- 7. Reverse Integer
题目链接:Reverse Integer Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Have you thought about this? Here are some good questions to ask before coding. Bo...
分类:其他好文   时间:2015-01-28 14:47:05    阅读次数:156
Haffman Code
Haffman Code 什么是Haffman编码?以后再说,嘿嘿先上实现。 Python 实现: 在这个实现当中,我们并没有统计文本的字符出现频率,仅仅是为Haffman Coding的一个demo. """ Code writer : EOF Code file : haffman.py Code date : 2015.01.28 e-mail ...
分类:其他好文   时间:2015-01-28 14:38:43    阅读次数:145
leetcode.7-----------Reverse Integer
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Have you thought about this? Here are some good questions to ask before coding. Bonus points for y...
分类:其他好文   时间:2015-01-28 10:00:47    阅读次数:161
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!