<commit_before>module PoolHelper
  def pool_list(post)
    html = ""
    pools = Pool.find(:all, :joins => "JOIN pools_posts ON pools_posts.pool_id = pools.id", :conditions => "pools_posts.post_id = #{post.id}", :order => "pools.name", :select => "pools.name, pools.id")

    if pools.empty?
      html << "none"
    else
      html << pools.map {|p| link_to(h(p.pretty_name), :controller => "pool", :action => "show", :id => p.id)}.join(", ")
    end

    return html
  end

  def link_to_pool_zip(text, pool, zip_params, options={})
    text = "%s%s (%s)" % [text,
      options[:has_jpeg]? " PNGs":"",
      number_to_human_size(pool.get_zip_size(zip_params)),
    ]
    options = { :action => "zip", :id => pool.id, :filename => pool.get_zip_filename(zip_params) }
    options[:jpeg] = 1 if zip_params[:jpeg]
    link_to text, options, :level => :member
  end

  def generate_zip_list
    unless @pool_zip.blank?
      @pool_zip.map do |data|
        '%s %s %s %s' % [data[:crc32], data[:file_size], data[:path], data[:filename]]
      end.join("\n")
    end
  end
end<commit_msg>\n is required for each line in mod_zip.<commit_after>module PoolHelper
  def pool_list(post)
    html = ""
    pools = Pool.find(:all, :joins => "JOIN pools_posts ON pools_posts.pool_id = pools.id", :conditions => "pools_posts.post_id = #{post.id}", :order => "pools.name", :select => "pools.name, pools.id")

    if pools.empty?
      html << "none"
    else
      html << pools.map {|p| link_to(h(p.pretty_name), :controller => "pool", :action => "show", :id => p.id)}.join(", ")
    end

    return html
  end

  def link_to_pool_zip(text, pool, zip_params, options={})
    text = "%s%s (%s)" % [text,
      options[:has_jpeg]? " PNGs":"",
      number_to_human_size(pool.get_zip_size(zip_params)),
    ]
    options = { :action => "zip", :id => pool.id, :filename => pool.get_zip_filename(zip_params) }
    options[:jpeg] = 1 if zip_params[:jpeg]
    link_to text, options, :level => :member
  end

  def generate_zip_list
    unless @pool_zip.blank?
      @pool_zip.map do |data|
        "%s %s %s %s\n" % [data[:crc32], data[:file_size], data[:path], data[:filename]]
      end.join
    end
  end
end
{'fraction_non_alphanumeric': 0.17891373801916932, 'fraction_numerical': 0.0027384755819260614, 'mean_word_length': 3.3492063492063493, 'pattern_counts': {'":': 2, '<': 11, '<?xml version=': 0, '>': 25, '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': '1175575', 'n_tokens_mistral': 829, 'n_tokens_neox': 796, 'n_words': 182}