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
#!/bin/bash | |
# update the machine | |
yum update -y | |
# install http | |
yum install -y httpd.x86_64 | |
# start the service | |
systemctl start httpd.service |
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
{ | |
"cmd": ["g++.exe", "-std=c++14", "-o", "$file_base_name", "$file", "&&", "start", "cmd", "/c", "$file_base_name & echo. & echo. & pause"], | |
"shell": true, | |
"selector": "source.c++" | |
} |
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 json | |
import pandas as pd | |
import numpy as np | |
import requests | |
def lambda_handler(event, context): | |
pandas_version = pd.__version__ | |
numpy_version = np.__version__ |
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
1. ubuntu1804 | |
2. sudo apt-get upgrade | |
3. python3 --version | |
4. sudo apt update | |
5. sudo apt-get upgrade |
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
[ | |
{ | |
"keys": ["ctrl+alt+b"], "command": "run_existing_window_command", "args": | |
{ | |
"id": "repl_python_run", | |
"file": "config/Python/Main.sublime-menu" | |
} | |
} | |
] |
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 json | |
import boto3 | |
region = 'us-east-2' | |
ec2 = boto3.client('ec2', region_name=region) | |
def lambda_handler(event, context): | |
instances = event["instances"].split(',') | |
action = event["action"] | |
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": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"ses:SendEmail", | |
"ses:SendRawEmail" | |
], | |
"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
import json | |
import boto3 | |
def lambda_handler(event, context): | |
ses = boto3.client('ses') | |
body = """ | |
Hello and welcome to the SES Lambda Python Demo. | |
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
{ | |
"calculations": [ | |
{ | |
"operation": "ADDITION", | |
"first_num": 1, | |
"second_num": 2 | |
}, | |
{ | |
"operation": "MULTIPLICATION", | |
"first_num": 3, |
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 json | |
import boto3 | |
def lambda_handler(event, context): | |
#1 create an s3 client object | |
s3 = boto3.client("s3") | |
#2 counters for the calculations | |
addition_count = 0 | |
multiplication_count = 0 |
OlderNewer