dbcbac206dd35af5592963dce4655de94dc7e7e4,bnpy/learnalg/ElapsedTimeLogger.py,,writeToLogOnLapCompleted,#Any#Any#,37

Before Change


        for subeventName in sorted(CumulativeTimesDict[eventName]):
            curlapstr += " cur_%s %.2f" % (
                subeventName, CurrentLapTimesDict[eventName][subeventName])
            totalstr += " ttl_%s %.2f" % (
                subeventName, CumulativeTimesDict[eventName][subeventName])
            agg_curlap += CurrentLapTimesDict[eventName][subeventName]
            agg_total += CumulativeTimesDict[eventName][subeventName]
            CurrentLapTimesDict[eventName][subeventName] = 0.0
        agg_curlapstr = " cur %.2f" % (agg_curlap)

After Change


        agg_curlap = 0.0
        agg_total = 0.0

        df_dict = OrderedDict()
        df_dict["lap"] = lapFrac
        for subeventName in sorted(CumulativeTimesDict[eventName]):
            df_dict["curlap_%s" % subeventName] = (
                CurrentLapTimesDict[eventName][subeventName])
            df_dict["alllaps_%s" % subeventName] = (
                CumulativeTimesDict[eventName][subeventName])

            agg_curlap += CurrentLapTimesDict[eventName][subeventName]
            agg_total += CumulativeTimesDict[eventName][subeventName]
            // Reset counter
            CurrentLapTimesDict[eventName][subeventName] = 0.0

        df_dict["curlap_total"] = agg_curlap
        df_dict["alllaps_total"] = agg_total
        df = pd.DataFrame([df_dict])
        opts = dict(index=False, float_format="%.3f")
        if np.allclose(lapFrac, 1.0):
            msg = df.to_csv(header=True, **opts)
        else:
            msg = df.to_csv(header=False, **opts)
        LogDict[eventName].log(level, msg)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: bnpy/bnpy
Commit Name: dbcbac206dd35af5592963dce4655de94dc7e7e4
Time: 2019-06-06
Author: mike@michaelchughes.com
File Name: bnpy/learnalg/ElapsedTimeLogger.py
Class Name:
Method Name: writeToLogOnLapCompleted


Project Name: okfn-brasil/serenata-de-amor
Commit Name: e1d39a4c9158c9a9db1218cb5be9946152e2ca1b
Time: 2017-04-14
Author: marcus.rehm@gmail.com
File Name: src/fetch_cnpj_info.py
Class Name:
Method Name:


Project Name: ina-foss/inaSpeechSegmenter
Commit Name: 4d8a1c5fd39f3189424479f6f463f0c5d4f567b7
Time: 2019-10-14
Author: ddoukhan@ina.fr
File Name: inaSpeechSegmenter/segmenter.py
Class Name:
Method Name: seg2csv