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
#include<iostream> | |
#include<algorithm> | |
#include<vector> | |
#include<boost/lexical_cast.hpp> | |
#include<boost/iterator/counting_iterator.hpp> | |
int main(void) { | |
std::vector<std::string> fizzbuzz; |
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 -*- | |
''' | |
スポットインスタンスを自動的に指定個数リクエストをかけてインスタンスを作る。 | |
作成したインスタンスIDを標準出力する。 | |
Python2.7 + boto で動作確認。 | |
キーを残したくない場合はコネクションの作成を工夫すること。 | |
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
-- test on ghci console | |
data Present a = Redbox a | Bluebox a deriving Show | |
instance Eq (Present a) | |
let a = Redbox 10 | |
let b = Redbox 30 | |
-- never stop | |
a == b |
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 -*- | |
""" | |
Get Dump from DynamoDB (All Tables). | |
This program does not cover all DynamoDB format, | |
but It's good enough for me. | |
restore.py can restore Tables from this outputs JSON files. |
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. |
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 | |
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 | |
# ----------------------- | |
# 設定によって変更するところ | |
# ----------------------- | |
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
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 -*- | |
import json | |
import gzip | |
import StringIO | |
import boto3 | |
def upload(bucket, key, obj): | |
s3 = boto3.client('s3') |
OlderNewer