sed -r '' file # -r, --regexp-extended
grep '^$' file.txt
split -l [number] --numeric-suffixes=[from number] --additional-suffix=[suffix] file [prefix]
-l, --lines=NUMBER
-d, --numeric-suffixes[=from number]
#!/usr/bin/env python2 | |
# vim: set fileencoding=utf8 | |
import os, sys, re, json, requests, argparse, random, multiprocessing, time, subprocess | |
api_key = '' | |
############################################################ | |
# wget exit status | |
wget_es = { |
#!/usr/bin/env python2 | |
# vim: set fileencoding=utf8 | |
import os | |
import sys | |
import requests | |
import urllib | |
import json | |
import re | |
import time |
#!/usr/bin/env python2 | |
# vim: set fileencoding=utf8 | |
import re, StringIO, sys, os, time, json, gzip, urllib2, argparse, select | |
from HTMLParser import HTMLParser | |
parser = HTMLParser() | |
s = u'\x1b[1;%dm%s\x1b[0m' # terminual color template | |
email = '' # 输入账号后,可以将播放的歌曲记录到 http://www.xiami.com/space/charts-recent/u/{id} |
#!/usr/bin/env python2 | |
# vim: set fileencoding=utf8 | |
import os, sys, json, datetime | |
s = u'\x1b[1;%dm%s\x1b[0m' # terminual color template | |
types = ('.MKV', '.FLV', '.AVI', '.RMVB', '.MPG', '.WMV', '.RM', '.mkv', '.flv', '.avi', '.rmvb', '.mpg', '.wmv', '.rm') | |
class compare(object): | |
def __init__(self, dir_): | |
self.dir_ = dir_ |
#!/usr/bin/env python2 | |
# vim: set fileencoding=utf8 | |
import re, os | |
s = u'\x1b[1;%dm%s\x1b[0m' # terminual color template | |
r = re.compile(r'[^ -~\n]+') | |
a = [] | |
print ' --> runing', s % (93, 'http://www.xunlei6.com/2.htm') | |
f = os.popen("curl -s http://www.xunlei6.com/2.htm | iconv -f gbk -t utf8 | html2text -ascii | grep -E '(迅雷会|白|企)' | sort -u").read() |
#!/usr/bin/env python2 | |
# vim: set fileencoding=utf8 | |
import base64, requests, time, os, sys, argparse, random, subprocess | |
s = '\x1b[1;%dm%s\x1b[0m' # terminual color template | |
############################################################ | |
# wget exit status | |
wget_es = { |
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import zipfile | |
print "Processing File " + sys.argv[1] | |
file=zipfile.ZipFile(sys.argv[1],"r"); |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright (c) 2011, lepture.com | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# | |
# * Redistributions of source code must retain the above copyright |
#!/usr/bin/env python2 | |
# vim: set fileencoding=utf8 | |
import re, sys, os, random, time, json, logging, argparse, requests, urllib | |
from mutagen.id3 import ID3,TRCK,TIT2,TALB,TPE1,APIC,TDRC,COMM,TPOS,USLT | |
from HTMLParser import HTMLParser | |
parser = HTMLParser() | |
s = u'\x1b[1;%dm%s\x1b[0m' # terminual color template |