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/python | |
# -*- coding: utf-8 -*- | |
'''To use gzip file between python application and S3 directly for Python3. | |
Python 2 version - https://gist.github.com/a-hisame/f90815f4fae695ad3f16cb48a81ec06e | |
''' | |
import io | |
import gzip | |
import json |
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 -*- | |
''' | |
日本語の記事とかだと - http://qiita.com/higitune/items/0ca244373d380cf1c060 | |
''' | |
import datetime | |
import pytz |
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 datetime | |
import zipfile | |
import io | |
from bottle import HTTPResponse |
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 -*- | |
''' | |
stdin reader with timeout implementation | |
タイムアウト付き標準入力モジュール | |
c.f. http://qiita.com/siroken3/items/4bb937fcfd4c2489d10a | |
''' | |
import sys |
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 gzip | |
import StringIO | |
import boto3 | |
def upload(bucket, key, obj): | |
s3 = boto3.client('s3') |
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
import dispatch.url | |
import dispatch.Http | |
import dispatch.as | |
import dispatch.Defaults._ | |
object Main { | |
def main(args: Array[String]): Unit = { | |
import dispatch._, Defaults._ | |
val svc = url("http://www.google.co.jp/") |
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 | |
# ----------------------- | |
# 設定によって変更するところ | |
# ----------------------- | |
REGION = 'ap-northeast-1' | |
AWS_ACCESS_KEY = '' | |
AWS_SECRET_ACCESS_KEY = '' |
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 time | |
import datetime | |
import json | |
import logging | |
import boto.sqs |
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 uuid | |
import datetime | |
import boto.sns | |
# ----------------------- | |
# 設定によって変更するところ |
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 -*- | |
""" | |
Restore DynamoDB Tables from Dump File. | |
This program does not cover all DynamoDB format, | |
but It's good enough for me. | |
dump.py can dump Tables to JSON file. |
NewerOlder