Skip to content

Instantly share code, notes, and snippets.

View gabrielacaesar's full-sized avatar
🎯
Focusing

Gabriela Caesar gabrielacaesar

🎯
Focusing
View GitHub Profile
# código feito em R
# para facilitar rode no RStudio
## pacotes usados
# install.packages("tidyverse")
# install.packages("data.table")
library(tidyverse)
library(data.table)
## indicação para baixar o arquivo bruto
@gabrielacaesar
gabrielacaesar / codigo-do-arduino.cpp
Last active July 14, 2022 01:15
codigo-do-arduino.cpp
//Código do arduino:
//Config-----------------------------------------------------------
const char* ssid = "gabrielaWiFi"; //Alterar para o nome da sua rede
const char* password = "66929415"; //Alterar para sua senha de rede ou "" caso seja livre
const char* GScriptId = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // alterar para chave copiada na criação do App Script
//-----------------------------------------------------------------
// Código do App Script:
var SS = SpreadsheetApp.openById('1xxxxxxxxxxxxxxM8E7wLwB7L2pU'); // id do link do google sheet
var str = "";
function doPost(e)
{
var parsedData;
### instalando os pacotes (se necessário)
# install.packages("tidyverse")
# install.packages("googledrive")
# install.packages("rvest")
### carregando os pacotes
library(tidyverse)
library(googledrive)
library(rvest)
"","nome_completo","data_de_nascimento","local_de_nascimento","link"
"1","
Ademir Roque Kaefer","
06/10/1960","Toledo, PR","http://www.cob.org.br/pt/cob/time-brasil/atletas/ademir-roque-kaefer/"
"2","
Adenizia Ferreira da Silva","
19/12/1986","Ibiaí, MG","http://www.cob.org.br/pt/cob/time-brasil/atletas/adenizia-ferreira-da-silva/"
"3","
Adhemar Ferreira da Silva","
29/09/1927","São Paulo, SP","http://www.cob.org.br/pt/cob/time-brasil/atletas/adhemar-ferreira-da-silva/"
UF,COD UF,COD MUNIC,NOME DO MUNICÍPIO,POPULAÇÃO ESTIMADA
RO,11,00015,Alta Floresta D'Oeste,22945
RO,11,00023,Ariquemes,107863
RO,11,00031,Cabixi,5312
RO,11,00049,Cacoal,85359
RO,11,00056,Cerejeiras,16323
RO,11,00064,Colorado do Oeste,15882
RO,11,00072,Corumbiara,7391
RO,11,00080,Costa Marques,18331
RO,11,00098,Espigão D'Oeste,32374
codigo_ibge;municipio;latitude;longitude;capital;codigo_uf;uf;estado;municipio_upper;municipio_upper2
5200050;Abadia de Goiás;-167.573;-494.412;0;52;GO;Goiás;ABADIA DE GOIAS;-
5200100;Abadiânia;-16.197;-487.057;0;52;GO;Goiás;ABADIANIA;-
3100203;Abaeté;-191.551;-454.444;0;31;MG;Minas Gerais;ABAETE;-
1500107;Abaetetuba;-172.183;-488.788;0;15;PA;Pará;ABAETETUBA;-
2300101;Abaiara;-734.588;-390.416;0;23;CE;Ceará;ABAIARA;-
2900108;Abaíra;-132.488;-416.619;0;29;BA;Bahia;ABAIRA;-
2900207;Abaré;-872.073;-391.162;0;29;BA;Bahia;ABARE;-
4100103;Abatiá;-233.049;-503.133;0;41;PR;Paraná;ABATIA;-
1500131;Abel Figueiredo;-495.333;-483.933;0;15;PA;Pará;ABEL FIGUEIREDO;-
[1] "Send\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\n\\t\",\"js_validation_rules\":[{\"rule_name\":\"string\",\"options\":{\"min_length\":3,\"max_length\":500,\"max_lines\":10,\"show_char_count\":false,\"password_viewable\":true,\"show_emojis\":true,\"required\":true},\"messages\":{\"min_length\":\"Your comment is too short (%nb_chars% characters min)\",\"max_length\":\"Your comment is too long (%nb_chars% characters max)\",\"max_lines\":\"Your comment have too many lines (max %nb_lines% lines).\",\"required\":\"Please fill in this field.\"},\"elt_id\":\"post_text\",\"elt_type\":\"input\",\"input_type\":\"textarea\"}],\"max_level\":1,\"report_form\":\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t Nevermind\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t Spammer\\n\\t\\t\\t\\t
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>
<p>{"force_anonymous":false,"allow_anonymous":false,"show_emojis":true,"form":"</p>
<form action="%5C%22%5C%22" method='\"POST\"' id='\"post\"' class='\"form-horizontal\"'>\n\t\t<input type='\"hidden\"' value='\"d3aaafd1283dd030n-nOWPNs_LJPjaYCzt4YnNitgyON2vBDYUUi9C4CrTFess76iaE7ArixedQUQ4aWdFWM4YypeOjrcROWbR6ykXwrXGmDea5DXY33h-pez2M=\"' name='\"post[csrf_token]\"' id='\"post_csrf_token\"'>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class='\"form-group' form-field-post_text>\n\t\t\t\t\t<div class='\"content' col-sm-12 col-sm-offset-0>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<textarea class='\"form-control\"' placeholder='\"Write' your message name='\"post[text]\"' required='\"required\"' id='\"post_text\"'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t\t\t\t<div class='\"form-group' form-buttons>\n\t\t<div class='\"col-sm-offset-0' col-sm-12>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a class
We can make this file beautiful and searchable if this error is corrected: Any value after quoted field isn't allowed in line 1.
"UF";"Município";"Eleitorado";"Eleitorado com biometria";"%";
"AC";"Acrelândia";"8.939";"8.917";"99,75%"
"AC";"Assis Brasil";"5.681";"5.670";"99,81%"
"AC";"Brasiléia";"16.517";"16.361";"99,06%"
"AC";"Bujari";"8.986";"8.974";"99,87%"
"AC";"Capixaba";"7.265";"7.249";"99,78%"
"AC";"Cruzeiro do Sul";"54.863";"54.707";"99,72%"
"AC";"Epitaciolândia";"11.161";"11.120";"99,63%"
"AC";"Feijó";"19.014";"18.997";"99,91%"
"AC";"Jordão";"4.570";"4.568";"99,96%"