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
const AWS = require("aws-sdk"); | |
const proxy = require("proxy-agent"); | |
const { | |
getActivityTask, | |
sendTaskFailure, | |
sendTaskHeartbeat, | |
sendTaskSuccess, | |
} = require("./awsHelper"); | |
const { worker } = require("./worker"); |
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
let msgIdx = 0; | |
const randomInt = (min, max) => { | |
return Math.floor(Math.random() * (max - min + 1) + min); | |
}; | |
const getMessages = (batchSize) => { | |
const messages = []; | |
for (let i = 0; i < batchSize; i += 1) { | |
messages.push({ idx: msgIdx, timeout: randomInt(0, 20) }); | |
msgIdx += 1; | |
} |
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
# Generate MD5 of audio data chunk within WAV file (OSX) | |
sox <input_file> -t raw - | md5 | |
# Merge audio files by channel, i.e. 2 mono to stereo | |
sox -M <input_file.L> <input_file.R> <output_file> | |
# Raw audio data into WAV file | |
sox -t raw -r 44.1k -b 16 -c 1 -B -e signed-integer <input_file> <output_file>.wav |
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
// As a fix for https://github.com/vega/vega/issues/2057 is still not released | |
// I needed a workaround for vertically centering multiline text. This method | |
// explicitly sets the lineHeight of the text mark which can then be used to | |
// calculate the offset needed to shift the anchor point of the text on the y | |
// axis. The vertical centering is applied by the marks[0].transform[0] formula. | |
{ | |
"$schema": "https://vega.github.io/schema/vega/v5.json", | |
"data": [ | |
{ |
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
|