This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # @Author: zhibin | |
| # @Date: 2015-03-18 18:20:21 | |
| # @Last Modified by: zhibin | |
| # @Last Modified time: 2015-03-18 18:25:03 | |
| from urllib import urlencode | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # coding=utf-8 | |
| import requests | |
| from bs4 import BeautifulSoup as bs | |
| s = requests.Session() | |
| headers = { | |
| 'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36', | |
| 'Origin': 'http://www.v2ex.com', | |
| 'Referer': 'http://www.v2ex.com/signin', | |
| 'Host': 'www.v2ex.com', | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package test; | |
| //最小编辑距离的算法动态规划实现 | |
| public class Min_Edit_Distance { | |
| private static int cost = 0; | |
| public static int minEdit_distance(String source, String target) | |
| { | |
| final int n = target.length(); | |
| final int m = source.length(); | |
| if(m == 0 )return m; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python | |
| # coding=utf8 | |
| # author=evi1m0#n0tr00t | |
| # Fri Apr 10 14:14:35 2015 | |
| import os | |
| import re | |
| import sys | |
| import wget | |
| import requests | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class DCT2 { | |
| private static final int N = 130; | |
| private double[] c = new double[N]; | |
| public DCT2() { | |
| this.initializeCoefficients(); | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python | |
| # coding=utf8 | |
| # author=evi1m0 | |
| # website=linux.im | |
| ''' | |
| 12306 Captcha Picture: | |
| author: Evi1m0@20150316 | |
| 1. Download Captcha | |
| 2. Pic Conver Text | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # -*- coding:utf-8 -*- | |
| import requests, os, re, sys, time | |
| from time import sleep | |
| from threading import Thread | |
| reload(sys) | |
| sys.setdefaultencoding('utf8') | |
| UPDATE_INTERVAL = 0.01 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # -*- coding:utf-8 -*- | |
| import requests | |
| from time import sleep | |
| from threading import Thread | |
| UPDATE_INTERVAL = 0.01 | |
| class URLThread(Thread): | |
| def __init__(self, url, timeout=10, allow_redirects=True): | |
| super(URLThread, self).__init__() | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import webbrowser | |
| import os | |
| urls = [ | |
| 'http://www.douban.com', | |
| 'http://weibo.com', | |
| 'http://www.zhihu.com', | |
| 'http://www.v2ex.com/', | |
| 'https://github.com/', | |
| 'https://mail.google.com/', | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import math,random | |
| import numpy as np | |
| def rand(a, b): | |
| return (b-a)*random.random() + a | |
| def dtanh(y): | |
| return 1.0-y*y | |
| def mat(x): |