ed82e27fef3c21f0d86e0e8efdc923f527da37ae,jarbas/core/management/commands/irregularities.py,Command,serialize,#Command#Any#,46

Before Change


        probability = None
        if "probability" in row:
            probability = float(row["probability"])
            del row["probability"]

        suspicions = {k: self.bool(v) for k, v in row.items() if self.bool(v)}
        if not suspicions:
            suspicions = None

After Change


        if "probability" in row:
            probability = float(row["probability"])

        reserved_keys = (
            "applicant_id",
            "document_id",
            "probability",
            "year"
        )
        hypothesis = tuple(k for k in row.keys() if k not in reserved_keys)
        pairs = ((k, v) for k, v in row.items() if k in hypothesis)
        filtered = filter(lambda x: self.bool(x[1]), pairs)
        suspicions = dict((k, True) for k, v in filtered) or None
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: okfn-brasil/serenata-de-amor
Commit Name: ed82e27fef3c21f0d86e0e8efdc923f527da37ae
Time: 2017-05-11
Author: cuducos@users.noreply.github.com
File Name: jarbas/core/management/commands/irregularities.py
Class Name: Command
Method Name: serialize


Project Name: theislab/scanpy
Commit Name: 7bc8e6dce4229d4924ad01792f3c913cfb250d9e
Time: 2017-04-24
Author: f.alex.wolf@gmx.de
File Name: scanpy/tools/dpt.py
Class Name:
Method Name: dpt


Project Name: theislab/scanpy
Commit Name: 7bc8e6dce4229d4924ad01792f3c913cfb250d9e
Time: 2017-04-24
Author: f.alex.wolf@gmx.de
File Name: scanpy/tools/diffmap.py
Class Name:
Method Name: diffmap