This file contains 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
var google = require('googleapis'); | |
function buildAndAuthorizeService (callback) { | |
// Acquires credentials | |
google.google.auth.getApplicationDefault((err, authClient) => { | |
if (err) { | |
callback(err); | |
return; | |
} |
This file contains 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
__author__ = 'dkarchmer' | |
''' | |
This script emulates a stand-alone Python based client. It relies on Boto3 to access AWS, but | |
requires your Django server to have an API for your user to access Cognito based credentials | |
Because of Cognito, the client (this script) will only get temporary AWS credentials associated | |
to your user and only your user, and based on whatever you configure your AIM Policy to be. | |
Most Cognito examples demonstrate how to use Cognito for Mobile Apps, so this scripts demonstrate | |
how to create a stand-alone Python script but operating similarly to these apps. |
This file contains 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 the necessary packages | |
import numpy as np | |
import urllib | |
import cv2 | |
from PIL import Image | |
import sys | |
class Tint: | |
''' | |
Tint |