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
| """ | |
| AWS Bedrock Custom Model Import - Qwen Models | |
| """ | |
| import os | |
| import json | |
| import boto3 | |
| import base64 | |
| import time | |
| from typing import Dict, List, Optional |
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 | |
| """ | |
| Script to download Microsoft Phi-4-mini-instruct model from Hugging Face | |
| and upload it to S3 for SageMaker use. | |
| """ | |
| import os | |
| import tempfile | |
| import shutil | |
| from pathlib import Path |
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 | |
| """ | |
| Strands Agent with Langfuse Observability - Terminal Version | |
| This script demonstrates how to monitor and debug your Strands Agent using Langfuse. | |
| """ | |
| import os | |
| import sys | |
| import base64 | |
| import boto3 |
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 | |
| from botocore.config import Config | |
| def get_latest_image_uri(registry_id: str, | |
| repository_name: str, | |
| region: str = "us-east-1") -> str: | |
| """ | |
| Fetch the URI of the most recently pushed image in the given ECR repository. | |
| """ | |
| ecr = boto3.client("ecr", region_name=region, config=Config(retries={"max_attempts": 10})) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 json | |
| from typing import Dict, List, Optional | |
| import re | |
| def get_detailed_s3_uris( | |
| knowledge_base_id: str, | |
| data_source_id: str | |
| ) -> Dict: | |
| """ |
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 os | |
| import shutil | |
| import concurrent.futures | |
| import boto3 | |
| from pathlib import Path | |
| import logging | |
| import time | |
| def move_folders_to_combined(bucket_name, folders_to_move=["SSE", "FPA", "Hypershield"], log_level=logging.INFO): | |
| """ |
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 qrcode | |
| import logging | |
| import re | |
| import os | |
| # Install the following package before running the script: pip install qrcode | |
| # set a logger | |
| logging.basicConfig( | |
| format='[%(asctime)s] p%(process)s {%(filename)s:%(lineno)d} %(levelname)s - %(message)s', |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 os | |
| import csv | |
| import logging | |
| import requests | |
| from datetime import datetime | |
| from typing import Optional, List | |
| logging.basicConfig(format='[%(asctime)s] p%(process)s {%(filename)s:%(lineno)d} %(levelname)s - %(message)s', level=logging.INFO) | |
| logger = logging.getLogger(__name__) |
NewerOlder