Skip to content

Instantly share code, notes, and snippets.

@charly06
charly06 / clean-up-boot-partition-ubuntu.md
Created August 20, 2018 12:27 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@charly06
charly06 / ggrocs.R
Last active March 20, 2023 15:54 — forked from jwaage/ggroc.R
Multiple ROC curves using ggplot2 and pROC
#' Functions plots multiple 'roc' objects into one plot
#' @param rocs
#' A list of 'roc' objects. Every list item has a name.
#' @param breaks
#' A vector of integers representing ticks on the x- and y-axis
#' @param legentTitel
#' A string which is used as legend titel
ggrocs <- function(rocs, breaks = seq(0,1,0.1), legendTitel = "Legend") {
if (length(rocs) == 0) {
stop("No ROC objects available in param rocs.")
@charly06
charly06 / dtwDistWithDifferentLength.R
Last active April 17, 2017 12:14
A function for calculating a distance based on dtw for time series data with different length. This function can be used in dist(...) in R.
#' See: https://stats.stackexchange.com/a/58786/103349
dtw.dist.naomit <- function(query, ref, ...) {
queryTrimmed <- na.omit(query)
refTrimmed <- na.omit(ref)
dif <- length(queryTrimmed) - length(refTrimmed)
if (dif > 0) {
# refTrimmed is too short and has to be extended in order to avoid
# (out of warping window) errors during dtw
@charly06
charly06 / multiclass.R
Last active January 5, 2019 12:20 — forked from zachmayer/multiclass.R
Multi Class Performance Metrics with AUC based on Hand and Till (2001) following the description of Huang and Ling (2005). Use stratified folds, otherwise you might get errors in case one class is missing in a fold.
#Multi-Class Summary Function based on Hand and Till (2001)
#Based on caret:::twoClassSummary
require(compiler)
multiClassSummaryAUC <- cmpfun(function (data, lev = NULL, model = NULL){
#Load Libraries
require(Metrics)
require(caret)
#print(data)