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
import json | |
print('Loading function') | |
def lambda_handler(event, context): | |
return {"message": "isto é uma função"} |
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
lxml | |
boto |
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
FROM python:3.8-alpine AS installer | |
WORKDIR /app | |
COPY requirements.txt . | |
RUN apk add --no-cache --virtual .build-deps gcc libc-dev libxslt-dev && \ | |
apk add --no-cache libxslt && \ | |
apk del .build-deps | |
FROM public.ecr.aws/lambda/python:3.8 |
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
import urllib.request | |
import urllib.parse | |
import http.cookiejar | |
import json | |
import time | |
def to_decimal(string): | |
string = string.replace('.', '') \ | |
.replace(',', '.') \ |
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
import re | |
import urllib.request | |
import urllib.parse | |
from datetime import datetime | |
import os | |
import boto3 | |
import csv | |
from tempfile import TemporaryDirectory | |
from lxml.html import fragment_fromstring |
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
/* Estrutura de arquivos | |
|-- server.js | |
|-- src | |
| |-- user | |
| |--user.controller.js | |
| |--user.route.js | |
| |-- product | |
| |--product.controller.js | |
| |--product.route.js | |
| |-- order |
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
validation = data.sample(5) | |
data.drop(validation.index, axis=0, inplace=True) |
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
ref = { | |
0: 'Iris-Setosa', | |
1: 'Iris-Versicolour', | |
2: 'Iris-Virginica' | |
} |
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
import numpy as np | |
import pandas as pd | |
from sklearn.model_selection import train_test_split | |
from sklearn.datasets import load_iris | |
from sklearn.neural_network import MLPClassifier | |
iris_dataset = load_iris() | |
data = pd.DataFrame(iris_dataset.data, columns=iris_dataset.feature_names) | |
data['target'] = iris_dataset.target |
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
FROM python:3 | |
COPY . /work | |
WORKDIR /work | |
EXPOSE 5000 | |
RUN pip install --no-cache-dir -r requirements.txt | |
CMD gunicorn --workers 2 --bind 0.0.0.0:5000 app:app |
NewerOlder