<commit_before>#
# Custom Knockout.js binding handlers
#
# init:
#   This will be called when the binding is first applied to an element
#   Set up any initial state, event handlers, etc. here
#
# update:
#   This will be called once when the binding is first applied to an element,
#    and again whenever the associated observable changes value.
#   Update the DOM element based on the supplied values here.


ko.bindingHandlers.json =
  init: (element, valueAccessor, allBindings, viewModel, bindingContext) ->
    data = ko.unwrap valueAccessor()

    $(element).text JSON.stringify data, null, 2

ko.bindingHandlers.geyser =
  update: (element, valueAccessor, allBindings, viewModel, bindingContext) ->
    $(element).html geyser.render ko.unwrap valueAccessor()




<commit_msg>Bugfix geyser KO binding handler for empty nodes. PP-10<commit_after>#
# Custom Knockout.js binding handlers
#
# init:
#   This will be called when the binding is first applied to an element
#   Set up any initial state, event handlers, etc. here
#
# update:
#   This will be called once when the binding is first applied to an element,
#    and again whenever the associated observable changes value.
#   Update the DOM element based on the supplied values here.


ko.bindingHandlers.json =
  init: (element, valueAccessor, allBindings, viewModel, bindingContext) ->
    data = ko.unwrap valueAccessor()

    $(element).text JSON.stringify data, null, 2

ko.bindingHandlers.geyser =
  update: (element, valueAccessor, allBindings, viewModel, bindingContext) ->
    if data = ko.unwrap valueAccessor()
      $(element).html geyser.render data





{'fraction_non_alphanumeric': 0.08277130594727161, 'fraction_numerical': 0.002452483139178418, 'mean_word_length': 3.9908256880733943, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6418834', 'n_tokens_mistral': 468, 'n_tokens_neox': 447, 'n_words': 185}