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
| forkbomb <- function (...) { | |
| # you probably shouldn't run this; your pc will crash | |
| require (parallel) | |
| parallel::mclapply(1:2, forkbomb, mc.cores = 2) | |
| } | |
| forkbomb() |
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
| monic <- function (max, order, a = 1, digits = 3) { | |
| P <- matrix(0, order-1, order-2) | |
| P[row(P)-1 == col(P)] <- 1 | |
| join_table <- function (a, b) { | |
| n <- intersect(names(a), names(b)) |
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
| require(ggplot2) | |
| require(grid) | |
| shinyServer(function(input, output) { | |
| parameters <- NULL | |
| processs_follow <- function(input){ | |
| if(input$user_ids != ''){ | |
| paste0('follow=', gsub(' ', '', input$user_ids)) |
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
| AutonomaGenerate = function( | |
| dims = 25 # the size of the autonomaton | |
| ) | |
| { | |
| # Ryan Grannell, 2012 | |
| # A function to generate random autonoma (tend to be square, |
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
| MonicSolve = function( | |
| order = 5, # the order of the monic polynomials being solved | |
| n = 5, # n, in (n,n-1,...,-n), the acceptable coefficient values | |
| iterations = 1000, # the number of equations to solve | |
| random = FALSE # if m!= FALSE, use randomly generated polynomial coefficients | |
| ) | |
| { |
NewerOlder