This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place this with the other middleware inclusion in routes/index.js | |
keystone.pre('admin', middleware.enforcePermissions); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// removing footer cause is generated by phantomjs | |
let readyHtml = '' | |
const initFooter = readyHtml.indexOf('<footer') | |
const endFooter = readyHtml.indexOf('</footer>') | |
const tagFooterIndex = initFooter - 1 | |
const tagEndIndex = endFooter + 9 | |
const tagfooter = readyHtml.substring(tagFooterIndex, tagEndIndex) | |
readyHtml = readyHtml.replace(tagfooter, '') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
summary(Valor) | |
#Min. 1st Qu. Median Mean 3rd Qu. Max. | |
#50000 95000 120000 144600 182500 362400 | |
#Mínimo = 50000 | |
#Maximo = 362400 | |
#Q1 = 95000 | |
#Q2 = 120000 | |
#Q3 = 182500 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prova Linguagem Estatistica | |
# Rodrigo Luis RM32065 | |
# Victor Moriyuki Kurauchi RM37028 | |
# 1) Tire uma tabela de frequência usando a função table na variável Sexo. Quantos | |
# homens e quantas mulheres têm no arquivo? | |
attach(Cadastral) | |
table(Cadastral$Sexo) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
attach(Bank) | |
# regressao linear com salarioi inicial e anos de escolaridade | |
regressao <- lm(salbeg ~ edlevel) | |
regressao | |
anova(regressao) | |
predito <- fitted(regressao) | |
predito | |
Bank$predito <- c(predito) | |
Bank |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lista 3 | |
#Crie um Data.Frame com as variáveis nome, sobrenome, cpf, idade. Ao menos com 5 linhas. | |
#Cria uma variável digito_verificador extraindo o nono digito do cpf | |
#crie uma variávelnome_completo concatenando nome e sobrenome e inclua no data.frame essas duas variáveis. | |
nomes <- c('victor', 'moriyuki', 'kurauchi', 'joao', 'joana') | |
sobrenomes <- c('mcgregore', 'oconnel', 'bond', 'junior', 'neto') | |
cpf <- c(43088711822, 43088711821, 43088711810, 43088711890, 43088711818) | |
idades <- c(18, 19, 20, 21, 22) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lista 2 | |
attach(Bank) | |
#1 | |
barplot(prop.table(table(Bank$sex)) * 100, col=c('pink', 'blue')) | |
barplot(prop.table(table(Bank$jobcat)) * 100) | |
barplot(prop.table(table(Bank$sexrace)) * 100, col=c('pink', 'blue', 'green', 'yellow')) | |
table(Bank$sex) | |
table(Bank$jobcat) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
attach(Banco_1) | |
selecao <- Banco_1 [,c('id', 'Situacao')] | |
selecao | |
selecao <- Banco_1 [10:20, c('id', 'Situacao')] | |
selecao | |
selecao <- Banco_1 [Banco_1$sexo == 'masculino',] | |
selecao |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nomes <- c('victor', 'moriyuki', 'kurauchi') | |
salarios <- c(100, 200, 300) | |
idades <- c(18, 19, 20) | |
cadastro <- data.frame(nomes, salarios, idades) | |
cadastro | |
filhos <- c(0, 2, 4) | |
cadastro$filhos <-c(filhos) |