- Update HISTORY.md
- Commit the changes:
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
- Update version number (can also be minor or major)
bumpversion patch
| import simplejson | |
| from boto.s3.connection import S3Connection | |
| from boto.s3.key import Key | |
| class S3KeyStore(object): | |
| def __init__(self, access_key, secret_key, bucket): | |
| self.conn = S3Connection(access_key, secret_key) | |
| self.bucket = self.conn.create_bucket(bucket) | |
| def get(self, key): |
| from os.path import splitext | |
| from django.core.exceptions import ValidationError | |
| from django.utils.translation import ugettext_lazy as _ | |
| from django.template.defaultfilters import filesizeformat | |
| class FileValidator(object): | |
| """ | |
| Validator for files, checking the size, extension and mimetype. |
| 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). |
| """ | |
| @author Jay Taylor [@jtaylor] | |
| @date 2010-11-01 | |
| Copyright Jay Taylor 2010 | |
| """ | |
| #import socks | |
| import socket |
| # Django settings for dnsly project. | |
| from unipath import FSPath as Path | |
| import os | |
| def env(key, default=None): | |
| """Retrieves env vars and makes Python boolean replacements""" | |
| val = os.getenv(key, default) | |
| if val == 'True': | |
| val = True |
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
bumpversion patch
| import json, datetime | |
| class RoundTripEncoder(json.JSONEncoder): | |
| DATE_FORMAT = "%Y-%m-%d" | |
| TIME_FORMAT = "%H:%M:%S" | |
| def default(self, obj): | |
| if isinstance(obj, datetime.datetime): | |
| return { | |
| "_type": "datetime", | |
| "value": obj.strftime("%s %s" % ( |
| ###### | |
| # Author: Marcello de Sales ([email protected]) | |
| # Description: Create Create Environment Variables in EC2 Hosts from EC2 Host Tags | |
| # | |
| ### Requirements: | |
| # * Install jq library (sudo apt-get install -y jq) | |
| # * Install the EC2 Instance Metadata Query Tool (http://aws.amazon.com/code/1825) | |
| # | |
| ### Installation: | |
| # * Add the Policy EC2:DescribeTags to a User |
| Code | Title | Duration | Link |
|---|---|---|---|
| Keynote | Andy Jassy Keynote Announcement Recap | 0:01 | https://www.youtube.com/watch?v=TZCxKAM2GtQ |
| Keynote | AWS re:Invent 2016 Keynote: Andy Jassy | 2:22 | https://www.youtube.com/watch?v=8RrbUyw9uSg |
| Keynote | AWS re:Invent 2016 Keynote: Werner Vogels | 2:16 | https://www.youtube.com/watch?v=ZDScBNahsL4 |
| Keynote | [Tuesday Night Live with Jame |
The update_item method in Boto3 requires preparing something like this:
try:
result = table.update_item(
Key={
'id': event['pathParameters']['id']
},
ExpressionAttributeNames=attr_names,
ExpressionAttributeValues=expression_vals,