Based on the following blog post:
https://github.com/aws-samples/serverless-account-signup-service/tree/jsonata-variables
| import datetime | |
| import json | |
| def lambda_handler(event, context): | |
| registration_info = event['registration_info'] | |
| print(registration_info) | |
| dob = registration_info['child']['dateOfBirth'] | |
| today = datetime.date.today() |
| import datetime | |
| import json | |
| import base64 | |
| from cryptography.hazmat.backends import default_backend | |
| from cryptography.hazmat.primitives import hashes | |
| from cryptography.hazmat.primitives import serialization | |
| from cryptography.hazmat.primitives.asymmetric import padding | |
| from botocore.signers import CloudFrontSigner | |
--- board/__init__.py
+++ board/__init__.py
@@ -18,7 +18,7 @@
def get_locale():
- return request.accept_languages.best_match(['en', 'es'])
+ return request.accept_languages.best_match(["en", "es"])
| #!/usr/bin/env python | |
| import os | |
| import json | |
| import time | |
| import boto3 | |
| import sagemaker | |
| if __name__ == "__main__": |
| root@8423ac911e05:/opt/tritonserver# tritonserver --model-repository=model_repository | |
| I0425 10:08:43.682014 1236 pinned_memory_manager.cc:241] Pinned memory pool is created at '0x77fa88000000' with size 268435456 | |
| I0425 10:08:43.682247 1236 cuda_memory_manager.cc:107] CUDA memory pool is created on device 0 with size 67108864 | |
| I0425 10:08:43.684950 1236 model_lifecycle.cc:461] loading: detection_postprocessing:1 | |
| W0425 10:08:43.685049 1236 model_lifecycle.cc:108] ignore version directory 'hf_cache' which fails to convert to integral number | |
| I0425 10:08:43.685063 1236 model_lifecycle.cc:461] loading: sam_vit:1 | |
| W0425 10:08:43.685125 1236 model_lifecycle.cc:108] ignore version directory 'hf_cache' which fails to convert to integral number | |
| I0425 10:08:43.685138 1236 model_lifecycle.cc:461] loading: grounding_dino_tiny:1 | |
| I0425 10:08:45.251843 1236 python_be.cc:2363] TRITONBACKEND_ModelInstanceInitialize: detection_postprocessing_0 (GPU device 0) | |
| I0425 10:08:45.654267 1236 model_lifecycle.cc:818] successfully loaded 'd |
| import json | |
| import io | |
| import numpy as np | |
| import torch | |
| from transformers import GroundingDinoForObjectDetection, GroundingDinoProcessor | |
| import triton_python_backend_utils as pb_utils | |
| from PIL import Image | |
| class TritonPythonModel: |
| package main | |
| // Example of using MCP with Gemini via Function Calls | |
| import ( | |
| "context" | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "os" |
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "os" | |
| "github.com/google/generative-ai-go/genai" | |
| "github.com/hectormalot/omgo" |