Skip to content

Instantly share code, notes, and snippets.

View furuya02's full-sized avatar

SIN furuya02

View GitHub Profile
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.
import cv2
import numpy as np
import math
import random
import os
import json
# 定義
targetPath = '/tmp/DataSet'
manifest = 'output.manifest'
import cv2
import numpy as np
import math
import random
import os
import json
# 定義
targetPath = '/tmp/DataSet'
manifest = 'output.manifest'
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.
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);
};
class Mqtt {
constructor() {
this.device = undefined;
}
async _getCredentials() {
AWS.config.region = this.region;
var cognitoidentity = new AWS.CognitoIdentity();
var params = {
<!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>