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
// Implementation 1 | |
async function makeRequest({ | |
method = RequestMethod.GET, | |
path, | |
body = {}, | |
tokenStore, | |
isLoginRequest = false, | |
}) { | |
// We can avoid this branching by using implementation 2 |
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 PIL import Image | |
import io | |
rekognition_client = boto3.client("rekognition") | |
def get_face_details(image_bytes): | |
response = rekognition_client.detect_faces(Image={"Bytes": image_bytes}, Attributes=["ALL"]) | |
# Assuming the first face is the one we need | |
face_details = response["FaceDetails"][0] if response["FaceDetails"] else None |
OlderNewer