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
| test: &test | |
| name: Install and Test | |
| image: node:10.15.0 | |
| caches: | |
| - node | |
| script: | |
| - npm install | |
| - npm test | |
| - npm run build | |
| artifacts: # defining the artifacts to be passed to each future step. |
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
| image: node:10.15.0 | |
| test: &test | |
| name: Install and Test | |
| script: | |
| - cd my-tools | |
| - npm install | |
| - npm test | |
| - npm pack | |
| artifacts: # defining the artifacts to be passed to each future step. | |
| # - dist/** |
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
| 'use strict'; | |
| const http = require('https'); | |
| const indexPage = 'index.html'; | |
| exports.handler = async (event, context, callback) => { | |
| const cf = event.Records[0].cf; | |
| const request = cf.request; | |
| const response = cf.response; |
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
| data "archive_file" "folder_index_redirect_zip" { | |
| type = "zip" | |
| output_path = "${path.module}/folder_index_redirect.js.zip" | |
| source_file = "${path.module}/folder_index_redirect.js" | |
| } | |
| resource "aws_iam_role_policy" "lambda_execution" { | |
| name_prefix = "lambda-execution-policy-" | |
| role = aws_iam_role.lambda_execution.id |
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
| from pathlib import Path | |
| import pandas as pd | |
| import tarfile | |
| import urllib.request | |
| def load_housing_data(): | |
| tarball_path = Path("datasets/housing.tgz") | |
| if not tarball_path.is_file(): | |
| Path("datasets").mkdir(parents=True, exist_ok=True) | |
| url = "https://github.com/ageron/data/raw/main/housing.tgz" |
OlderNewer