<commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2015-2017, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
"""
API Builder
#########################
This module provides the
"""
import six
from traitlets import Unicode
from ipywidgets import register
from exa.widgets.base import DOMWidget


@register("jupyter-exa.APIBuilder")
class APIBuilder(DOMWidget):
    """
    """
    _view_name = Unicode("APIBuilderView").tag(sync=True)
    _model_name = Unicode("APIBuilderModel").tag(sync=True)

    def build_api(self, *args, **kwargs):
        """
        """
        print("build api")
        print(*args, **kwargs)

    def __init__(self, *args, **kwargs):
        super(APIBuilder).__init__(*args, **kwargs)
        self.on_msg(self.build_api)
<commit_msg>py2 debug compat<commit_after># -*- coding: utf-8 -*-
# Copyright (c) 2015-2017, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
"""
API Builder
#########################
This module provides the
"""
import six
from traitlets import Unicode
from ipywidgets import register
from exa.widgets.base import DOMWidget


@register("jupyter-exa.APIBuilder")
class APIBuilder(DOMWidget):
    """
    """
    _view_name = Unicode("APIBuilderView").tag(sync=True)
    _model_name = Unicode("APIBuilderModel").tag(sync=True)

    def build_api(self, *args, **kwargs):
        """
        """
        print("build api")
        print(args)
        print(kwargs)

    def __init__(self, *args, **kwargs):
        super(APIBuilder).__init__(*args, **kwargs)
        self.on_msg(self.build_api)

{'fraction_non_alphanumeric': 0.16029593094944514, 'fraction_numerical': 0.014180024660912454, 'mean_word_length': 3.7317784256559765, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5416627', 'n_tokens_mistral': 517, 'n_tokens_neox': 500, 'n_words': 124}