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 fs = require("fs"); | |
// Function to read JSON files | |
function readJsonFile(filePath) { | |
return new Promise((resolve, reject) => { | |
fs.readFile(filePath, "utf8", (err, data) => { | |
if (err) { | |
reject(err); | |
} else { | |
resolve(JSON.parse(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
const fs = require("fs"); | |
function writeToFile(i, { component, content }) { | |
try { | |
fs.writeFileSync(`sirs-data-${i}-${component.toLowerCase()}.dat`, content); | |
// file written successfully | |
} catch (err) { | |
// eslint-disable-next-line no-console | |
console.error(err); | |
} |
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 fs = require("fs"); | |
const TOTAL_POPULATION = 100000; | |
const INITIAL_INFECTED_POPULATION = 1; | |
const ALPHA = 1; | |
const BETA = 3; | |
const TIME_TICK = 0.1; | |
const MAXIMUM_TIME = 20; | |
if (TIME_TICK <= 0) throw new Error("Time tick must be greater than zero"); |
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
// VHS Curve Bend points generator to be used in GIMP with the Curve Bend tool. | |
// For great vaporwave. | |
function generate_val(intensity) { | |
return Math.round(127 - intensity / 2 + Math.random() * intensity); | |
} | |
const INTENSITY = process.argv[2] || 1.15; | |
console.log("POINTFILE_CURVE_BEND\nVERSION 1.0"); |
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
{"lastUpload":"2020-08-20T23:20:51.934Z","extensionVersion":"v3.4.3"} |