Skip to content

Instantly share code, notes, and snippets.

View mursts's full-sized avatar

Satoshi Miura mursts

View GitHub Profile
@mursts
mursts / create_sdb_domain.py
Created June 25, 2013 17:35
Amazon SimpleDBのドメインを作成する。
#!/usr/bin/env python
# coding: utf-8
import boto.sdb
def main():
conn = boto.sdb.connect_to_region('ap-northeast-1')
if conn is None:
print 'connect failed.'
@mursts
mursts / dropbox_camera_arrangement.py
Created November 3, 2012 06:37
Dropboxの"Camera Uploads"にアップロードされた写真・動画ファイルを日付フォルダに振り分ける
#!/usr/bin/env python
# coding:utf-8
import os
import time
import re
import shutil
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
@mursts
mursts / sample_watchdog.py
Created October 24, 2012 16:26
watchdogを使ってホームディレクトリのファイルを監視するスクリプト
#!/usr/bin/env python
# coding:utf-8
import os
import time
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
class EventHandler(FileSystemEventHandler):
def on_created(self, event):
@mursts
mursts / gdrive_list.py
Created May 6, 2012 12:22
Google Driveのファイルを取得する
#!/usr/bin/envy python
# coding:utf-8
import sys
from getpass import getpass
import gdata.docs.client
APP_NAME = 'GoogleDocumentAPITest'
SERVICE_NAME = 'writely'
URI = 'https://docs.google.com/feeds/default/private/full/-/mine'
@mursts
mursts / base58.py
Created March 30, 2012 06:12
Flickrの短縮URLを作成
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
import re
class Base58:
def __init__(self):
self._CHARS = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'
self._CHAR_NUM = len(self._CHARS)
@mursts
mursts / hanako.py
Created March 22, 2012 06:44
環境省花粉観測システム(はなこさん)から花粉データを取得
#!/usr/bin/env python
# coding:utf-8
import re
import requests
class Hanako:
COOKIE_URL = 'http://kafun.taiki.go.jp/Hyou0.aspx?MstCode={0}&AreaCode={1}'
INFO_URL = 'http://kafun.taiki.go.jp/Hyou2.aspx'
@mursts
mursts / naver_feed_parser.py
Created March 16, 2012 03:02
NAVERまとめのRSSをパースする
#!/usr/bin/env python
# -*- condign:utf-8 -*-
import requests
import feedparser
def main():
node_list = [
lambda x: ('title', x.title),
lambda x: ('link', x.link),