Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Elissandro Mendes ElissandroMendes

🏠
Working from home
Block or report user

Report or block ElissandroMendes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ElissandroMendes
ElissandroMendes / ProjBDNoSQL.js
Last active Sep 14, 2019
Especialização Ciencia de Dados - Exemplos de código aggregate MongoDB
View ProjBDNoSQL.js
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 Aug 29, 2019
Tutorial code - Intermediate Machine Learning - Micro course from Kaggle
View TutorialCodeIntermediateML.py
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
View .zshrc
# 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 Feb 13, 2019
.gitignore para projetos usando: node, macOS, VisualStudioCode
View gist:53a21da0ea89da369a1dd8cf9dc00225
# 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
View Change "origin" of your GIT repository
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@ElissandroMendes
ElissandroMendes / fields.py
Created Sep 26, 2017 — forked from yprez/fields.py
Django rest framework - Base64 image field
View fields.py
import base64
from django.core.files.base import ContentFile
from rest_framework import serializers
class Base64ImageField(serializers.ImageField):
def from_native(self, data):
if isinstance(data, basestring) and data.startswith('data:image'):
# base64 encoded image - decode
You can’t perform that action at this time.