<commit_before>module MeasuresHelper
  # Helper for iterating through the sub ids for a measure. For measures that do not have any sub ids
  # this method will loop once passing in nil as a sub id
  def subs_iterator(measure_subs)
    subs = nil
    if measure_subs.empty?
      subs = [nil]
    else
      subs = measure_subs
    end
    subs.each do |sub_id|
      yield sub_id
    end
  end
  
  def display_row(measure_id, selected_measures)
    is_selected?(measure_id, selected_measures) ? "" : "display:none"
  end<commit_msg>updated measures_helper.rb from bstrezze<commit_after>module MeasuresHelper
  # Helper for iterating through the sub ids for a measure. For measures that do not have any sub ids
  # this method will loop once passing in nil as a sub id
  def subs_iterator(measure_subs)
    subs = nil
    if measure_subs.empty?
      subs = [nil]
    else
      subs = measure_subs
    end
    subs.each do |sub_id|
      yield sub_id
    end
  end
  
	# added from bstrezze
  # Checks a measure id to see if it is in the Array returned
  # be getting the selected_measure collection
  def measure_selected(measure_id, selected_measures)
    is_selected?(measure_id, selected_measures) ? 'checked' : nil
  end
  
  def display_row(measure_id, selected_measures)
    is_selected?(measure_id, selected_measures) ? "" : "display:none"
  end
{'fraction_non_alphanumeric': 0.058345642540620385, 'fraction_numerical': 0.0, 'mean_word_length': 3.3015873015873014, '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': '5806224', 'n_tokens_mistral': 423, 'n_tokens_neox': 427, 'n_words': 149}