<commit_before>class UserSerializer < ApplicationSerializer
  include MarkdownHelper

  attributes :avatar_url, :bio, :hearts_received, :last_hearted_at, :last_online, :staff, :url, :full_url,
    :email,
    :username, :dismiss_showcase_banner_url, :showcase_banner_dismissed_at,
    :coin_callout_viewed_at

  def dismiss_showcase_banner_url
    dismiss_showcase_banner_path(object)
  end

  def avatar_url
    object.avatar.url(288).to_s
  end

  def include_email?
    scope.try(:staff?)
  end

  def full_url
    user_url(object)
  end

  def last_online
    object.last_request_at.iso8601 if object.last_request_at?
  end

  def staff
    object.staff?
  end

  def url
    user_path(object)
  end
end<commit_msg>Allow staff to see encrypted_password (for migrations only)<commit_after>class UserSerializer < ApplicationSerializer
  include MarkdownHelper

  attributes :avatar_url, :bio, :hearts_received, :last_hearted_at, :last_online, :staff, :url, :full_url,
    :email,
    :username, :dismiss_showcase_banner_url, :showcase_banner_dismissed_at,
    :coin_callout_viewed_at,
    :staff_encrypted_password

  def dismiss_showcase_banner_url
    dismiss_showcase_banner_path(object)
  end

  def avatar_url
    object.avatar.url(288).to_s
  end

  def staff_encrypted_password
    scope.try(:staff?) ? object.encrypted_password : nil
  end

  def include_email?
    scope.try(:staff?)
  end

  def full_url
    user_url(object)
  end

  def last_online
    object.last_request_at.iso8601 if object.last_request_at?
  end

  def staff
    object.staff?
  end

  def url
    user_path(object)
  end
end
{'fraction_non_alphanumeric': 0.07204968944099378, 'fraction_numerical': 0.008695652173913044, 'mean_word_length': 4.23051948051948, 'pattern_counts': {'":': 0, '<': 5, '<?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': '345220', 'n_tokens_mistral': 595, 'n_tokens_neox': 558, 'n_words': 113}