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
library(magrittr) | |
a <- system.file("waves_yesno/1_1_0_1_1_0_1_1.wav", package = "torchaudio") | |
# mp3 --------------------------------------------------------------------- | |
a <- system.file("sample_audio_1.mp3", package = "torchaudio") | |
mp3_bm <- bench::mark( | |
torchaudio:::av_read_mp3_or_wav(a) %>% torchaudio::transform_to_tensor(), | |
torchaudio:::tuneR_read_mp3_or_wav(a) %>% torchaudio::transform_to_tensor(), | |
torchaudio:::av_read_mp3_or_wav(a), |
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
library(torch) | |
library(tidymodels) | |
# simulated data ------------------------------------------------------------ | |
set.seed(1) | |
df <- tibble( | |
x = rnorm(500), | |
y = 4 + 3 * tanh(-1 + 1*x) + rnorm(500, sd = 0.25) | |
) |
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
library(tidyverse) | |
gg_cartesian_grid <- function(width, height) { | |
data.frame( | |
x = width*c(-1, 1), | |
y = height*c(-1, 1) | |
) %>% | |
ggplot(aes(x, y)) + | |
geom_hline(yintercept = 0, colour = "white") + | |
geom_vline(xintercept = 0, colour = "white") + |
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
--- | |
title: "lightgbm" | |
author: "Athos" | |
date: "09/07/2020" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE) | |
library(tidyverse) # metapackage of all tidyverse packages |
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
#' Author: Athos Damiani | |
#' Subject: Teste na Live 1 | |
library(tidyverse) | |
library(magrittr) | |
# Import ----------------------------------------------------------------------- | |
# Tidy ------------------------------------------------------------------------- |
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
library(tidyverse) | |
library(tidymodels) | |
library(gganimate) | |
theme_set(theme_minimal(20)) | |
dados <- tibble( | |
x = runif(1000) - 0.5, | |
y = sin(x * pi * 2) + rnorm(1000, sd = 0.3) | |
) | |
trees <- 30 |
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
--- | |
title: "Transformer" | |
author: "Athos Petri Damiani" | |
date: "05/01/2020" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
``` |
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
# Horse-or-Human-NoValidation.ipynb | |
library(zeallot) | |
library(reticulate) | |
library(purrr) | |
library(keras) | |
library(httr) | |
library(png) | |
library(rray) | |
library(cowplot) | |
library(magick) |
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
library(tidyverse) | |
library(gganimate) | |
library(broom) | |
library(rsample) | |
library(purrr) | |
library(modelr) | |
library(magick) | |
set.seed(1) |
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
library(RSQLite) | |
library(tidyverse) | |
library(dbplyr) | |
con <- RSQLite::dbConnect(RSQLite::SQLite(), "database.sqlite") | |
nome_das_tabelas <- RSQLite::dbListTables(con) | |
tabelas <- nome_das_tabelas %>% | |
map(~dbplyr::db_collect(con, glue::glue("select * from {.x}"))) %>% |