Commit 79ea68b9 authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent 4b87f50c
......@@ -19,15 +19,15 @@ async function run()
let lastFile = await fs.readFileSync(path+files[i], 'utf8')
lastFile=lastFile.split('\n')
let data=grabData(lastFile,true)
let data=grabData(lastFile)
let vars=ai.run(data)
//console.log(data)
datas.push({name:files[i],vars:vars})
}
// console.log(datas)
console.log(datas)
// watcher()
}
......@@ -35,14 +35,13 @@ async function run()
function grabData(data,init)
function grabData(data)
{
// console.log(data)
let arr=[]
for (let i=0;i<data.length;i++)
{
if (i ===0 && init)
continue
try {
let d=data[i].split(',')
......@@ -59,10 +58,8 @@ function grabData(data,init)
}
}
console.log(typeof arr[arr.length-1].profit , arr[arr.length-1].profit)
return arr
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment