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 | |
export DISPLAY=:0 | |
Xvfb -screen 0 1280x1024x24 > /dev/null 2> /dev/null & | |
sleep 5 | |
fluxbox > /dev/null 2> /dev/null & |
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 re | |
import htmlentitydefs | |
def replace_htmlentity(string): | |
amp = string.find('&') | |
if amp == -1: | |
return string | |
entity = re.compile("&([A-Za-z]+);") | |
entity_match = entity.findall(string) |
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
def isascii(c, printable = False): | |
if 0x00 <= ord(c) <= 0x7f: | |
if printable: | |
if 0x20 <= ord(c) <= 0x7e: | |
return True | |
else: | |
return False | |
else: | |
return True | |
else: |
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
def utf2ucs(utf): | |
if utf & 0x80: | |
# multibyte | |
buf = [] | |
while not(utf & 0x40): | |
buf.append(utf & 0x3f) | |
utf >>= 8 | |
buf.append(utf & (0x3f >> len(buf))) | |
ucs = 0 |
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 twitter | |
#============================== | |
# Settings | |
USER = "" | |
PASS = "" | |
#============================== |
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 time, random | |
import urllib, urllib2 | |
import hmac, hashlib | |
import cgi | |
# | |
# Twitter OAuth Sample Script | |
# * techno - Hirotaka Kawata | |
# * http://techno-st.net/ | |
# |
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 curses | |
def mbgetstr(stdcur, sety, setx, debug = False): | |
s = u"" | |
i = 0 | |
curses.noecho() |
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 time, random | |
import urllib, urllib2 | |
import hmac, hashlib | |
import cgi | |
# | |
# OAuth Module for Twitter |
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 | |
def print_dict(dic, h = ""): | |
print "%s{" % h | |
for d in dic: | |
print " %s%s\t:" % (h, d), | |
if isinstance(dic[d], dict): | |
print "" | |
print_dict(dic[d], h + " ") | |
else: |
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 | |
def test1(id, **kwargs): | |
print id, kwargs | |
def test2(*args, **kwargs): | |
print args | |
print kwargs | |
def test3(id, name, mail, |
OlderNewer