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
> d <- Daisi("Add Two Numbers") | |
[1] "Looking for Daisi: Add Two Numbers" | |
[1] "https://app.daisi.io/pebble-api/daisies/connect?name=Add%20Two%20Numbers" | |
> de <- d$compute(firstNumber = 5, secondNumber = 6) | |
[1] "Executing Daisi: 0a688b9a-49f7-42e9-8bab-5091b871f1a8" | |
> de$value() | |
[1] "Fetching Result: fa68ea3c-e73a-468e-8d51-a1f4ab824165" | |
[1] 11 |
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(httr) | |
my_code <- paste(readLines("Downloads/text.R"), collapse = "%250A") | |
params <- list( | |
backgroundColor = "rgba(100, 20, 250, 100)", | |
code = my_code, | |
theme = "dracula", | |
exportSize = "3x" | |
) |
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
import requests | |
import time | |
import pandas as pd | |
# Get the list of coins from the API | |
r = requests.get("https://api.coingecko.com/api/v3/coins/list") | |
coin_list = r.json() | |
# Get all the ids | |
coin_ids = [x["id"] for x in coin_list] |
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(shiny) | |
library(shinythemes) | |
library(future) | |
library(promises) | |
library(tidyverse) | |
library(ipc) | |
library(future.callr) | |
plan(callr) |
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(ggrepel) | |
ln <- read_csv("Investment_Bubble_Cycle_Line.csv") %>% | |
mutate(Y = Y + 50 + 28) | |
cv <- read_csv("Investment_Bubble_Cycle.csv") %>% | |
mutate(Y = Y + 50) | |
mapping = tibble( | |
X = cv$X[c(20, 50, 70, 75, 105, 125, 138, 150, 175, 165, 185, 208, 225, 255, 280)], |
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(ggplot2) | |
ggplot(data = diamonds, aes(x = carat, y = price, colour = clarity)) + | |
geom_point() + | |
scale_y_continuous(labels = scales::dollar, | |
breaks = scales::breaks_width(2000)) + | |
scale_x_continuous(breaks = scales::breaks_width(.5)) | |
ggplot(data = diamonds, aes(x = carat, y = price, colour = clarity)) + | |
geom_point() + |
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(clean) | |
unclean_tbl <- tibble( | |
Logical = c("Yes", "No", "Depends", "Unknown"), | |
Factor = c("bachelor's", "Bachelor's Degree", "Master's Degree", "PhD"), | |
Currency = c("$20", "$ 25", "26.02", "$27.0"), | |
Numeric = c("~15", "about 10", "20", "15") | |
) |
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(fable) | |
fable_series <- AirPassengers %>% | |
as_tsibble() %>% | |
model( | |
ets = ETS(box_cox(value, 0.3)), | |
arima = ARIMA(value), | |
snaive = SNAIVE(value) | |
) %>% |
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(magick) | |
library(tidyverse) | |
im <- image_read("line.jpg") | |
im_proc <- im %>% | |
image_channel("saturation") %>% | |
image_threshold("white", "30%") %>% | |
image_negate() |
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) | |
polygon_values <- tibble( | |
id = 1:2, | |
value = c(-2, 2) | |
) | |
polygon_positions <- tibble( | |
id = c(1, 1, 1, 2, 2, 2, 2), | |
x = c(1, 2, 3, 5, 6, 7, 6), |