Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
wk | yr | file_version | num | |
---|---|---|---|---|
37 | 2016 | 3.0.rc1 | 1437 | |
38 | 2016 | 3.0.rc1 | 500 | |
39 | 2016 | 3.0.rc1 | 603 | |
40 | 2016 | 3.0.rc1 | 625 | |
41 | 2016 | 3.0.rc1 | 333 | |
41 | 2016 | 3.0rc2 | 1387 | |
42 | 2016 | 3.0rc2 | 603 | |
42 | 2016 | 3.0.rc1 | 160 | |
43 | 2016 | 3.0rc2 | 592 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
class Cfunction: | |
""" | |
A class for numeric calculus experiments | |
""" | |
def __init__(self, fcn, eps=0.001): | |
self.fcn = fcn | |
self.__eps = eps | |
self.integral = lambda x: self.integrate(0, x) # Indefinite integral | |
self.derivative = self._derivative() # f'(x) |
This file contains 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
sparse_matrix <- function(size, sparsity){ | |
# Returns a <size> by <size> symmetric matrix | |
# with the desired sparsity percent | |
sparse <- matrix( | |
rbinom(size * size, 1, sparsity), | |
ncol = size, | |
nrow = size | |
) | |
sparse[lower.tri(sparse)] <- 0 | |
sparse <- sparse + t(sparse) |
This file contains 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
get_psu_sample <- function(){ | |
nodeinfo <- read.table("http://www.stat.psu.edu/~dhunter/Rnetworks/nodal.attr.txt", head=T) | |
nodeinfo <<- cbind(1:nrow(nodeinfo),nodeinfo) | |
names(nodeinfo)[1] <<- "id" | |
myedges <<- read.table("http://www.stat.psu.edu/~dhunter/Rnetworks/edgelist.txt") | |
} | |
network_example <- function(){ | |
require(network) |
This file contains 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
tryAsInteger = function(node) { | |
val = xmlValue(node) | |
ans = as.integer(gsub(",", "", val)) | |
if(is.na(ans)) | |
val | |
else | |
ans | |
} | |
scrapeTable <- function(theurl = "http://en.wikipedia.org/wiki/List_of_highest_mountains"){ |