<commit_before><div>
  <h5>Options</h5>
  <ul>
    <li><%= link_to_function "Edit", "$('comments').hide(); $('edit').show().scrollTo(); $('post_tags').focus(); Cookie.put('show_defaults_to_edit', 1);" %></li>
    <!-- <% if !@post.is_deleted? && @post.image? && @post.width && @post.width > 700 %>
      <li><%= link_to_function "Resize image", "Post.resize_image()" %></li>
    <% end %> -->
    <% if @post.image? && @post.can_be_seen_by?(@current_user) %>
      <%
	if @post.has_jpeg?
	  url = @post.jpeg_url
	  size = @post.jpeg_size
	  ext = "JPG"
	else
	  url = @post.file_url
	  size = @post.file_size
	  ext = @post.file_ext.upcase
	end
      %>
      <li><%= link_to("#{@post.has_sample? ? "View larger version":"Image"}", url,
		      :class => @post.has_sample? ? "original-file-changed":"original-file-unchanged",
		      :id => "highres-show", :onclick => "Post.highres(); return false") %>
      </li>
      <li><%= link_to("#{@post.has_sample? ? "Download larger version":"Image"} (#{number_to_human_size(size)} #{ext})", url,
		      :class => @post.has_sample? ? "original-file-changed":"original-file-unchanged",
		      :id => "highres") %>
      </li>
      <% if @post.has_jpeg? then %>
	<%# If we have a JPEG, the above link was the JPEG.  Link to the PNG here. %>
	<li><%= link_to("Download PNG (#{number_to_human_size(@post.file_size)})", @post.file_url,
			:class => "original-file-unchanged",
			:id => "png") %>
	</li>
      <% end %>
    <% end %>
    <% if @post.can_user_delete?(@current_user) then %>
    <li><%= link_to "Delete", :action => "delete", :id => @post.id %></li>
    <% end %>
    <% if @post.is_deleted? && @current_user.is_janitor_or_higher?%>
      <li><%= link_to "Undelete", :action => "undelete", :id => @post.id %></li>
    <% end %>
    <% unless @post.is_flagged? || @post.is_deleted? %>
      <li><%= link_to_function "Flag for deletion", "Post.flag(#{@post.id})", :level => :member %></li>
    <% end %>
    <% if !@post.is_deleted? && @post.image? && !@post.is_note_locked? %>
      <li><%= link_to_function "Add translation", "Note.create(#{@post.id})", :level => :member %></li>
    <% end %>
    <li id="add-to-favs"><%= link_to_function "Add to favorites", "Post.vote(#{@post.id}, 3)" %></li>
    <li id="remove-from-favs"><%= link_to_function "Remove from favorites", "Post.vote(#{@post.id}, 2)" %></li>
    <% if @post.is_pending? && @current_user.is_janitor_or_higher? %>
      <li><%= link_to_function "Approve", "if (confirm('Do you really want to approve this post?')) {Post.approve(#{@post.id})}" %></li>
    <% end %>
    <% unless @post.is_deleted? %>
      <li id="add-to-pool"><%= link_to_remote "Add to pool", :update => "add-to-pool", :url => {:controller => "pool", :action => "select", :post_id => @post.id}, :method => "get" %></li>
    <% end %>
    <li id="set-avatar"><%= link_to "Set avatar", :controller => "user", :action => "set_avatar", :id => @post.id %></li>
  </ul>
</div>
<commit_msg>hide 'view larger' link if we have no sample anyway<commit_after><div>
  <h5>Options</h5>
  <ul>
    <li><%= link_to_function "Edit", "$('comments').hide(); $('edit').show().scrollTo(); $('post_tags').focus(); Cookie.put('show_defaults_to_edit', 1);" %></li>
    <!-- <% if !@post.is_deleted? && @post.image? && @post.width && @post.width > 700 %>
      <li><%= link_to_function "Resize image", "Post.resize_image()" %></li>
    <% end %> -->
    <% if @post.image? && @post.can_be_seen_by?(@current_user) %>
      <%
	if @post.has_jpeg?
	  url = @post.jpeg_url
	  size = @post.jpeg_size
	  ext = "JPG"
	else
	  url = @post.file_url
	  size = @post.file_size
	  ext = @post.file_ext.upcase
	end
      %>
      <% if @post.has_sample? %>
      <li><%= link_to("View larger version", url,
		      :class => @post.has_sample? ? "original-file-changed":"original-file-unchanged",
		      :id => "highres-show", :onclick => "Post.highres(); return false") %>
      </li>
      <% end %>
      <li><%= link_to("#{@post.has_sample? ? "Download larger version":"Image"} (#{number_to_human_size(size)} #{ext})", url,
		      :class => @post.has_sample? ? "original-file-changed":"original-file-unchanged",
		      :id => "highres") %>
      </li>
      <% if @post.has_jpeg? then %>
	<%# If we have a JPEG, the above link was the JPEG.  Link to the PNG here. %>
	<li><%= link_to("Download PNG (#{number_to_human_size(@post.file_size)})", @post.file_url,
			:class => "original-file-unchanged",
			:id => "png") %>
	</li>
      <% end %>
    <% end %>
    <% if @post.can_user_delete?(@current_user) then %>
    <li><%= link_to "Delete", :action => "delete", :id => @post.id %></li>
    <% end %>
    <% if @post.is_deleted? && @current_user.is_janitor_or_higher?%>
      <li><%= link_to "Undelete", :action => "undelete", :id => @post.id %></li>
    <% end %>
    <% unless @post.is_flagged? || @post.is_deleted? %>
      <li><%= link_to_function "Flag for deletion", "Post.flag(#{@post.id})", :level => :member %></li>
    <% end %>
    <% if !@post.is_deleted? && @post.image? && !@post.is_note_locked? %>
      <li><%= link_to_function "Add translation", "Note.create(#{@post.id})", :level => :member %></li>
    <% end %>
    <li id="add-to-favs"><%= link_to_function "Add to favorites", "Post.vote(#{@post.id}, 3)" %></li>
    <li id="remove-from-favs"><%= link_to_function "Remove from favorites", "Post.vote(#{@post.id}, 2)" %></li>
    <% if @post.is_pending? && @current_user.is_janitor_or_higher? %>
      <li><%= link_to_function "Approve", "if (confirm('Do you really want to approve this post?')) {Post.approve(#{@post.id})}" %></li>
    <% end %>
    <% unless @post.is_deleted? %>
      <li id="add-to-pool"><%= link_to_remote "Add to pool", :update => "add-to-pool", :url => {:controller => "pool", :action => "select", :post_id => @post.id}, :method => "get" %></li>
    <% end %>
    <li id="set-avatar"><%= link_to "Set avatar", :controller => "user", :action => "set_avatar", :id => @post.id %></li>
  </ul>
</div>

{'fraction_non_alphanumeric': 0.24158052684228076, 'fraction_numerical': 0.00266755585195065, 'mean_word_length': 3.561977186311787, 'pattern_counts': {'":': 7, '<': 143, '<?xml version=': 0, '>': 189, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6266437', 'n_tokens_mistral': 2410, 'n_tokens_neox': 2215, 'n_words': 463}