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
exports.handler = (event, context, callback) => { | |
// TODO implement | |
callback(null, 'Hello from Lambda'); | |
}; |
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 aws = require("aws-sdk"); | |
var nodemailer = require("nodemailer"); | |
var ses = new aws.SES(); | |
var s3 = new aws.S3(); | |
exports.handler = (event, context, callback) => { | |
// TODO implement | |
callback(null, 'Hello from Lambda'); | |
}; |
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 aws = require("aws-sdk"); | |
var nodemailer = require("nodemailer"); | |
var ses = new aws.SES(); | |
var s3 = new aws.S3(); | |
exports.handler = function (event, context, callback) { | |
var mailOptions = { | |
from: "mauricio@xoor.io", |
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
function getS3File(bucket, key) { | |
return new Promise(function(resolve, reject) { | |
s3.getObject( | |
{ | |
Bucket: bucket, | |
Key: key | |
}, | |
function (err, data) { | |
if (err) return reject(err); | |
else return resolve(data); |
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 aws = require('aws-sdk'); | |
var nodemailer = require('nodemailer'); | |
var ses = new aws.SES(); | |
var s3 = new aws.S3(); | |
function getS3File(bucket, key) { | |
return new Promise(function (resolve, reject) { | |
s3.getObject( | |
{ |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>D3 ScatterPlot</title> | |
<link rel="stylesheet" href="./styles.css"> | |
</head> | |
<body> |
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
.scatter-container { | |
margin: auto; | |
width: 800px; | |
height: 600px; | |
} | |
.svg-plot, .canvas-plot { | |
position: absolute; | |
} |
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
let dataExample = []; | |
for (let i= 0; i < 10000; i++) { | |
const x = Math.floor(Math.random() * 999999) + 1; | |
const y = Math.floor(Math.random() * 999999) + 1; | |
dataExample.push([x, y]); | |
} |
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 pointColor = '#3585ff' | |
const margin = {top: 20, right: 15, bottom: 60, left: 70}; | |
const outerWidth = 800; | |
const outerHeight = 600; | |
const width = outerWidth - margin.left - margin.right; | |
const height = outerHeight - margin.top - margin.bottom; |
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 container = d3.select('.scatter-container'); | |
// Init SVG | |
const svgChart = container.append('svg:svg') | |
.attr('width', outerWidth) | |
.attr('height', outerHeight) | |
.attr('class', 'svg-plot') | |
.append('g') | |
.attr('transform', `translate(${margin.left}, ${margin.top})`); |
OlderNewer