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
#!/bin/bash | |
# This code was modified from Thorsten by me: | |
# https://bbs.archlinux.org/viewtopic.php?pid=1024618#p1024618 | |
# sets a tag defined wallpaper when tag changes | |
declare -A WALLPAPER | |
# These wallpapers come with Deepin desktop environment, but also look great in hlwm | |
DIR=/usr/share/backgrounds |
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
# Kyle Andrews | |
# This code implements math derived by Jean Jacquelin | |
# License: GPL3+ | |
rm(list = ls()) | |
library(pracma) | |
x <- sort(runif(20, max = 10)) | |
n <- length(x) | |
a0 <- 0 |
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
;;;; HLWM convience tools | |
;; author: Kyle Andrews | |
;; license: GPL V3 or later | |
(defun bash-path () | |
"Return all the executables in the path according to bash. | |
This does not work as well as dmenu-path since it includes bash | |
reserved words in the result." |
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
# Author: Kyle Andrews | |
# License: GPL3+ | |
# Date: 2017-11-04 | |
# Description: Make a higher order function that returns a function that returns a function for exploring polynomial equations. | |
#' Test if all elements in vector are unique. | |
#' @param x Vector. | |
#' @return Logical Scalar. | |
all_unique <- function(x) { | |
length(x) == length(unique(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
# Author: Kyle Andrews | |
# GPL3+ license applies. | |
#' parallel index map function for univariate data. | |
#' @param f Function -> Vector. | |
#' @param xs Vector. | |
#' @param ys Vector. | |
#' @param ... Extra arguments to f. | |
#' @examples |
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
chunk_text <- function(txt, k) { | |
n <- nchar(txt) | |
q <- n %/% k | |
r <- n %% k | |
unlist(lapply(seq.int(1, k), function(i) { | |
substr(txt, start = (i - 1)*q + min(i - 1, r) + 1, stop = i * q + min(i, r)) | |
}), recursive = FALSE) | |
} |
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
#!/usr/bin/env racket | |
#lang racket/base | |
(require racket/vector) | |
;; Capture the command line args sent to this script | |
(define args | |
(current-command-line-arguments)) | |
NewerOlder