b425d17022e8491f590cf5065bbb1b36822232cc,search/templatetags/search.py,,display_facet,#,30

Before Change


                // We also modify the dispay name to remove the id
                element["display_name"] = element["name"][element["name"].find("_")+1:]
                element["params"] = "%s %s:"%s"" % (filter_query, flt, urlquote_plus(element["name"]))
                filtered_facet.append(element)
        else:
            element["display_name"] = element["name"]
            element["params"] = "%s %s:"%s"" % (filter_query, flt, urlquote_plus(element["name"]))
            filtered_facet.append(element)

After Change


        )
        filtered_facet.append(element)

    if using_beastwhoosh(context["request"]):
        // In BW ui, we sort the facets of type "cloud" by their frequency of occurrence and apply an opacity filter
        filtered_facet = sorted(filtered_facet, key=lambda x: x["count"], reverse=True)
        max_count = max([element["count"] for element in filtered_facet])
        for element in filtered_facet:
            element["weight"] = (1.0 * element["count"]) / max_count

    context.update({
        "facet": filtered_facet,
        "type": type,
        "filter": flt,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: MTG/freesound
Commit Name: b425d17022e8491f590cf5065bbb1b36822232cc
Time: 2020-11-27
Author: frederic.font@gmail.com
File Name: search/templatetags/search.py
Class Name:
Method Name: display_facet


Project Name: xinntao/BasicSR
Commit Name: 6917d8a3dbf6617f02b1247fd50fbc20d3cb6fd4
Time: 2018-06-10
Author: wxt1994@126.com
File Name: codes/data/util.py
Class Name:
Method Name: get_image_paths


Project Name: kymatio/kymatio
Commit Name: 5c6c50274c11ecbf9be54052394922fabde80923
Time: 2020-02-18
Author: edouard.oyallon@lip6.fr
File Name: kymatio/scattering2d/core/scattering2d.py
Class Name:
Method Name: scattering2d