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 | |
set -e | |
# For example, you can generate these with `git tag --sort=creatordate` | |
tags=(commit1 commit2 ...) | |
# Some projects wont compile otherwise | |
JAVA_8_HOME=/path/to/java8 | |
# Sonarqube needs a recent version of java to run | |
JAVA_17_HOME=/path/to/java8 |
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
# Example of using the dtw library | |
# This code is not mine. | |
library(dtw) | |
idx<-seq(0,6.28,len=100); | |
query<-sin(idx)+runif(100)/10; | |
t1 <- c(0, 0.5, 0) | |
t2 <- c(-1, 0, -1) | |
t3 <- c(-1, 0, 1) |
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
package io.github.cawfree.dtw.alg; | |
/** | |
* A class that implements the awesome Dynamic Time Warping algorithm. | |
* Absolutely all credit for this implementation goes to the developers of the Gesture and Activity Recognition Toolkit, (GART). | |
* @http://trac.research.cc.gatech.edu/GART/browser/GART/weka/edu/gatech/gart/ml/weka/DTW.java?rev=9 | |
**/ | |
public final class DTW { | |
/** Defines the result for a Dynamic Time Warping operation. */ |
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
# From https://stackoverflow.com/questions/55266918/how-to-get-main-git-branch-name-from-command-line | |
# Original author: tukusejssirs (StackOverflow) | |
# Current local branch name | |
git rev-parse --abbrev-ref HEAD | |
# Output: branch | |
# Remote branch name that is tracked by current local branch | |
git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD) | |
# Output: origin/branch |
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 | |
# Copied from https://milhouse.dev/2015/11/20/writing-a-process-pool-in-bash/ | |
# Define the pool size (aka number of processes to run concurrently) | |
POOL_SIZE=4 | |
parallel() { | |
local proc procs | |
declare -a procs=() # this declares procs as an array |