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
# cmake configuration to generate dll (dynamic library) in windows | |
# | |
# Copyright 2018 The Statslabs Authors. | |
# | |
cmake_minimum_required(VERSION 3.16) | |
project(rmath VERSION 1.0.0 LANGUAGES C) | |
set(CMAKE_C_STANDARD 11) | |
set(CMAKE_C_STANDARD_REQUIRED True) |
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
document_data <- function(dataset,R_file) { | |
initial = "#' WHAT IS THIS DATASET ABOUT | |
#' | |
#' WRITE DESCRIPTION OF THIS DATASET | |
#' | |
#' | |
#' @usage HOW TO USE | |
#' | |
#' @format Description | |
#' \\describe{" |
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
my @vals= <1 2 40 40 90 20.5 20.5 20.5 20.5 4 4 6>; | |
my @new = @vals.BagHash.sort(+*.key); | |
my $i=1; | |
for @new { | |
if .value == 1 { | |
say .key => $i; | |
$i+=1 | |
} else { | |
say .key => $i+(.value - 1)/2; | |
$i = $i + .value |
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
# Get the first 6 digits of the hash of last commit | |
# In bash | |
git ls-remote git://github.com/rakudo/rakudo.git refs/heads/master | cut -f 1 | cut -c1-6 | |
# In powershell | |
(git ls-remote git://github.com/rakudo/rakudo.git refs/heads/master).Split()[0].SubString(0,6) | |
# Within repo |