API | Status Codes |
---|---|
[Twitter][tw] | 200, 304, 400, 401, 403, 404, 406, 410, 420, 422, 429, 500, 502, 503, 504 |
[Stripe][stripe] | 200, 400, 401, 402, 404, 429, 500, 502, 503, 504 |
[Github][gh] | 200, 400, 422, 301, 302, 304, 307, 401, 403 |
[Pagerduty][pd] | 200, 201, 204, 400, 401, 403, 404, 408, 500 |
[NewRelic Plugins][nr] | 200, 400, 403, 404, 405, 413, 500, 502, 503, 503 |
[Etsy][etsy] | 200, 201, 400, 403, 404, 500, 503 |
[Dropbox][db] | 200, 400, 401, 403, 404, 405, 429, 503, 507 |
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 | |
# An exponential backoff around Boto3 DynamoDB, whose own backoff eventually | |
# fails on long multipage scans. We'd like to use this as a wrapper somehow, | |
# see: https://gist.github.com/numberoverzero/cec21b8ca715401c5662 | |
from time import sleep | |
import boto3 | |
from boto3.dynamodb.conditions import Attr |
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 python3 | |
import boto3, argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument('-b','--bucket', help='Name of your S3 Bucket', required=True) | |
parser.add_argument('-o','--object', help='Name of the object + prefix in your bucket', required=True) | |
parser.add_argument('-t','--time', type=int, help='Expirery in seconds Default = 60', default=60) | |
args = vars(parser.parse_args()) |
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 errno | |
import functools | |
import socket | |
from tornado import ioloop, iostream | |
class Connection(object): | |
def __init__(self, connection): | |
self.stream = iostream.IOStream(connection) | |
self._read() |