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
console.log("test for lambda") | |
exports.handler = async( event ) => { | |
console.log("async ..."); | |
var name = event.name || 'Anonymous'; | |
console.log("name = " + name ); |
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
exports.handler = (event ,context) => { | |
console.log('event : ' , JSON.stringify(event); | |
var name = event.name || 'Anonymous'; | |
console.log("name = " + name ); | |
} |
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
// Load the SDK for JavaScript | |
var aws = require('aws-sdk'); | |
// // Set the region | |
aws.config.update({region: 'us-west-2'}); | |
console.log(" test ok "); |
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
var aws = require('aws-sdk'); | |
aws.config.update({region: 'us-west-2'}); | |
// creat the dynamodb service object | |
// | |
var ddb = new aws.DynamoDB({apiVersion: '2019-02-12'}); |
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
var aws = require('aws-sdk'); | |
aws.config.update({region: 'us-west-2'}); | |
// Create the DynamoDB service object | |
var ddb = new aws.DynamoDB({apiVersion: '2019-02-12'}); | |
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 tensorflow as tf | |
hello = tf.constant('hello world') | |
sess = tf.Session() | |
print( sess.run( hello ) ) |
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 numpy | |
import theano | |
import theano.tensor as T | |
from theano import pp | |
x = T.dscalar('x') | |
y = x ** 2 | |
gy = T.grad( y , x ) |
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 mxnet as mx | |
import numpy as np | |
path='http://data.mxnet.io/models/imagenet/' | |
[mx.test_utils.download(path+'resnet/50-layers/resnet-50-0000.params'), | |
mx.test_utils.download(path+'resnet/50-layers/resnet-50-symbol.json'), | |
mx.test_utils.download(path+'synset.txt')] | |
ctx = mx.cpu() |
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
(mxnet_p36) ubuntu@ip-111-11-11-111:~$ python test2.py | |
[04:01:52] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v0.8.0. Attempting to upgrade... | |
[04:01:52] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded! | |
probability=0.973225, class=n02132136 brown bear, bruin, Ursus arctos | |
probability=0.012621, class=n02133161 American black bear, black bear, Ursus americanus, Euarctos americanus | |
probability=0.007198, class=n02134084 ice bear, polar bear, Ursus Maritimus, Thalarctos maritimus | |
probability=0.001246, class=n02444819 otter | |
probability=0.000965, class=n02134418 sloth bear, Melursus ursinus, Ursus ursinus |
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
git clone https://github.com/GoogleCloudPlatform/python-docs-samples | |
cd python-docs-samples/appengine/standard_python37/hello_world | |