Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 cv2 | |
import numpy as np | |
import math | |
import random | |
import os | |
import json | |
# 定義 | |
targetPath = '/tmp/DataSet' | |
manifest = 'output.manifest' |
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 cv2 | |
import numpy as np | |
import math | |
import random | |
import os | |
import json | |
# 定義 | |
targetPath = '/tmp/DataSet' | |
manifest = 'output.manifest' |
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 cv2 | |
import numpy as np | |
import math | |
import random | |
import os | |
import json | |
# 定義 | |
targetPath = '/tmp/DataSet' | |
manifest = 'output.manifest' |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
const aws = require('aws-sdk'); | |
exports.handler = async (event) => { | |
if(event.type != 'req') { | |
return; | |
} | |
const message = await lexClient(event.body, event.userId); | |
await sendMqtt(message); | |
}; |
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
class Mqtt { | |
constructor() { | |
this.device = undefined; | |
} | |
async _getCredentials() { | |
AWS.config.region = this.region; | |
var cognitoidentity = new AWS.CognitoIdentity(); | |
var params = { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<h1><center>Order Flowers</center></h1> | |
<script src="mqtt.js"></script> | |
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.283.1.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script src="aws-iot-sdk-browser-bundle.js"></script> | |