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
| # MIT-0 License | |
| import boto3 | |
| import os | |
| # Initialize Bedrock Runtime client (ensure your AWS credentials are set) | |
| # Get region from environment variable, default to us-east-1 | |
| aws_region = os.getenv('AWS_REGION', 'us-east-1') | |
| bedrock = boto3.client('bedrock-runtime', region_name=aws_region) |
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 | |
| # Retrieve complete logs for a SageMaker Processing Job | |
| # Outputs to simple text format (no JSON merging issues) | |
| # Usage: ./get-sagemaker-logs-simple.sh <processing-job-name> [region] [format] | |
| set -e | |
| # Parameters | |
| PROCESSING_JOB_NAME="${1:-}" |
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 | |
| # Script to update GitHub repository access for multiple users | |
| # First revokes existing access, then adds back with maintain permission | |
| # | |
| # USAGE EXAMPLES: | |
| # ============== | |
| # | |
| # Process a single user (mw1296) with default repo pattern: | |
| # ./update_repo_access.sh -u mw1296 |
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
| conda create --name dsan6725_py311 -y python=3.11 ipykernel | |
| conda activate dsan6725_py311 | |
| cat <<EOF > requirements.txt | |
| boto3==1.35.87 | |
| litellm==1.55.12 | |
| langchain==0.3.13 | |
| llama-index==0.12.8 | |
| sagemaker==2.237.1 | |
| torch==2.5.1 | |
| wandb==0.19.1 |
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
| # Invoke the Amazon Nova Reel model to create a video and monitor the status | |
| # of the async job. | |
| # tested with Python 3.12 | |
| import json | |
| import time | |
| import uuid | |
| import boto3 | |
| import requests as req | |
| import botocore.session |