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 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 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
# 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 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 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 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 random | |
raw = [1,2,3,4,5,6,7,8,9,0] | |
print raw | |
b = raw.pop(0) | |
print b |
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
#!/bin/sh | |
#DEV 内网接口,ODEV外网接口) | |
IDEV="br-lan" | |
ODEV="pppoe-wan" | |
# 定义总的上下带宽 | |
UP="0.45mbit" | |
DOWN="9mbit" |
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
@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;} | |
NewerOlder