<commit_before>class window.ProfileController extends Backbone.Marionette.Controller

  # ACTIONS
  showProfile: (username) ->
    @showPage username, @profile_options()

  showNotificationSettings: (username) ->
    @showPage username, @notification_options(username)

  # HELPERS
  profile_options: ->
    title: 'Profile'
    active_tab: 'show'
    render: (main_region, user) =>
      main_region.show new ProfileView
        model: user
        collection: window.Channels
        created_facts_view: @getFactsView user.created_facts()

  notification_options: (username)-><commit_msg>Show some text instead of the profile when the user has been deleted<commit_after>class window.ProfileController extends Backbone.Marionette.Controller

  # ACTIONS
  showProfile: (username) ->
    @showPage username, @profile_options()

  showNotificationSettings: (username) ->
    @showPage username, @notification_options(username)

  # HELPERS
  profile_options: ->
    title: 'Profile'
    active_tab: 'show'
    render: (main_region, user) =>
      if user.get('deleted')
        main_region.show new TextView model:
          new Backbone.Model text: 'This profile has been deleted.'
      else
        main_region.show new ProfileView
          model: user
          collection: window.Channels
          created_facts_view: @getFactsView user.created_facts()

  notification_options: (username)->
{'fraction_non_alphanumeric': 0.09025787965616046, 'fraction_numerical': 0.0, 'mean_word_length': 3.5953947368421053, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '1083206', 'n_tokens_mistral': 395, 'n_tokens_neox': 381, 'n_words': 98}