This file contains 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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("weibo.com") { | |
.M_sc_tips, | |
.WB_right_module, | |
.WB_frame_b, .WB_main_l, .W_fold, .PCD_mplayer, .S_content_r, | |
.WB_main_r, | |
.W_layer_tips_top | |
{display:none;} | |
This file contains 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
#!/bin/sh | |
#DEV 内网接口,ODEV外网接口) | |
IDEV="br-lan" | |
ODEV="pppoe-wan" | |
# 定义总的上下带宽 | |
UP="0.45mbit" | |
DOWN="9mbit" |
This file contains 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 random | |
raw = [1,2,3,4,5,6,7,8,9,0] | |
print raw | |
b = raw.pop(0) | |
print b |
This file contains 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 eventlet | |
from eventlet.green import urllib2 | |
urls=[ "http://www.douban.com", | |
"http://weibo.com", | |
] | |
def fetch(url): | |
return url, urllib2.urlopen(url).info() |
This file contains 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
# We import the markdown library | |
import markdown | |
from flask import Flask | |
from flask import render_template | |
from flask import Markup | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): |
This file contains 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 os | |
import redis | |
import urlparse | |
import random | |
from flask import Flask, request, url_for | |
app = Flask(__name__) | |
r = redis.Redis(host='localhost',port=6379) |
This file contains 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 MYSQLdb | |
db = MYSQLdb.connect(host="localhost", #host | |
user="john", # username | |
passwd="megajonhy", #password | |
db="jonhydb") | |
# you must create a Cursor object. It will let you execute all the queries you need | |
cur = db.cursor() | |
# Use all the SQL you like |
This file contains 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 sys | |
import re | |
import requests | |
import gevent | |
from bs4 import BeautifulSoup | |
import urlparse | |
import time | |
This file contains 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 sys | |
import re | |
import requests | |
import gevent | |
from bs4 import BeautifulSoup | |
import urlparse | |
import time |
This file contains 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
''' http://blog.csdn.net/CUMT_GPF/article/details/46390509 ''' | |
import re | |
import sys | |
import requests | |
from pyquery import PyQuery as pq | |
reload(sys) | |
sys.setdefaultencoding('GBK') | |
#fp = open("d:/result.txt",'w') | |
url = 'http://xlfans.com/' |
OlderNewer