93a71bd6c3f3c731473bc0ddd9b894a252738d01,src/backends/cgpm_backend.py,CGPM_Backend,json_ready_models,#CGPM_Backend#Any#Any#,926

Before Change


        // Sort (name, code, value) list by variable name
        sorted_cats = sorted(cursor, key=operator.itemgetter(0))
        // Group triples by variable name -> list? of (name, group)
        groups = itertools.groupby(sorted_cats, key=operator.itemgetter(0))

        return {"column-statistical-types": stattypes,
                "categories": {name: {triple[1]:triple[2] for triple in group} for name, group in groups},
                "models": []}

    def _unique_rowid(self, rowids):

After Change


        import operator, itertools
        groups = \
            {colno: group for (colno, group) in 
                itertools.groupby(raw_categories, key=operator.itemgetter(0))}
        assert len(groups) > 0
        assert cat_variables[groups.keys()[0]]
        categories = {cat_variables[colno]:
                          {code: value for(_, code, value) in group}
                      for (colno, group) in groups.items()}
        assert len(categories) > 0

        
        cursor = bdb.sql_execute("""
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: probcomp/bayeslite
Commit Name: 93a71bd6c3f3c731473bc0ddd9b894a252738d01
Time: 2019-12-06
Author: jar23@mumble.net
File Name: src/backends/cgpm_backend.py
Class Name: CGPM_Backend
Method Name: json_ready_models


Project Name: kwgoodman/numerox
Commit Name: f4f853044babbcaea98da946b106fcf84e8ef79b
Time: 2018-04-27
Author: kwgoodman@gmail.com
File Name: numerox/report.py
Class Name:
Method Name: big_staker


Project Name: scipy/scipy
Commit Name: 1fa19a5365d049417da3c830fe7a1c63f2eb44af
Time: 2018-12-14
Author: rth.yurchak@pm.me
File Name: scipy/spatial/_spherical_voronoi.py
Class Name: SphericalVoronoi
Method Name: _calc_vertices_regions