<commit_before>json.channels topic.top_channels(3) do |json, channel|
  json.created_by do |j|
    j.partial! 'users/user_partial', user: channel.created_by.user
  end

  json.created_by_authority sprintf('%.1f',Authority.from(topic, for: channel.created_by.graph_user).to_f+1.0)
  json.link channel_path(channel.created_by.user, channel)
  json.title channel.title
end<commit_msg>Only output json for the channel created_by user if it really exists.<commit_after>json.channels topic.top_channels(3) do |json, channel|
  json.created_by do |j|
    j.partial! 'users/user_partial', user: channel.created_by.user unless channel.created_by.nil?
  end

  json.created_by_authority sprintf('%.1f',Authority.from(topic, for: channel.created_by.graph_user).to_f+1.0)
  json.link channel_path(channel.created_by.user, channel)
  json.title channel.title
end
{'fraction_non_alphanumeric': 0.11778563015312132, 'fraction_numerical': 0.009422850412249705, 'mean_word_length': 5.589147286821706, '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': '4136140', 'n_tokens_mistral': 291, 'n_tokens_neox': 290, 'n_words': 58}