Skip to content

Instantly share code, notes, and snippets.

View ranman's full-sized avatar
🏠
Working from home

Randall Hunt ranman

🏠
Working from home
View GitHub Profile
import json
import time
import boto3
s3 = boto3.resource('s3')
sqs = boto3.resource('sqs')
queue = sqs.get_queue_by_name(QueueName="S3Example")
while True:
for message in queue.receive_messages(
@ranman
ranman / timeseries-modeling.ipynb
Created January 21, 2018 02:22
Time Series Modeling from @sunilmallya
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import time
import boto3
transcribe = boto3.client('transcribe')
transcribe.start_transcription_job(
TranscriptionJobName='RandallTest1',
Media={
'MediaFileUri': 'https://s3-us-west-2.amazonaws.com/randhunt-transcribe-demos/test.flac'
},
MediaFormat='flac',
LanguageCode='en-US',
RDS:
Amazon RDS Now Supports Database Storage Size up to 16TB and Faster Scaling for MySQL, MariaDB, Oracle, and PostgreSQL Engines
Amazon Aurora with PostgreSQL
Amazon Aurora now supports Auto Scaling for Aurora Replicas
Amazon Aurora (MySQL) Doubles Maximum Write Throughput with Support for R4 Instances
Amazon Aurora (MySQL) Speeds Join Queries by More than 10x with Asynchronous Key Prefetch
Amazon Aurora Supports Fast Database Cloning
Amazon Lex Now Generally Available

Randall's House Buying Research Plan

Requirements:

  • Garage
  • Centrall located
  • <20 minute commute for Koel
  • Pull any and all construction permits in that area or on the house. Avoid any and all sinkhole repair.
  • Research utility costs
  • Any repairs / rennovations require 3 separate estimates from different contractors.
  • look at molding
@ranman
ranman / SAM.md
Last active November 11, 2017 16:36

Hi Chris + Ajay,

Just wanted to share 3 quick reasons why I still don’t use SAM and why it’s not a self-contained solution (for me).

  1. Unable to embed my code directly in the template.

CloudFormation Example:

HitWebHookFunction:
 Type: AWS::Lambda::Function
import boto3
import io
from botocore.vendored import requests
s3 = boto3.resource('s3')
def lambda_handler(event, context):
for record in event['Records']:
buf = io.BytesIO()
s3.Object(
from requests_oauthlib import OAuth1Session
import os
CONSUMER_KEY = os.getenv("CONSUMER_KEY")
CONSUMER_SECRET = os.getenv("CONSUMER_SECRET")
ACCESS_KEY = os.getenv("ACCESS_KEY")
ACCESS_SECRET = os.getenv("ACCESS_SECRET")
twitter = OAuth1Session(
CONSUMER_KEY,
client_secret=CONSUMER_SECRET,
from botocore.vendored import requests
def lambda_handler(event, context):
return requests.head(event['url']).status_code
#!/usr/bin/env python
"""lexconvert v0.264 - convert phonemes between different speech synthesizers etc
(c) 2007-17 Silas S. Brown. License: GPL"""
# Run without arguments for usage information
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or