def getResults(path): res = {} for (dirpath,dirnames,filenames) in os.walk(path): for n in filenames: if "statsavg" in n: name = '.'.join(dirpath.split('/')[-3:]) res[name] = fi.getStats(dirpath+'/'+n) return res
def getResults(path): res = {} for (dirpath, dirnames, filenames) in os.walk(path): for n in filenames: if "statsavg" in n: name = '.'.join(dirpath.split('/')[-3:]) res[name] = fi.getStats(dirpath + '/' + n) return res
def crawlPreds(path): res = {} stats = {} for (dirpath,dirnames,filenames) in os.walk(path): if dirpath.endswith("predicted"): tmp = {} for n in filenames: if any(n.endswith(y) for y in conf.onsetsufix): name = '.'.join(dirpath.split('/')[-3:]) tmp[os.path.splitext(n)[0]] = fi.getonsets(dirpath+'/'+n) if tmp: stats[name] = fi.getStats('/'.join(dirpath.split('/')[:-1]+["stats/statsavg.txt"])) res[name]=tmp return res,stats
def crawlPreds(path): res = {} stats = {} for (dirpath, dirnames, filenames) in os.walk(path): if dirpath.endswith("predicted"): tmp = {} for n in filenames: if any(n.endswith(y) for y in conf.onsetsufix): name = '.'.join(dirpath.split('/')[-3:]) tmp[os.path.splitext(n)[0]] = fi.getonsets(dirpath + '/' + n) if tmp: stats[name] = fi.getStats( '/'.join(dirpath.split('/')[:-1] + ["stats/statsavg.txt"])) res[name] = tmp return res, stats