-
usethis::use_readme_rmd() -
usethis::use_roxygen_md() -
usethis::use_github_links() -
usethis::use_pkgdown_github_pages() -
usethis::use_tidy_github_labels() -
usethis::use_tidy_style() -
urlchecker::url_check()
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
| #' @export | |
| new_schedule_builder <- function() { | |
| builder <- list( | |
| sec = "0", | |
| min = "0", | |
| hour = "0", | |
| dom = "*", | |
| month = "*", | |
| dow = "*", | |
| year = "*" |
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
| ``` r | |
| A <- matrix(c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), nrow = 3, ncol = 4) | |
| B <- matrix(c(13, 14, 15, 16, 17, 18, 19, 20), nrow = 4, ncol = 2) | |
| dot_product <- function(x, y) { | |
| mapply(\(x, y) sum(x * y), x, y) | |
| } | |
| rows_of <- function(m) purrr::array_tree(m, 1) | |
| cols_of <- function(m) purrr::array_tree(m, 2) |
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
| my_fun <- function() { | |
| rlang::local_interactive() | |
| rlang::check_installed(c("DiagrammeR (>= 1.0.9)", "DiagrammeRsvg")) | |
| stopifnot(requireNamespace("DiagrammeR", quietly = TRUE)) | |
| stopifnot(requireNamespace("DiagrammeRsvg", quietly = TRUE)) | |
| } | |
| my_fun() | |
| #> ℹ The packages "DiagrammeR" (>= 1.0.9) and "DiagrammeRsvg" are required. | |
| #> ✖ Would you like to install them? |
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
| stack_rasters <- function(rasters, | |
| raster_path, | |
| ..., | |
| reference_layer = 1, | |
| resampling_method = "bilinear") { | |
| check_type_and_length( | |
| reference_layer = integer(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
| #!/bin/bash | |
| ### steps #### | |
| # verify the system has a cuda-capable gpu | |
| # download and install the nvidia cuda toolkit and cudnn | |
| # setup environmental variables | |
| # verify the installation | |
| ### | |
| ### to verify your gpu is cuda enable check |
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
| #30DayChartChallenge 06 data day OWID | |
| # South America Cereal Yield (t/ha) | |
| # Data source: OWID and FAO, available at https://ourworldindata.org/africa-yields-problem | |
| library(tidyverse) | |
| library(ggtext) | |
| library(countrycode) | |
| library(showtext) | |
| showtext_opts(dpi = 300) | |
| showtext_auto(enable = 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
| # devtools::install_dev("rsample") | |
| library(tidymodels) | |
| set.seed(252) | |
| first_split <- initial_split(iris, p = 8/10) | |
| test <- testing(first_split) | |
| nrow(test) | |
| others <- training(first_split) |
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
| FROM ruby:2.6.1 | |
| RUN curl -sL https://deb.nodesource.com/setup_8.x | bash \ | |
| && apt-get update && apt-get install -y nodejs xvfb libfontconfig wkhtmltopdf && rm -rf /var/lib/apt/lists/* \ | |
| && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ | |
| && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ | |
| && apt-get update && apt-get install -y yarn && rm -rf /var/lib/apt/lists/* | |
| # Packages for wkhtmltopdf. These are available in ubuntu but not in debian 9. Base image uses debian 9. | |
| RUN wget -q -O /tmp/libjpeg-turbo8.deb http://archive.ubuntu.com/ubuntu/pool/main/libj/libjpeg-turbo/libjpeg-turbo8_2.0.1-0ubuntu2_amd64.deb \ | |
| && dpkg -i /tmp/libjpeg-turbo8.deb \ |
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
| {%- comment -%} | |
| Google Tag Manager scripts for checkout.liquid | |
| Note: This script must run after {{ checkout_scripts }} | |
| {%- endcomment -%} | |
| {% assign order_data = checkout.order %} | |
| {% assign customer_data = checkout.customer %} | |
| <script type="text/javascript"> | |
| window.dataLayer = window.dataLayer || []; |