I hereby claim:
- I am toastdriven on github.
- I am daniellindsley (https://keybase.io/daniellindsley) on keybase.
- I have a public key whose fingerprint is 96D8 9667 409F BAD8 F716 690D 554A 1A3D B0B6 CFFE
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
from __future__ import print_function | |
import glob | |
import os | |
import re | |
old_method_syntax = re.compile('[A-Z][\w\d_]+\.[\w\d_]+\(self') | |
cwd = os.getcwd() | |
files = glob.glob(os.path.join(cwd, '*.py')) |
import boto | |
s3 = boto.connect_s3() | |
bukkit = s3.get_bucket('test_for_yellowfish') | |
test = bukkit.get_key('test.txt') | |
test.set_acl('public-read') |
apns_msg = json.dumps({"aps":{"alert":"",'sound':'default',"badge":14}}) | |
published = sns_connection.publish( | |
message_structure='json', | |
message=json.dumps({'default':'This is the default message',"APNS_SANDBOX":apns_msg}) | |
) |
Total time for 500 runs. | |
Bubble sort [average]: 0.00372815132141 seconds | |
Bubble sort [worst]: 0.00349998474121 seconds | |
Bubble sort [best]: 0.00349807739258 seconds | |
Bubble sort [huge]: 6.59933185577 seconds | |
Quick sort [average]: 0.00668597221375 seconds | |
Quick sort [worst]: 0.0066499710083 seconds | |
Quick sort [best]: 0.00685095787048 seconds |
const int CENTER = 8; | |
const int UR = 9; | |
const int LR = 11; | |
const int LL = 6; | |
const int UL = 10; | |
void setup() { | |
pinMode(CENTER, OUTPUT); | |
pinMode(UR, OUTPUT); |
# The gif used for uploading below can be grabbed from https://dl.dropboxusercontent.com/u/114233/tally_ho.gif | |
import boto | |
conn = boto.connect_s3() | |
try: | |
bucket = conn.get_bucket('ssl_test') | |
except: | |
bucket = conn.create_bucket('ssl_test') |
""" | |
When I run this (vs. the Java SNS example), I get nearly identical bodies being submitted. | |
The only difference is the URL-escaping, the Javas serialization for JSON strips out spaces | |
& Boto adds a ``ContentType=JSON`` key, which the service accepts. | |
Verification this works on Android would be appreciated. | |
""" | |
import json | |
import os |