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 subprocess as sub | |
import boto3 | |
import os | |
def getObj(): | |
os.chdir('/tmp') | |
s3 = boto3.resource('s3') | |
s3.meta.client.download_file('cjl-chelt-hack', 'masterbuilder.jpg', 'masterbuilder.jpg') | |
p = sub.Popen(['file', 'masterbuilder.jpg'],stdout=sub.PIPE,stderr=sub.PIPE) | |
output, errors = p.communicate() |
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
AWSTemplateFormatVersion: 2010-09-09 | |
Parameters: | |
ExampleParam: | |
Type: String | |
Default: test1 | |
Description: Project name that will be used to name and identify resoures that are created | |
ExampleParam2: | |
Type: test2 | |
Description: Project name that will be used to name and identify resoures that are created |
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
exports.handler = (event, context, callback) => { | |
// TODO implement | |
var https = require('https'); | |
var options = { | |
host: 'bus.miller.cm', | |
port: 443, | |
path: '/api/heslington-hall', |
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
def create_entityjob(mediaUrl, Key, DataAccessRoleArn): | |
client = boto3.client('comprehend') | |
response = client.start_entities_detection_job( | |
InputDataConfig={ | |
'S3Uri': mediaUrl, | |
'InputFormat': 'ONE_DOC_PER_FILE' | |
}, | |
OutputDataConfig={ | |
'S3Uri': output_bucket | |
}, |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": "comprehend:*", | |
"Resource": "*" | |
}, | |
{ |
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
def complete(event): | |
response = { | |
"dialogAction": { | |
"type": "ElicitSlot", | |
"message": { | |
"contentType": "PlainText", | |
"content": "Your application status has been updated as: " + getDynamoData(event) + ". Thank you for your call, goodbye." | |
}, | |
"intentName": "callDescription", | |
"slots": { |
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 boto3 | |
import pandas as pd | |
from sagemaker import get_execution_role | |
role = get_execution_role() | |
bucket='cjl-temp-dub' | |
data_key = 'enron_emails/Enron emails.csv' | |
data_location = 's3://{}/{}'.format(bucket, data_key) | |
#df = pd.read_csv(data_location, skiprows=1000, nrows=2000) |
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 re | |
#from email.parser import HeaderParser | |
import email | |
import json | |
import operator | |
client = boto3.client('firehose') | |
client2 = boto3.client('comprehend') | |
DataSet = [] |
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
jdbc:postgresql://deng-pub-immersion-day.cofepwz7osto.eu-west-1.rds.amazonaws.com:5432/sportstickets |
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
https://402560573366.signin.aws.amazon.com/console | |
jdbc:postgresql://deng-pub-immersion-day.cofepwz7osto.eu-west-1.rds.amazonaws.com:5432/sportstickets |
OlderNewer