Skip to content

Instantly share code, notes, and snippets.

View ElissandroMendes's full-sized avatar
🏠
Working in Home !!!

Elissandro Mendes ElissandroMendes

🏠
Working in Home !!!
View GitHub Profile
@ElissandroMendes
ElissandroMendes / index.js
Created August 3, 2022 19:13 — forked from amiantos/index.js
Zip Multiple Files from S3 using AWS Lambda Function
// Lambda S3 Zipper
// http://amiantos.net/zip-multiple-files-on-aws-s3/
//
// Accepts a bundle of data in the format...
// {
// "bucket": "your-bucket",
// "destination_key": "zips/test.zip",
// "files": [
// {
// "uri": "...", (options: S3 file key or URL)

Desafio Dev.Academy

Desenvolva uma API REST para 2 entidades: produtos e clientes. Toda a arquitetura deve ser serverless utlizando API Gateway, Lambda e DynamoDB. Cada entidade deve ter uma lmabda e uma tabela cada, garantindo a escalabilidade separadas dos componentes do sistema. A API deve permitir operações CRUD básicas de coleção e recursos, atráves dos verbos comuns: GET, POST, POUT, DELETE. Nas rotas de consulta da coleção, permita que o client envie um parâmetro filter pela URL para filtragem de nomes que contenham o valor do parâmetro, por exemplo:

Um GET para /produtos?filter=xpto

Deverá trazer os produtos que contenha a string xpto no nome.

@ElissandroMendes
ElissandroMendes / gist-devacademy.md
Last active September 28, 2021 13:32
Passos para preparar e rodar API na instância EC2 criada

Instalar Node

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm node install
node -e "console.log('Running Node.js ' + process.version)"

Instalar Git

sudo yum install git
@ElissandroMendes
ElissandroMendes / Installing Jupyter NbExtensions in Anaconda
Created January 12, 2020 16:48
Installing Jupyter NbExtensions in Anaconda
conda install -c conda-forge jupyter_contrib_nbextensions
conda install -c conda-forge jupyter_nbextensions_configurator
jupyter contrib nbextension install --user
@ElissandroMendes
ElissandroMendes / ProjBDNoSQL.js
Last active September 14, 2019 18:50
Especialização Ciencia de Dados - Exemplos de código aggregate MongoDB
1. Quantidade de pagamento e totalização dos valores atualizados e pagos por orgão, tipo instrumento e modalidade
db.contrato.aggregate( [
{ $group:
{
_id:{orgao:"$orgao_sigla", instrumento:"$tipo_instrumento_desc", modalidade: "$modalidade_desc"},
_quantidade: {$sum: 1},
_total_atualizado: {$sum: "$valor_atualizado"},
_total_pago: {$sum: "$valor_pago"}
}
},
@ElissandroMendes
ElissandroMendes / TutorialCodeIntermediateML.py
Last active August 29, 2019 01:44
Tutorial code - Intermediate Machine Learning - Micro course from Kaggle
import pandas as pd
from sklearn.model_selection import train_test_split
# Read the data
X = pd.read_csv('../input/train.csv', index_col='Id')
X_test = pd.read_csv('../input/test.csv', index_col='Id')
# Remove rows with missing target, separate target from predictors
X.dropna(axis=0, subset=['SalePrice'], inplace=True)
y = X.SalePrice
@ElissandroMendes
ElissandroMendes / .zshrc
Created June 9, 2019 16:39
ZSH configuration
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/elissandro/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@ElissandroMendes
ElissandroMendes / gist:53a21da0ea89da369a1dd8cf9dc00225
Created February 13, 2019 14:47
.gitignore para projetos usando: node, macOS, VisualStudioCode
# Created by https://www.gitignore.io/api/node,macos,visualstudiocode
# Edit at https://www.gitignore.io/?templates=node,macos,visualstudiocode
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
$ git remote rm origin
$ git remote add origin [email protected]:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master