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 cookielib,urllib2 | |
from cStringIO import StringIO | |
from pysqlite2 import dbapi2 as sqlite | |
from BeautifulSoup import BeautifulSoup | |
# a useful function from others | |
def sqlite2cookie(filename,host): | |
con = sqlite.connect(filename) |
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 | |
from Tkinter import * | |
from threading import Thread | |
from tkMessageBox import showinfo | |
import time,tkMessageBox | |
class Timer(Thread): | |
over=False | |
pause=False | |
def __init__(self,func): |
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 | |
a=[ i.decode('utf8').encode('gbk') for i in | |
['澳', '怖', '错', '堕', '贰', '咐', '过', | |
'祸', '祸', '骏', '阔', '络', '穆', '诺', | |
'沤', '瀑', '群', '弱', '所', '唾', | |
'唾', '唾', '误', '褕', '孕', '座',] ] | |
def firstpy(s,code='utf8'): | |
s=s.decode(code).encode('gbk') |
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 re, time, sys | |
import socket | |
import threading | |
from time import time | |
from random import random | |
PORT = 8080 | |
mbps=10 |
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 os,sys,zipfile | |
def walkdir(d): | |
l=os.listdir(d) | |
nodir=True | |
for t in l: | |
p=os.path.join(d,t) | |
if os.path.isdir(p): | |
nodir=False |
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
" vim: set ft=vim: | |
" Vimperator 3.5 | |
source! /Users/scturtle/.vimperatorrc.local | |
source ~/.vimperator/plugin/pinyin-hints.js | |
let mapleader="," | |
" quick jump | |
noremap <leader>1 :b 1<cr> |
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,os,urllib2,xml | |
from xml.dom import minidom | |
lc = sys.getfilesystemencoding() | |
baseurl0="http://box.zhangmen.baidu.com/x?op=7&mode=1&count=1&listid=&title=%s" | |
baseurl1="http://box.zhangmen.baidu.com/x?op=12&count=1&mtype=4&title=%s" |
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 python2 | |
# coding: utf-8 | |
import os,socket,threading,time | |
#import traceback | |
allow_delete = False | |
local_ip = socket.gethostbyname(socket.gethostname()) | |
local_port = 8888 | |
currdir=os.path.abspath('.') |
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
altscreen on | |
#se the startup message | |
startup_message off | |
term linux | |
##use ` as the Global Key | |
## escape `` | |
##set a biger buffer | |
defscrollback 4096 | |
# | |
hardstatus alwayslastline |
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 os | |
#书籍信息 | |
title='test book' | |
creator='scturtle' | |
description='blablablabla' | |
#章节文件 | |
txtlist=['1.txt','2.txt'] |
OlderNewer