create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
PS> time { ping -n 1 google.com } -Samples 10 -Silent | |
.......... | |
Avg: 62.1674ms | |
Min: 56.9945ms | |
Max: 87.9602ms | |
PS> time { ping -n 1 google.com } -Samples 10 -Silent -Long | |
.......... | |
Avg: 00:00:00.0612480 | |
Min: 00:00:00.0572167 |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
bigcorPar <- function(x, nblocks = 10, verbose = TRUE, ncore="all", ...){ | |
library(ff, quietly = TRUE) | |
require(doMC) | |
if(ncore=="all"){ | |
ncore = multicore:::detectCores() | |
registerDoMC(cores = ncore) | |
} else{ | |
registerDoMC(cores = ncore) | |
} |
Some things takes much less time and stress once you know the right tool. Below, there is a community edited list of software for scientists.
in General purpose text/code editors. It may be better to have a good editor for everything, than different ones for different languages, scripts, notes.
[General] | |
IniMode=true | |
[formats] | |
data\align-ampersand\bold=true | |
data\align-ampersand\fontFamily=<default> | |
data\align-ampersand\foreground=#dc322f | |
data\align-ampersand\italic=false | |
data\align-ampersand\overline=false | |
data\align-ampersand\pointSize=0 |
# Detect operating system in Makefile. | |
# Author: He Tao | |
# Date: 2015-05-30 | |
OSFLAG := | |
ifeq ($(OS),Windows_NT) | |
OSFLAG += -D WIN32 | |
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64) | |
OSFLAG += -D AMD64 | |
endif |
# Context manager to generate batches in the background via a process pool | |
# Usage: | |
# | |
# def batch(seed): | |
# .... # generate minibatch | |
# return minibatch | |
# | |
# with BatchGenCM(batch) as bg: | |
# minibatch = next(bg) | |
# .... # do something with minibatch |
m1 <- lm(mpg ~ hp, data = mtcars) | |
m2 <- lm(mpg ~ hp + drat, data = mtcars) | |
m3 <- lm(mpg ~ hp + drat + factor(gear), data = mtcars) | |
library(pander); library(memisc) | |
panderOptions('table.alignment.rownames', 'left') | |
pander(relabel( | |
mtable(m1, m2, m3, | |
summary.stats=c('N', 'R-squared', 'F')), | |
'(Intercept)' = 'Constant', |
# Place this in a file at '~/.Rprofile' to ensure it's sourced on startup | |
.First <- function() { | |
# RStudio-specific startup | |
if (!is.na(Sys.getenv("RSTUDIO", unset = NA)) && | |
Sys.info()[["sysname"]] == "Windows") | |
{ | |
# work around mis-encoded environment variables | |
USERPROFILE <- Sys.getenv("USERPROFILE") | |
HOME <- file.path(USERPROFILE, "Documents", fsep = "\\") | |
R_USER <- HOME |