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
def like(color): | |
from urllib import urlopen | |
urlopen('http://reallike.geekday.jp/?post=1&color=%s' % (color, )) | |
def send(color, count=100): | |
from multiprocessing import Pool | |
pool = Pool(processes=4) | |
for x in range(0, count): | |
pool.apply_async(func=like, args=(color, )) |
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 | |
import csv | |
import argparse | |
import htmlentitydefs | |
import unicodedata | |
from BeautifulSoup import BeautifulSoup | |
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 -*- | |
from random import randrange | |
LENGTH_OF_INT = 5 | |
def prime_list(limit): |
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
function path() { | |
var args = arguments, result = []; | |
for(var i = 0; i < args.length; i++) { | |
args[i][args[i].length - 1] = args[i][args[i].length - 1].replace('@', 'http://img.yosida95.com/SyntaxHighlighter/scripts/'); | |
result.push(args[i]); | |
} | |
return result; | |
} | |
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 | |
import sys | |
def daemonize(target=None, args=(), kwargs={}): | |
# Quit Process Group Leader | |
try: | |
if os.fork() > 0: | |
sys.exit(0) |
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 Skype4Py | |
import functools | |
import time | |
class SkypeBot(object): | |
def __init__(self): |
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
def get_gravatar(mailaddress): | |
from urllib import urlencode | |
from hashlib import md5 | |
from urlparse import urlunparse | |
_query_string = urlencode({ | |
'd': DEFAULT_USER_ICON, 's': 160 | |
}) | |
call_api_addr = [ | |
'http', 'www.gravatar.com', |
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 random | |
class Numeron(object): | |
length = 3 | |
answer = None | |
def start(self): |
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
putStrLn "Hello, Haskell" |
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 | |
import re | |
import urllib | |
import argparse | |
from urlparse import urljoin | |
from BeautifulSoup import BeautifulSoup | |
from multiprocessing import ( | |
Pool, |
OlderNewer