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 zlib | |
import string | |
BLOCK_SIZE = 16384 | |
"""Read block size""" | |
WINDOW_BUFFER_SIZE = 16 + zlib.MAX_WBITS | |
"""zlib window buffer size, set to gzip's format""" | |
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 logging | |
from django.utils import translation | |
class SubdomainLanguageMiddleware(object): | |
""" | |
Set the language for the site based on the subdomain the request | |
is being served on. For example, serving on 'fr.domain.com' would | |
make the language French (fr). |
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 | |
# | |
# Get Cloudwatch metrics for the EBS volumes attached to an instance | |
# | |
import datetime | |
import logging | |
import sys | |
import urllib |
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 | |
# | |
# Get Cloudwatch metrics for an ELB | |
# | |
# Inspired by http://onemoredigit.com/post/3263274796/single-instance-cloudwatch-stats-with-boto | |
# | |
import datetime | |
import sys |
NewerOlder