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/bash | |
# | |
# This macOS bash script helps you initialize a new Shadowsocks server with doctl in seconds. | |
# Original author: lexrus https://github.com/lexrus | |
# | |
# You can get $100 free credit for create VPS in DigitalOcean with my referral link: | |
# https://m.do.co/c/3eb5cf371fc9 | |
# | |
# Please intall and authorize doctl before running this script. | |
# https://github.com/digitalocean/doctl |
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
<script> | |
var browserName = "Other"; | |
var ua = window.navigator.userAgent; | |
browserRegExp = { | |
Sogou : /SE\s2\.X|SogouMobileBrowser/, | |
Explorer2345 : /2345Explorer|2345chrome|Mb2345Browser/, | |
Liebao : /LBBROWSER/, | |
QQBrowser : /QQBrowser/, | |
Baidu : /BIDUBrowser|baidubrowser|BaiduHD/, | |
UC : /UBrowser|UCBrowser|UCWEB/, |
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 time | |
from tqdm import * | |
aa = [] | |
for x in range(1000): | |
aa.append("a" + str(x)) | |
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
Server: | |
127.0.0.1 - - [14/Sep/2014 00:30:57] "POST /RPC2 HTTP/1.1" 200 - | |
Client: | |
result: -60 | |
result type: <type 'int'> |
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://XingKaiXin.me/2014/09/08/apple-event-2014-sep/ | |
蹦极超级爽,下次我要跳伞啦! http://XingKaiXin.me/2014/09/07/bungy-is-cool/ | |
Python小工具之CSV转为Excel http://XingKaiXin.me/2014/09/06/python-csv-conversion-excel/ | |
LNMP install on Ubuntu http://XingKaiXin.me/2014/09/04/lnmp-install-on-ubuntu/ | |
本站迁入DigitalOcean,顺便做个小结 http://XingKaiXin.me/2014/09/01/moveto-digitalocean/ | |
APP推荐:WATCH OUT! http://XingKaiXin.me/2014/08/31/app-watch-out/ | |
罗质翔,赢家是苹果 http://XingKaiXin.me/2014/08/27/laoluovsziru/ | |
日剧推荐:圣女还是恶女 http://XingKaiXin.me/2014/08/24/recommend-seijo/ | |
APP推荐:优秀的稍后读Pocket http://XingKaiXin.me/2014/08/20/recommend-an-app-pocket/ | |
APP推荐:Smash the Code http://XingKaiXin.me/2014/08/19/recommend-an-app-smash-the-code/ |
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 logging | |
import sys | |
logger = logging.getLogger("endlesscode") | |
formatter = logging.Formatter('%(name)-12s %(asctime)s %(levelname)-8s %(message)s', '%Y %m %d %H:%M:%S',) | |
file_handler = logging.FileHandler("test.log") | |
file_handler.setFormatter(formatter) | |
stream_handler = logging.StreamHandler(sys.stderr) | |
logger.addHandler(file_handler) | |
logger.addHandler(stream_handler) | |
#logger.setLevel(logging.ERROR) |
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/python | |
# -*- coding: utf-8 -*- | |
import xlwt; | |
import xlrd; | |
#import xlutils; | |
from xlutils.copy import copy; | |
# styleBoldRed = xlwt.easyxf('font: color-index red, bold on'); | |
# headerStyle = styleBoldRed; | |
# wb = xlwt.Workbook(); |
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/python | |
# -*- coding: utf-8 -*- | |
from pexpect import * | |
#import pexpect | |
import sys | |
import os | |
def initFile(*filenames): |
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 jieba | |
import sys | |
reload(sys) | |
sys.setdefaultencoding( "utf-8" ) | |
def trim(mystr): | |
x='' |
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/python | |
# -*- coding: utf-8 -*- | |
import csv | |
import xlwt | |
import os | |
import sys | |
def cvstran2xls(filename): | |
with open(filename,'rb') as f: |
NewerOlder