Skip to content

Instantly share code, notes, and snippets.

View JicLotus's full-sized avatar
🎯

Jose Castelli JicLotus

🎯
View GitHub Profile
@JicLotus
JicLotus / serverless.yml
Created September 12, 2020 17:33
Serverless deployment file
service: lambda-example
provider:
name: aws
runtime: python3.7
package:
individually: true
exclude:
- __pycache__/**
- node_modules/**
@JicLotus
JicLotus / your_lambda_fn.py
Last active September 12, 2020 21:05
Python script file to be consumed by Serverless frm
"""Sample docstring docu."""
import pandas as pd
import sqlalchemy
def handler(event, context):
"""Sample handler function."""
response = {
"statusCode": 200,
"body": "",
@JicLotus
JicLotus / serverless.yml
Created September 12, 2020 17:11
Layer serverless deployment file
service: sls-layers-pandas
provider:
name: aws
runtime: python3.7
plugins:
- serverless-python-requirements
custom:
@JicLotus
JicLotus / pre-commit-eslint
Created August 22, 2019 13:56 — forked from shettayyy/pre-commit-eslint
Pre-commit hook for Linting JS with ESLint before commit.
#!/bin/sh
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$")
ESLINT="$(git rev-parse --show-toplevel)/node_modules/.bin/eslint"
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
fi
PASS=true
{
id: “507f1f77bcf86cd799439011”,
mongo_shard: 0,
skills_ids: [“507f191e810c19729de860ea”,”507c7f79bcf86cd7994f6c0e”]
}
{
id: "507f191e810c19729de860ea",
ranking: 1,
name: "C++"
}
{
id: “507f191e810c19729de860ea”,
ranking: 1,
name: “C++”
},
{
id: “507c7f79bcf86cd7994f6c0e”,
ranking: 1,
name: “Java”
}
{
id: “507f1f77bcf86cd799439011”,
mongo_shard: 0, // Where the profile is
skills_ids: [“507f191e810c19729de860ea”,”507c7f79bcf86cd7994f6c0e”]
}
{
_id: ObjectId(“507f191e810c19729de860ea”),
name: “C++”,
ranking: 1 // Amount of profiles that has C++ skill on his profile
},
{
_id: ObjectId(“507c7f79bcf86cd7994f6c0e”),
name: “Java”,
ranking: 1 // Amount of profiles that has Java skill on his profile
}
{
_id : ObjectId(“507f1f77bcf86cd799439011”),
name: “Jose”,
last_name: “Castelli”,
skills: [
{skill_name: ”C++”,”Java”}
]
}