lstm.train(trainingData, { iterations: 1500, log: (details) => console.log(details), errorThresh: 0.011, })
/** Delete Job */ function sampleDeleteJob(projectId, tenantId, jobId) { const client = new talent.JobServiceClient(); // const projectId = 'Your Google Cloud Project ID'; // const tenantId = 'Your Tenant ID (using tenancy is optional)'; // const jobId = 'Company ID'; const formattedName = client.jobPath(projectId, tenantId, jobId); client.deleteJob({name: formattedName}).catch(err => { console.error(err); }); console.log(`Deleted job.`); }
this.props.session.gatewayClient .forgotPassword(this.state.email) .then(() => this.setState({ success: true, forgotInProgress: false })) .catch(e => { console.log(e); this.setState({ success: true, forgotInProgress: false }); });
async get(url, query) { const key = `get ${url}`; if (!responses[key]) { console.log(`${key} not found in demo.json`); throw new Error(`${key} not found in demo.json`); } return Promise.resolve(responses[key]); }
(options.isTunnel ? request : requestProxy)(options, function(err, res, body) { try { callback && callback(res, /\?resBody=/.test(options.url) ? body : (/doNotParseJson/.test(options.url) ? body : JSON.parse(body)), err); } catch(e) { /*eslint no-console: "off"*/ console.log(options); throw e; } exit(); });
db.find({_id: _id}).exec(function(err, docs){ var res = docs[0]; exec(res.command, function(error, stdout, stderr){ console.log(stdout); }); });
const log = data => { if (process.env.DEBUG) { console.log(data); } }
const formatSource = async () => { console.log(chalk.reset('Formatting source files...')); try { const sourceFilePaths = await getSourceFilePaths(); const formattedPaths = await Promise.all(sourceFilePaths.map(filePath => formatFile(filePath, filePath))); console.log(chalk.green(`Formatted ${formattedPaths.length} files.`)); } catch (error) { console.log(chalk.red('Problem formatting file:\n'), chalk.reset(error)); process.exit(1); } }
ncp( "../../lib/common/porcupine_params.pv", "./lib/common/porcupine_params.pv", function (err) { if (err) { return console.error(err); } console.log("../../lib/common copied."); } );
net.train( [ { input: a, output: { a: 1 } }, { input: b, output: { b: 1 } }, { input: c, output: { c: 1 } }, ], { log: (detail) => console.log(detail), } );
this.props.session.gatewayClient .forgotPassword(this.state.email) .then(() => this.setState({ success: true, forgotInProgress: false })) .catch(e => { console.log(e); this.setState({ success: true, forgotInProgress: false }); });
async post(url, query) { const key = `post ${url}`; if (!responses[key]) { console.log(`${key} not found in demo.json`); throw new Error(`${key} not found in demo.json`); } return Promise.resolve(responses[key]); }
async patch(url, query) { const key = `patch ${url}`; if (!responses[key]) { console.log(`${key} not found in demo.json`); throw new Error(`${key} not found in demo.json`); } return Promise.resolve(responses[key]); }
ncp( `../../lib/${platform}`, `./lib/${platform}`, { filter: copyLibraryFilter }, function (err) { if (err) { return console.error(err); } console.log(`../../lib/${platform}.`); } );