<commit_before>from moksha.api.widgets.layout.layout import layout_js, layout_css, ui_core_js, ui_draggable_js, ui_droppable_js, ui_sortable_js

from tw.api import Widget
from tw.jquery import jquery_js
from moksha.lib.helpers import eval_app_config, ConfigWrapper
from tg import config
from tw.api import Widget

from moksha.lib.helpers import eval_app_config, ConfigWrapper

class AppListWidget(Widget):
    template = 'mako:moksha.api.widgets.containers.templates.layout_applist'
    properties = ['category']

    def update_params(self, d):
        super(AppListWidget, self).update_params(d)

        # we want to error out if there is no category
        c = d['category']
        if isinstance(c, basestring):
            for cat in d['layout']:
                if cat['label'] == c:
                    d['category'] = cat
                    break

applist_widget = AppListWidget('applist');<commit_msg>s/properties/params/ in the AppListWidget<commit_after>from tw.api import Widget
from tw.jquery import jquery_js
from moksha.lib.helpers import eval_app_config, ConfigWrapper
from tg import config
from tw.api import Widget

from moksha.lib.helpers import eval_app_config, ConfigWrapper

class AppListWidget(Widget):
    template = 'mako:moksha.api.widgets.containers.templates.layout_applist'
    params = ['category']

    def update_params(self, d):
        super(AppListWidget, self).update_params(d)

        # we want to error out if there is no category
        c = d['category']
        if isinstance(c, basestring):
            for cat in d['layout']:
                if cat['label'] == c:
                    d['category'] = cat
                    break

applist_widget = AppListWidget('applist');
{'fraction_non_alphanumeric': 0.09069767441860466, 'fraction_numerical': 0.0, 'mean_word_length': 3.0878859857482186, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4886806', 'n_tokens_mistral': 521, 'n_tokens_neox': 507, 'n_words': 139}