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 __future__ import division | |
import re | |
import os | |
import time | |
import bottle | |
from xml.dom.minidom import parseString | |
from math import * | |
helpstr = '''\ |
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/env python3 | |
import sys | |
if sys.version_info.major == 2: | |
print ('SORRY: scan.py works under python 3.') | |
exit(1) | |
from pathlib import Path | |
struct = '''\ | |
<!doctype html> |
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 logging | |
import os, sys, json | |
from PyQt4 import QtGui | |
from PyQt4.QtCore import QTimer | |
import imaplib, StringIO, rfc822 | |
from email.Header import decode_header | |
_config = json.load(open('config.json')) # server, user, pasw | |
locals().update(_config) |
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 re | |
import os | |
import sys | |
import time | |
import bisect | |
import threading | |
subs = [] |
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 | |
import os | |
import sys | |
# sscl from http://hg.splayer.org/splayerx/raw/0b9e84441210/binaries/x86_64/sscl | |
mv = sys.argv[1] | |
out = os.popen('sscl --pull --video-file "{}"'.format(mv)).read() | |
print out | |
for sf in out.splitlines(): |
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 json | |
import urllib2 | |
from os import system, popen | |
# generate speech audio file with 'say' in osx and ffmpeg | |
words = 'Hello world.' | |
system('say "{}" -o say.aiff'.format(words)) | |
system('ffmpeg -i say.aiff say.flac -loglevel quiet -y') |
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 | |
# ref: https://github.com/FanfouAPI/FanFouAPIDoc/wiki/Oauth | |
# http://open.weibo.com/wiki/OAuth | |
import os | |
import json | |
import random | |
import requests | |
import webbrowser | |
from time import time | |
from urllib import quote_plus |
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
// step 1 | |
var content=$('.info')[0].innerHTML; | |
var last=''; | |
var observer = new MutationObserver(function(e) { | |
var c=$('.inner .content:first')[0].innerHTML; | |
if(c!=last){ | |
last = c; | |
content = content + '\n\n' + c; | |
$('.page-next').click(); | |
} |
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
// ==UserScript== | |
// @name twitter instagram previewer | |
// @namespace http://scturtle.me/ | |
// @version 1 | |
// @match https://twitter.com/* | |
// @require http://code.jquery.com/jquery.min.js | |
// @require http://www.jqui.net/demo/mutate/mutate.events.js | |
// @require http://www.jqui.net/demo/mutate/mutate.min.js | |
// ==/UserScript== |
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 __future__ import unicode_literals | |
import re | |
import sys | |
import requests | |
import HTMLParser | |
cookie_t = '' | |
uid = '' | |
filename = '' |