-
Go to dynamo db
- Create dynamoDB table
- Table Name: posts
- Primary key: id
- Click create
- Create dynamoDB table
-
Go to S3
-
Create s3 bucket
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
val holdout = model.transform(test).select("prediction", "DelayOutputVar") | |
val rm = new RegressionMetrics(holdout.rdd.map(x => | |
(x(0).asInstanceOf[Double], x(1).asInstanceOf[Double]))) | |
println("sqrt(MSE): " + Math.sqrt(rm.meanSquaredError)) | |
println("mean absolute error: " + rm.meanAbsoluteError) | |
println("R Squared: " + rm.r2) | |
println("Explained Variance: " + rm.explainedVariance + "\n") |
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
val categoricalVariables = if(useCategorical){ | |
Array("Origin", "Dest") | |
}else{ | |
null | |
} | |
val categoricalIndexers = if(useCategorical){ | |
categoricalVariables.map(i => new StringIndexer().setInputCol(i).setOutputCol(i+"Index").setHandleInvalid("skip")) | |
}else{ | |
null |
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
val lr = new LinearRegression() | |
.setLabelCol("DelayOutputVar") | |
.setFeaturesCol("features") | |
val paramGrid = new ParamGridBuilder() | |
.addGrid(lr.regParam, Array(0.1, 0.01)) | |
.addGrid(lr.fitIntercept) | |
.addGrid(lr.elasticNetParam, Array(0.0, 1.0)) | |
.build() | |
val steps:Array[org.apache.spark.ml.PipelineStage] = if(useCategorical){ |
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
val conf = new SparkConf().setAppName("predictor") | |
val sc = new SparkContext(conf) | |
val sqlContext = new SQLContext(sc) | |
val rawData = sqlContext.read.format("com.databricks.spark.csv") | |
.option("header", "true") | |
.option("inferSchema", "true") | |
.load(dataPath) | |
.withColumn("DelayOutputVar", col("ArrDelay").cast("double")) | |
.withColumn("DepDelayDouble", col("DepDelay").cast("double")) |
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
# Sprint1 | |
#### Start-date: 30/03/18 | |
#### End-date: 06/04/18 | |
# Development Team | |
- Duarte Brandão | |
- Pedro Costa | |
- ... |
- Implement CI/CD pipelines
- Gitlab CI
- Use Runners
- Github
- Use TravisCI or others
- Necessary stages
- Build Code
- Run Tests
- Code quality
- Gitlab CI
- Unit testing
In this tutorial we're going to build a NodeJS website with the following features:
- User authentication
- Back office
- Blog (optional)
The first to parts of the tutorial are meant to quickly set you up and running. The third part is a more in depth explanation of some points I find important, so feel free to read them later as you need.
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
2. | |
1 2 3 4 5 | |
TA,TB,TC,TD,TE | |
a. | |
1 tarefa -> 5min | |
i) 10 01 11 10 11 | |
ii) 11 11 11 10 11 | |
iii) 01 01 01 10 10 |