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
> Hmisc::wtd.quantile | |
function (x, weights = NULL, probs = c(0, 0.25, 0.5, 0.75, 1), | |
type = c("quantile", "(i-1)/(n-1)", "i/(n+1)", "i/n"), normwt = FALSE, | |
na.rm = TRUE) | |
{ | |
if (!length(weights)) | |
return(quantile(x, probs = probs, na.rm = na.rm)) | |
type <- match.arg(type) | |
if (any(probs < 0 | probs > 1)) | |
stop("Probabilities must be between 0 and 1 inclusive") |
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
#!/bin/bash | |
# | |
# /etc/rc.d/init.d/flexlm | |
# | |
# Manage the Intel license server | |
# | |
# chkconfig: 2345 90 10 | |
# description: Start or stop the Intel flex license manager | |
# There are two daemons: the master and the vendor. |
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
#!/bin/bash | |
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'` | |
for JAIL in $JAILS | |
do | |
fail2ban-client status $JAIL | |
done |
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
# Load the MNIST digit recognition dataset into R | |
# http://yann.lecun.com/exdb/mnist/ | |
# assume you have all 4 files and gunzip'd them | |
# creates train$n, train$x, train$y and test$n, test$x, test$y | |
# e.g. train$x is a 60000 x 784 matrix, each row is one digit (28x28) | |
# call: show_digit(train$x[5,]) to see a digit. | |
# brendan o'connor - gist.github.com/39760 - anyall.org | |
load_mnist <- function() { | |
load_image_file <- function(filename) { |