{sarcasm}
devtools::load_all() library(reticulate) knitr::knit_hooks$set( error = function(x, options) { paste0( "<pre><code><span style='color: red;'>", sarcastic(x), "<span></pre></code>") } ) knitr::opts_chunk$set(comment = NULL)
Produces sArCaStic text from a character vector.
set.seed(2) text = 'pythonistas' sarcastic(text)
set.seed(2) text = c('pythonistas', 'r_users') sarcastic(text)
Comes with shorthand as well.
text %>% `/s`
Mocking errors:
sarcastic_errors() A = rnorm A[10]
Prank your friends by placing this in their .Rprofile
:
options(ridicule_probability = 1) demoralizing_errors(silent = TRUE) A[10]
Error in A[10] : object of type 'closure' is not subsettable. HuZzah Wow WeE YoU'Re a wEll-mAdE cOdEr.
The function makes use of and corrupts the praise
package to offer mockery
after errors are encountered, optionally with probability specified in the
options to make it an unexpected surprise.
remotes::install_github("https://github.com/awong234/sarcasm")
pysnark
There is also a python module included:
pysnark = reticulate::import_from_path(module = 'pysnark.sarcasm', path = system.file(package = 'sarcasm', 'pysnark')) pysnark$sarcastic(text)
pysnark$sarcastic(pysnark$sarcastic)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.