<commit_before>class MembersController < ApplicationController

  before_action :current_member, only: [:show, :activities, :cards]

  def show
    @organization = trello_client.find(:organization, params[:organization_id])

    if request.xhr?
      render js: js_html("#tab_content", partial: "tab")
    else
      @tab_members = @organization.members.sort_by(&:full_name)
      @followers = system_user.followers
    end
  end

  def activities
    @members = {}

    @actions = @current_member.actions since: Date.yesterday.to_json, limit: 1000

    threads = []
    for action in @actions
      # if idMember exists there is member hash
      # if idMemberAdded exists there isn't member hash so we must get it
      member_id = action.data["idMemberAdded"]
      next if member_id.nil?

      unless @members.has_key?(member_id)<commit_msg>user page: avatars on tabs<commit_after>class MembersController < ApplicationController

  before_action :current_member, only: [:show, :activities, :cards]

  def show
    @organization = trello_client.find(:organization, params[:organization_id])

    if request.xhr?
      render js: js_html("#tab_content", partial: "tab")
    else
      @tab_members = @organization.members({ fields: ["fullName", "username", "avatarHash"] }).sort_by(&:full_name)
      @followers = system_user.followers
    end
  end

  def activities
    @members = {}

    @actions = @current_member.actions since: Date.yesterday.to_json, limit: 1000

    threads = []
    for action in @actions
      # if idMember exists there is member hash
      # if idMemberAdded exists there isn't member hash so we must get it
      member_id = action.data["idMemberAdded"]
      next if member_id.nil?

      unless @members.has_key?(member_id)
{'fraction_non_alphanumeric': 0.10130904951622083, 'fraction_numerical': 0.004553215708594195, 'mean_word_length': 3.626315789473684, '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': '5308590', 'n_tokens_mistral': 546, 'n_tokens_neox': 511, 'n_words': 144}