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
template <typename REAL> | |
REAL cor(const cpuvec<REAL> &x, const cpuvec<REAL> &y) | |
{ | |
const len_t n = x.size(); | |
if (n != y.size()) | |
throw std::runtime_error("non-conformal arguments"); | |
const REAL *x_d = x.data_ptr(); | |
const REAL *y_d = y.data_ptr(); | |
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
// h5c++ generate.cpp -o generate | |
#include <string> | |
#define ARMA_USE_HDF5 | |
#include <armadillo> | |
static inline void gen(const int m, const int n, std::string fname) | |
{ | |
arma::fmat x(m, n); | |
for (int j=0; j<n; j++) |
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
pvt.powscor_mod = function(x, alpha, lambda, w) | |
{ | |
#### determine correlation shrinkage intensity | |
if (missing(lambda)) | |
{ | |
lambda = corpcor:::estimate.lambda(x, w, verbose=FALSE) | |
lambda.estimated=TRUE | |
} | |
else | |
{ |
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
pvt.powscor_mod = function(x, alpha, lambda, w) | |
{ | |
#### determine correlation shrinkage intensity | |
if (missing(lambda)) | |
{ | |
if (comm.rank() == 0) | |
lambda = corpcor:::estimate.lambda(x, w, verbose=FALSE) | |
else | |
lambda = NULL | |
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
library(DBI) | |
library(RSQLite) | |
# create fake data | |
set.seed(1234) | |
n = 100 | |
big_tbl = data.frame( | |
ind = 1:n, | |
x = runif(n), | |
y = rnorm(n) |
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
#' ighwsm | |
#' Install (from) GitHub With Sub-Modules. Use when | |
#' \code{remotes::install_github()} fails. | |
#' | |
#' @details | |
#' Wrapper around \code{system()}. | |
#' | |
#' @param repo | |
#' GH repo of the usual form: \code{name/project}. | |
#' @param save_clone |
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
f = function(expr) | |
{ | |
for (i in 1:2) | |
print(system.time(eval(expr))[[3]]) | |
} | |
f(Sys.sleep(.4)) | |
## [1] 0.401 | |
## [1] 0 |
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
Year | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | Totals | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1998 | 871644 | 892840 | ||||||||||||
1999 | 591355 | 696323 | 753083 | 646712 | 576272 | 569493 | 589476 | 703394 | 808627 | 945701 | 1004333 | 1253354 | 9138123 | |
2000 | 639972 | 707070 | 736543 | 617689 | 538648 | 550561 | 542520 | 682501 | 782087 | 845886 | 898598 | 1000962 | 8543037 | |
2001 | 640528 | 675156 | 729332 | 594723 | 543501 | 540491 | 539498 | 707288 | 864038 | 1029691 | 983186 | 1062559 | 8910191 | |
2002 | 665803 | 694668 | 714665 | 627745 | 569247 | 518351 | 535594 | 693139 | 724123 | 849281 | 887647 | 974059 | 8454322 | |
2003 | 653751 | 708281 | 736864 | 622832 | 567436 | 529334 | 533289 | 683517 | 738371 | 856863 | 842932 | 1008118 | 8481588 | |
2004 | 695000 | 723654 | 738298 | 642589 | 542456 | 546847 | 561773 | 666598 | 740260 | 865741 | 890754 | 1073301 | 8687671 | |
2005 | 685811 | 743070 | 768290 | 658954 | 557058 | 555560 | 561358 | 687012 | 791353 | 852478 | 927419 | 1164382 | 8952945 | |
2006 | 775518 | 820679 | 845219 | 700373 | 626270 | 616097 | 631156 | 833070 | 919487 | 970030 | 1045194 | 1153840 | 10036933 |
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 alpine:3.10.2 | |
RUN apk add R R-dev bash build-base | |
CMD ["/bin/bash"] |
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
pbd = c( | |
"hdfio", | |
"hpcvis", | |
"kazaam", | |
"pbdBASE", | |
"pbdCS", | |
"pbdDEMO", | |
"pbdDMAT", | |
"pbdIO", | |
"pbdML", |
NewerOlder