This file contains hidden or 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
txt_files = [f for f in os.listdir(directoryName) if f.endswith('.txt')] | |
for file in txt_files: | |
summary = summarize_text(directoryName + file) | |
print(summary) |
This file contains hidden or 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 time | |
# Initialize Textract client | |
textract = boto3.client('textract') | |
s3 = boto3.client('s3') | |
def start_layout_analysis(document_bucket, document_key): | |
# Start the Textract job for layout analysis | |
response = textract.start_document_analysis( |
This file contains hidden or 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 | |
yum update -y | |
yum install -y httpd | |
ipv4=$(curl -s "http://169.254.169.254/latest/meta-data/local-ipv4") | |
hostname=$(curl http://169.254.169.254/latest/meta-data/local-hostname) | |
cat > /var/www/html/index.html << _EOF_ | |
<!DOCTYPE html> |
This file contains hidden or 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", | |
"Id": "Policy1630051047351", | |
"Statement": [ | |
{ | |
"Sid": "Stmt1630050786717", | |
"Effect": "Deny", | |
"Principal": { | |
"AWS": "*" | |
}, |