Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async.timesSeries(times, (n, callback) => {
async.eachSeries(data, (d, callback) => {
async.series([
(callback) => activate(d.inputs, callback),
(callback) => propagate(d.outputs, callback),
(callback) => {
console.log("Trained");
callback()
},
(callback) => {
console.log(h[0].connections.incoming[0].weight + " " + h[0].connections.incoming[1].weight + " "
+ h[1].connections.incoming[0].weight + " " + h[1].connections.incoming[1].weight)
// console.log(_.last(o[0].outputs).s + " " + _.last(o[0].outputs).e + " " + _.last(o[0].outputs).d)
// console.log(_.last(o[1].outputs).s + " " + _.last(o[1].outputs).e + " " + _.last(o[1].outputs).d)
console.log()
callback()
},
], callback)
const commandApi = (req, res, next) => /* istanbul ignore next */{
const { cmds } = req.body
if (cmds && cmds.length !== 0) {
let responseCommands = []
async.eachSeries(cmds, (command, callback) => {
const commandHandler = require(`./appCommands/${command.c}`)
if (!commandHandler) {
return callback(new Error(t('COMMAND_NOT_FOUND', { command: command.c })))
}
commandHandler(command.p, (error, commands) => {
if (error) {
return callback(error)
}
responseCommands = responseCommands.concat(commands)
callback()
})
return null
return new Promise(resolve => {
const newRankings = { all: {}, year: {}, month: {}, week: {}, day: {} };
const history = [];
let updatedCurrent = cloneDeep(current);
// get battle results for selected battles
eachSeries(getBattleList, battleResults, () => {
// loop battles
forEach(Results, result => {
// skip 1htt, multi and ints
if (skippedBattles(result.battle)) {
return;
}
if (result.result.length > 0) {
// loop results
forEach(result.result, (r, place) => {
// skip designer
if (r.KuskiIndex === result.battle.KuskiIndex) {
return;
}
// add ranking for all time
newRankings.all[r.KuskiIndex] = addRanking(
updatedCurrent.all,
return new Promise(resolve => {
eachSeries(newRankings.all, updateOrCreateKinglist, () => {
eachSeries(newRankings.year, updateOrCreateKinglistYearly, () => {
eachSeries(newRankings.month, updateOrCreateKinglistMonthly, () => {
eachSeries(newRankings.week, updateOrCreateKinglistWeekly, () => {
eachSeries(newRankings.day, updateOrCreateKinglistDaily, () => {
resolve();
});
});
});
});
});
});
}
eachSeries(newRankings.week, updateOrCreateKinglistWeekly, () => {
eachSeries(newRankings.day, updateOrCreateKinglistDaily, () => {
resolve();
});
});
});
eachSeries(newRankings.year, updateOrCreateKinglistYearly, () => {
eachSeries(newRankings.month, updateOrCreateKinglistMonthly, () => {
eachSeries(newRankings.week, updateOrCreateKinglistWeekly, () => {
eachSeries(newRankings.day, updateOrCreateKinglistDaily, () => {
resolve();
});
});
});
});
});
eachSeries(newRankings.month, updateOrCreateKinglistMonthly, () => {
eachSeries(newRankings.week, updateOrCreateKinglistWeekly, () => {
eachSeries(newRankings.day, updateOrCreateKinglistDaily, () => {
resolve();
});
});
});
});
eachSeries(newRankings.all, updateOrCreateKinglist, () => {
eachSeries(newRankings.year, updateOrCreateKinglistYearly, () => {
eachSeries(newRankings.month, updateOrCreateKinglistMonthly, () => {
eachSeries(newRankings.week, updateOrCreateKinglistWeekly, () => {
eachSeries(newRankings.day, updateOrCreateKinglistDaily, () => {
resolve();
});
});
});
});
});
});
'neo-async_v0': function(callback) {
neo_async_v0.eachSeries(array, iterator, callback);
},
'neo-async_v1': function(callback) {