<commit_before>
helpers do
  def plugin_sample_code(plugin)
    post_data = {};
    plugin.fields.each do |name,field|
      post_data[name] = field[:default]
    end

    ["<script src=\"#{fishbowl_js}\">",
     "<script type=\"text/javascript\">",
     "  fishbowl.plugin(\"#{plugin.name}\", #{post_data.to_json});",
     "</script>"].join("\n")
  end
end

def plugins
  @@plugins ||=
    (
     plugins = {}
     Plugin.list.each do |name, path|
       plugins[name] = Plugin.new name
     end
     plugins
     )
end

plugins
<commit_msg>fix sample code on plugin page  #4<commit_after>
helpers do
  def plugin_sample_code(plugin)
    post_data = {};
    plugin.fields.each do |name,field|
      post_data[name] = field[:default]
    end

    ["<script src=\"#{fishbowl_js}\"  type=\"text/javascript\">",
     "<script type=\"text/javascript\">",
     "  fishbowl.plugin(\"#{plugin.name}\", #{post_data.to_json});",
     "</script>"].join("\n")
  end
end

def plugins
  @@plugins ||=
    (
     plugins = {}
     Plugin.list.each do |name, path|
       plugins[name] = Plugin.new name
     end
     plugins
     )
end

plugins

{'fraction_non_alphanumeric': 0.17595048629531387, 'fraction_numerical': 0.0008841732979664014, 'mean_word_length': 2.6872964169381106, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '1310671', 'n_tokens_mistral': 392, 'n_tokens_neox': 394, 'n_words': 79}