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
/** | |
* @file algorithm-quickSortMiddlePivot.ts - A TypeScript implementation of the Quick Sort algorithm using recursion and the middle element of the input array (or the element just left of center) as a pivot | |
* @author Avana Vana | |
* @desc Algorithmic complexity: | |
* - Time complexity: Ω(n log(n)), Θ(n log(n)), O(n^2) (rare) | |
* - Space complexity: O(n) | |
*/ | |
/** | |
* @function quickSort |
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
/** | |
* @file algorithm-insertionSort.ts - A TypeScript implementation of the Insertion Sort algorithm | |
* @author Avana Vana | |
* @desc Algorithmic complexity: | |
* - Time complexity: Ω(n), Θ(n^2), O(n^2) | |
* - Space complexity: O(1) | |
*/ | |
/** | |
* @function insertionSort |
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
/** | |
* @file algorithm-quickSort.ts - A TypeScript implementation of the Quick Sort algorithm using recursion, incrementing/decrementing pointers instead of array mutation for optimization of space complexity, and a pivot selected in the middle (or just to the left of the middle) of an input array | |
* @author Avana Vana | |
* @desc Algorithmic complexity: | |
* - Time complexity: Ω(n log(n)), Θ(n log(n)), O(n^2) (rare) | |
* - Space complexity: O(log(n)) | |
*/ | |
/** | |
* @function quickSort |
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
/** | |
* @file algorithm-quickSortInitialPivot.ts - A TypeScript implementation of the Quick Sort algorithm using recursion and the first element of the input array as a pivot | |
* @author Avana Vana | |
* @desc Algorithmic complexity: | |
* - Time complexity: Ω(n log(n)), Θ(n log(n)), O(n^2) | |
* - Space complexity: O(n) | |
*/ | |
/** | |
* @function quickSort |
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
/** | |
* @file algorithm-mergeSort.ts - A TypeScript implementation of the Merge Sort algorithm using recursion | |
* @author Avana Vana | |
* @desc Algorithmic complexity: | |
* - Time complexity: Ω(n log(n)), Θ(n log(n)), O(n log(n)) | |
* - Space complexity: O(n) | |
*/ | |
/** | |
* @function mergeSort |
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
/** | |
* @file algorithm-selectionSort.ts - A TypeScript implementation of the Selection Sort algorithm | |
* @author Avana Vana | |
* @desc Algorithmic complexity: | |
* - Time complexity: Ω(n^2), Θ(n^2), O(n^2) | |
* - Space complexity: O(1) | |
*/ | |
/** | |
* @function selectionSort |
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
/** | |
* @file algorithm-bubbleSort.ts - A TypeScript implement of the bubbleSort algorithm | |
* @author Avana Vana | |
* @desc Algorithmic complexity: | |
* - Time complexity: Ω(n), Θ(n^2), O(n^2) | |
* - Space complexity: O(1) | |
*/ | |
/** | |
* @function bubbleSort |
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 | |
# add to crontab with something like '* 0 * * * /path/to/tzdb.sh &>/dev/null' | |
# change the -o option's parameter to save the files in a different dir on your machine | |
date=`date "+%Y-%m-%d"` | |
if [[ ! `curl -s https://timezonedb.com/date.txt` < "$date" ]]; then | |
curl -s "https://timezonedb.com/files/timezonedb.{csv,sql}.zip" -o "tzdb-${date}-#1.zip" | |
fi |
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 | |
# updated from original to encode as mp3, renamed 'splitaudiokf', and improved usage file | |
IN=$1 | |
OUT=$2 | |
true ${SD_PARAMS:="-55dB:d=0.3"}; | |
true ${MIN_FRAGMENT_DURATION:="20"}; | |
export MIN_FRAGMENT_DURATION |
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 | |
# Modified from original to encode as mp3, renamed to 'splitaudio', and made the usage text more substantial | |
IN=$1 | |
OUT=$2 | |
true ${SD_PARAMS:="-55dB:d=0.3"}; | |
true ${MIN_FRAGMENT_DURATION:="20"}; | |
export MIN_FRAGMENT_DURATION |
NewerOlder