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 logging | |
import requests | |
import json | |
import time | |
from tabulate import tabulate | |
# Configure logging | |
logging.basicConfig( | |
level=logging.INFO, # or logging.DEBUG if you want more verbose output | |
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s' |
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
#!/usr/bin/env python3 | |
# | |
# pip install python-frontmatter openai | |
# ./spell-check-post.py content/blog/amazon-eventbridge-slack-notification-on-event/index.mdx | |
# | |
# The following file will be created: | |
# content/blog/amazon-eventbridge-slack-notification-on-event/index.new.mdx | |
# | |
# Follow the stream of content: | |
# tail -f content/blog/amazon-eventbridge-slack-notification-on-event/index.new.mdx |
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
#!/usr/bin/env python3 | |
""" | |
This script generates sample data, uploads it to an S3 bucket, and creates Iceberg and Athena tables. | |
It also creates IAM roles and policies for optimization and statistics generation if specified. | |
There is also an option to create a Firehose delivery stream and insert random records into it. | |
Install: | |
python3 -m venv .venv | |
source .venv/bin/activate |
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
#!/usr/bin/env python3 | |
""" | |
This script reads and processes Puffin files, extracting and printing blob metadata. | |
It supports reading metadata from the file footer and decompressing the | |
data using the specified compression codec. | |
Spec: | |
https://iceberg.apache.org/puffin-spec/ |
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
AWSTemplateFormatVersion: '2010-09-09' | |
Description: A CloudFormation template to create IAM role, policy, Step Functions, and CloudWatch event rule and target for table ingestion maintenance vacuum with concurrency control | |
Parameters: | |
WorkgroupName: | |
Type: String | |
Default: primary | |
Description: The name of the Athena Workgroup | |
DatabaseName: |
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
provider "aws" { | |
region = "us-west-2" | |
} | |
resource "aws_s3_bucket" "my_bucket" { | |
bucket = "unique-bucket-name" | |
} | |
resource "aws_s3_access_point" "my_access_point" { | |
name = "myaccesspoint" |
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
# Create scratch location | |
cd | |
mkdir wsl-ubuntu-24.04 | |
# Download WSL image | |
wget ` | |
https://cloud-images.ubuntu.com/wsl/noble/current/ubuntu-noble-wsl-amd64-24.04lts.rootfs.tar.gz ` | |
-O ubuntu-noble-wsl-amd64-24.04lts.rootfs.tar.gz | |
# Import image to new WSL VM |
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
--- | |
- name: Identify reachable hosts | |
hosts: all | |
connection: local | |
gather_facts: false | |
tasks: | |
- block: | |
- name: determine hosts that are reachable | |
ansible.builtin.wait_for_connection: |
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
#!/usr/bin/env python3 | |
""" | |
This script captures images from an RTSP stream at regular intervals and uses | |
the Claude 3 Haiku model to generate descriptions based on a custom prompt. | |
Install: | |
python3 -m venv .venv | |
source .venv/bin/activate | |
pip3 install boto3==1.34.62 opencv-python-headless==4.9.0.80 |
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
#!/usr/bin/env python3 | |
# | |
# -- Run other script to create the Iceberg table | |
# | |
# pip install boto3 | |
# curl https://gist.githubusercontent.com/t04glovern/04f6f2934353eb1d0fffd487e9b9b6a3/raw \ | |
# > lets-try-iceberg.py \ | |
# && chmod +x lets-try-iceberg.py | |
# ./lets-try-iceberg.py --table lets_try_iceberg | |
# |
NewerOlder