63ef8bfa3b63090437bd27bf1e04db7ae1eae3cf,nilmtk/stats/totalenergy.py,,get_total_energy,#Any#Any#,39

Before Change


    

    energy = {}
    data_source_rank = {} // overwrite Power with Energy with Energy(cumulative)
    for (physical_quantity, ac_type), series in df.iteritems():
        if physical_quantity == "power":
            // Preference is to calculate energy from 

After Change


                               for (physical_quantity, col_ac_type) in df.keys()
                               if col_ac_type == ac_type]
        for pq in PHYSICAL_QUANTITY_PREFS:
            if pq in physical_quantities:
                selected_columns.append((pq, ac_type))
                break

    energy = {}
    for col in selected_columns:
        print("Calculating energy for column", col)
        (physical_quantity, ac_type) = col
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: nilmtk/nilmtk
Commit Name: 63ef8bfa3b63090437bd27bf1e04db7ae1eae3cf
Time: 2014-11-27
Author: jack-list@xlk.org.uk
File Name: nilmtk/stats/totalenergy.py
Class Name:
Method Name: get_total_energy


Project Name: PaddlePaddle/edl
Commit Name: ed9fb224f3aa4336d066cbbe4b9abf26b24f8535
Time: 2020-09-02
Author: weibao.gong@gmail.com
File Name: python/edl/utils/watcher.py
Class Name: Watcher
Method Name: _watcher


Project Name: haotianteng/Chiron
Commit Name: cb40dd779e1f3a7ca23ea25edd03ddaca9472838
Time: 2018-04-29
Author: neven.miculinic@gmail.com
File Name: chiron/chiron_eval.py
Class Name:
Method Name: evaluation


Project Name: vatlab/SoS
Commit Name: b6d57e6705748b6589e0d0a38cfe190d131571bc
Time: 2019-02-24
Author: ben.bog@gmail.com
File Name: src/sos/workflow_executor.py
Class Name: Base_Executor
Method Name: run_as_nested