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 boto3 | |
import base64 | |
from chalice import Chalice | |
app = Chalice(app_name='example1') | |
@app.on_s3_event(bucket='rekogvtug') | |
def handler(event): |
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
#First item is to make sure you have Docker installed. We'll be using docker to setup a tensorflow image. | |
To make sure docker is installed properly you can run the | |
'docker hello-world' | |
image and should get the appropriate response. | |
#To install and an image with tensorflow | |
docker run -it tensorflow/tensorflow bash | |
#Download and unzip the Tensorflow for poets scripts | |
curl -O http://104.131.75.92:8000/tensorflow-for-poets-2-master.zip |
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
from clarifai.rest import ClarifaiApp | |
from clarifai.rest import Image as ClImage | |
#put api key | |
app = ClarifaiApp(api_key='') | |
model = app.models.get('celeb-v1.3') | |
#put photo url below | |
image = ClImage(url='') |
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
from clarifai.rest import ClarifaiApp | |
from clarifai.rest import Image as ClImage | |
app = ClarifaiApp(api_key='your_api_key') | |
model = app.models.get('general-v1.3') | |
image = ClImage(url='https://samples.clarifai.com/metro-north.jpg') | |
response = model.predict([image]) | |
concepts = response['outputs'][0]['data']['concepts'] |
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
// | |
// AppDelegate.swift | |
// third | |
// | |
// Created by Kunal Batra on 1/16/18. | |
// Copyright © 2018 Kunal Batra. All rights reserved. | |
// | |
import UIKit | |
import Clarifai_Apple_SDK |
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
from flask import Flask, request | |
import json | |
import httplib | |
import os | |
app = Flask(__name__) | |
@app.route('/email', methods=['POST']) | |
def form(): | |
subject=request.form['subject'] |
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 sendgrid = require("sendgrid"); | |
sendgrid.initialize("username", "password"); | |
// Use Parse.Cloud.define to define as many cloud functions as you want. | |
// For example: | |
Parse.Cloud.define("hello", function(request, response) { | |
response.success("testing email"); | |
sendgrid.sendEmail({ | |
to: "[email protected]", | |
from: "[email protected]", |
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
from flask import Flask, request | |
import sendgrid | |
import requests | |
app = Flask(__name__) | |
@app.route ('/incoming', methods =['POST']) | |
def nextweb(): | |
subject = request.form['subject'] |
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
from flask import Flask, request | |
import sendgrid | |
import requests | |
app = Flask(__name__) | |
@app.route ('/incoming', methods =['POST']) | |
def nextweb(): | |
subject = request.form['subject'] | |
body = request.form['text'] |
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
rom flask import Flask, request | |
import json, requests | |
from firebase import firebase | |
app = Flask(__name__) | |
firebase = firebase.FirebaseApplication('Your_Firebase_url_goes_here', None) | |
@app.route('/',methods=['POST']) | |
def foo(): | |
json2 = request.json |
NewerOlder