Skip to content

awong234/sarcasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

{sarcasm}

Usage

Produces sArCaStic text from a character vector.

set.seed(2)
text = 'pythonistas'
sarcastic(text)
[1] "pYThONiStAS"
set.seed(2)
text = c('pythonistas', 'r_users')
sarcastic(text)
[1] "pYThONiStAS" "r_usERs"    

Comes with shorthand as well.

text %>% `/s`
[1] "pyThOnistaS" "r_uSERS"    

Error handler

Make a mockery of those dreadful errors:

sarcastic_errors()
A = rnorm
A[10]
ErRoR in A[10]: OBjECT OF TyPe 'closure' Is nOt sUBsEtTabLe

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.

Installation

remotes::install_github("https://github.com/awong234/sarcasm")

Python module 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)
[1] "pythOnIsTas" "r_uSeRs"    
pysnark$sarcastic(pysnark$sarcastic)
[1] "<FuncTIOn sArCaSTiC AT 0X00000000250dD1F0>"

About

generate sArCaStic text in R and python

Resources

Stars

Watchers

Forks

Packages

No packages published