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 -*- | |
Plugin.create :wiin_eject do | |
on_appear do |ms| | |
ms.each do |m| | |
if m.message.to_s =~ /ウ(イ|ィ)ーン|[Ee]ject/ | |
system("eject") | |
end | |
end | |
end | |
end |
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 ruby | |
# -*- coding: utf-8 -*- | |
import csv | |
import tweepy | |
CONSUMER_KEY = 'CONSUMER_KEY' | |
CONSUMER_SECRET = 'CONSUMER_SECRET' | |
ACCESS_KEY = 'ACCESS_TOKEN' | |
ACCESS_SECRET = 'ACCESS TOKEN SECRET' |
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
for i in range(1,101): print [0,'Fizz','Buzz','FizzBuzz'][(i%3<1)+2*(i%5<1)] or i |
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 -*- | |
# Email を扱うために必要なモジュール | |
import imaplib, email | |
# http://www.python-excel.org/ でダウンロード・インストールしておくこと | |
import xlwt | |
# 保存するファイル名 | |
savename = 'list.xlsx' |
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 -*- | |
# Email を扱うために必要なモジュール | |
import imaplib, email | |
# http://www.python-excel.org/ でダウンロード・インストールしておくこと | |
import xlwt | |
# 正規表現を扱うためのモジュール | |
import re |
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
rem Execute it in the directory which includes music files | |
rem It requires one argument which will become created m3u playlist file's name | |
for %%i in (*.mp3,*.mp4,*.m4a,*.wma,*.wav) do echo %cd%\%%i >> %1.m3u |
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
# -*- encoding: utf-8 -*- | |
from PIL import Image | |
from math import sqrt | |
Max = 333 | |
pix = 3 | |
filename = 'output.png' | |
f1 = lambda x,y: sorted(range(x-(y-1)*2+1-y, x-(y-1)*2+1),reverse=True) | |
isprime = lambda x: x != 1 and (x == 2 or not 0 in [x%y for y in range(2,int(sqrt(x))+1)]) |
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 tweepy | |
import re | |
CONSUMER_KEY = '' | |
CONSUMER_SECRET = '' | |
me = 'YOUR_SCREEN_NAME' | |
class Listener(tweepy.StreamListener): | |
def on_status(self,s): |
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 getdiv(n): | |
l = [] | |
for k in xrange(1,n): | |
if n%k==0: l.append(k) | |
return l | |
def go(l,n,m): | |
l = [[x,0] for x in l if x/m <= 0.5] | |
f = [0 for x in xrange(len(l))] | |
for i in xrange(2**len(f)-1): |
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 google.appengine.api import images | |
from google.appengine.ext.webapp import template | |
import webapp2 as webapp | |
import os | |
from StringIO import StringIO | |
try: from PIL import Image | |
except ImportError: import Image |
OlderNewer