StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
780 B
52 lines
780 B
'use strict';
|
|
const {stdin} = process;
|
|
|
|
module.exports = () => {
|
|
let result = '';
|
|
|
|
return new Promise(resolve => {
|
|
if (stdin.isTTY) {
|
|
resolve(result);
|
|
return;
|
|
}
|
|
|
|
stdin.setEncoding('utf8');
|
|
|
|
stdin.on('readable', () => {
|
|
let chunk;
|
|
|
|
while ((chunk = stdin.read())) {
|
|
result += chunk;
|
|
}
|
|
});
|
|
|
|
stdin.on('end', () => {
|
|
resolve(result);
|
|
});
|
|
});
|
|
};
|
|
|
|
module.exports.buffer = () => {
|
|
const result = [];
|
|
let length = 0;
|
|
|
|
return new Promise(resolve => {
|
|
if (stdin.isTTY) {
|
|
resolve(Buffer.concat([]));
|
|
return;
|
|
}
|
|
|
|
stdin.on('readable', () => {
|
|
let chunk;
|
|
|
|
while ((chunk = stdin.read())) {
|
|
result.push(chunk);
|
|
length += chunk.length;
|
|
}
|
|
});
|
|
|
|
stdin.on('end', () => {
|
|
resolve(Buffer.concat(result, length));
|
|
});
|
|
});
|
|
};
|
|
|