@permission_required("core.manage_shop")
def sort_property_groups(request):
    property_group_list = request.POST.get("serialized", "").split('&')
    assert (isinstance(property_group_list, list))
    if len(property_group_list) > 0:
        pos = 10
        for cat_str in property_group_list:
            elem, pg_id = cat_str.split('=')
            pg = PropertyGroup.objects.get(pk=pg_id)
            pg.position = pos
            pg.save()
            pos += 10

    result = json.dumps({
        "message": _(u"The Property groups have been sorted."),
    }, cls=LazyEncoder)

    return HttpResponse(result, content_type='application/json')
The output signals should be in the range [0, 1]
dataset/ETHPy150Open diefenbach/django-lfs/lfs/manage/property_groups/views.py/sort_property_groups--crossover with--dataset/ETHPy150Open jorgenkg/python-neural-network/src/cost_functions.py/cross_entropy_cost