Skip to content

Instantly share code, notes, and snippets.

View lucassmacedo's full-sized avatar
🎯
Focusing

Lucas Macedo lucassmacedo

🎯
Focusing
View GitHub Profile
# To execute this docker-compose yml file use `docker-compose -f <file_name> up`
# Add the `-d` flag at the end for detached execution
version: "3"
services:
selenium-hub1:
image: selenium/hub:3.141.59-20200409
container_name: selenium-hub1
ports:
- "4444:4444"
environment:
$.ajax({
url: 'http://localhost/item/1/delete',
type: 'DELETE',
dataType: "JSON",
data: {
"id": 1,
},
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
train_male = train_dataset[train_dataset['Sex'] == 'male']['Age'].median()
train_female = train_dataset[train_dataset['Sex'] == 'female']['Age'].median()
train_dataset.loc[train_dataset['Sex'] == 'male', ['Age']] = train_male;
train_dataset.loc[train_dataset['Sex'] == 'female', ['Age']] = train_female;
# Keep test dataset in sync
test_male = train_dataset[train_dataset['Sex'] == 'male']['Age'].median()
test_female = train_dataset[train_dataset['Sex'] == 'female']['Age'].median()
test_dataset.loc[test_dataset['Sex'] == 'male', ['Age']] = test_male;
@lucassmacedo
lucassmacedo / gist:8fc150957aba4446bcdf405f2b28cc78
Last active January 29, 2020 15:11
Data Science Algortmis
Gradiente Estocástico = encontrar, de forma iterativa, os valores dos parâmetros que minimizam determinada função de interesse.
Regressão Linear = processo de traçar uma reta através dos dados em um diagrama de dispersão.
Correção = como duas ou mais variáveis estão relacionadas uma com a outra
K-Means
Least Squares = Método dos mínimos quadrados
Algoritmo Apriori = sistema de recomendaçes
# import geopy
# import pandas
# from geopy.geocoders import Nominatim, GoogleV3
import pymysql.cursors
import folium
import geopandas as gpd
import pandas as pd
import numpy as np
import os
import webbrowser
https://www.ibge.gov.br/geociencias/downloads-geociencias.html
http://monografias.poli.ufrj.br/monografias/monopoli10026310.pdf
ftp://geoftp.ibge.gov.br/recortes_para_fins_estatisticos/malha_de_setores_censitarios/censo_2010/base_de_faces_de_logradouros/1_Leia_me/
https://medium.com/@brunomelnic/qgis-calc-ibge-baixando-mapa-e-microdados-do-censo-2010-62e637a72365
http://www.cienciaedados.com/
https://oestatistico.com.br/
https://www.r-bloggers.com/
https://datasciencespecialization.github.io/
https://rpubs.com/
@lucassmacedo
lucassmacedo / links.md
Created August 22, 2019 19:35 — forked from rogeriochaves/links.md
Pt-BR Data Science Links Scrapping
@lucassmacedo
lucassmacedo / gist:d966f16d9ea46b2f2bdb8a5919a5083b
Last active August 22, 2019 14:44
Comandos Linux Importantes
# Deleta todos processos de um certo nome
kill $(ps aux | grep 'phpstorm' | awk '{print $2}')
# Backup and Restore Database TAR PGQSL
PGPASSWORD="" pg_dump -h localhost -U postgres -F t database_name > /bkp/postgres/postgres-`hostname`-producao.tar
PGPASSWORD="" pg_restore -U postgres -d database_name /bkp/postgres/postgres-`hostname`-producao.tar
####
# ATENTION:
# Replace all occurences of portal with your project's name
####
# v2 syntax
version: '2'
# Named volumes
volumes: