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 / 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 /
Last active Aug 29, 2019
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
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
ElissandroMendes / gist:53a21da0ea89da369a1dd8cf9dc00225
Created Feb 13, 2019
.gitignore para projetos usando: node, macOS, VisualStudioCode
View gist:53a21da0ea89da369a1dd8cf9dc00225
# Created by,macos,visualstudiocode
# Edit at,macos,visualstudiocode
### macOS ###
# General
View Change "origin" of your GIT repository
$ git remote rm origin
$ git remote add origin
$ git config master.remote origin
$ git config master.merge refs/heads/master
ElissandroMendes /
Created Sep 26, 2017 — forked from yprez/
Django rest framework - Base64 image field
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.