Generate a batch of commands based on single one.
Maintained by:
- Mathieu Bour, Lead Platform Engineer at Cohesive Computing SA
- Clarisse Tarrou, Platform Engineer at Cohesive Computing SA
Install with npm:
npm install --save @csquare/crossp
Install with Yarn:
yarn add @csquare/crossp
Using CommonJS syntax:
const { crossp } = require('@csquare/crossp');
const output = crossp();
Using ESM syntax (default import):
import crossp from '@csquare/crossp';
const output = crossp();
or
import { crossp } from '@csquare/crossp';
const output = crossp();
import crossp from '@csquare/crossp';
console.log(crossp('python train.py -e %[1,2]% -lr %[0.1,0.2]% -o %[in,out]%.txt'));
// console output:
[
'python train.py -e 1 -lr 0.1 -o in.txt',
'python train.py -e 1 -lr 0.1 -o out.txt',
'python train.py -e 1 -lr 0.2 -o in.txt',
'python train.py -e 1 -lr 0.2 -o out.txt',
'python train.py -e 2 -lr 0.1 -o in.txt',
'python train.py -e 2 -lr 0.1 -o out.txt',
'python train.py -e 2 -lr 0.2 -o in.txt',
'python train.py -e 2 -lr 0.2 -o out.txt',
];