<commit_before>
#= require classnames
#= require react-input-autosize
#= require react-select
#= require underscore
#= require moment

MAX_MENTORS_TO_DISPLAY = 10
@KidMentorSchedules = React.createClass
  getInitialState: ->
    mentorsToDisplay: getMentorIds @props.mentors
    visitedMentors: []
    filters: 
      ect: null
      sex: null
      numberOfKids: "no-kid"
      school: null
  getFilteredMentors: ->
    mentors = @props.mentors
    filteredMentors = _.clone @props.mentors
    index = 0
    total = _.size @props.mentors
    for id, mentor of filteredMentors
      mentor.colors = @getColorsOfMentor total, index
      index++
      if @state.filters?.ects?
        delete filteredMentors[id] if mentor.ects isnt @state.filters.ects
      if @state.filters?.sex?
        delete filteredMentors[id] if mentor.sex isnt @state.filters?.sex
      if @state.filters?.school?
        delete filteredMentors[id] if mentor.primary_kids_school?.id isnt @state.filters?.school
      if @state.filters?.numberOfKids?
        switch @state.filters.numberOfKids
          when 'primary-only' 
            delete filteredMentors[id] unless hasPrimaryKid(mentor) and not hasSecondaryKid(mentor)
          when 'secondary-only'
            delete filteredMentors[id] unless hasSecondaryKid(mentor) and not hasPrimaryKid(mentor)
          when 'primary-and-secondary'
            delete filteredMentors[id] unless hasPrimaryKid(mentor) and hasSecondaryKid(mentor)
          when 'no-kid'
            delete filteredMentors[id] if hasPrimaryKid(mentor) or hasSecondaryKid(mentor)

    return filteredMentors
  getSelectedMentors: (filteredMentors) -><commit_msg>fix typo (made no problem, though)<commit_after>
#= require classnames
#= require react-input-autosize
#= require react-select
#= require underscore
#= require moment

MAX_MENTORS_TO_DISPLAY = 10
@KidMentorSchedules = React.createClass
  getInitialState: ->
    mentorsToDisplay: getMentorIds @props.mentors
    visitedMentors: []
    filters: 
      ects: null
      sex: null
      numberOfKids: "no-kid"
      school: null
  getFilteredMentors: ->
    mentors = @props.mentors
    filteredMentors = _.clone @props.mentors
    index = 0
    total = _.size @props.mentors
    for id, mentor of filteredMentors
      mentor.colors = @getColorsOfMentor total, index
      index++
      if @state.filters?.ects?
        delete filteredMentors[id] if mentor.ects isnt @state.filters.ects
      if @state.filters?.sex?
        delete filteredMentors[id] if mentor.sex isnt @state.filters?.sex
      if @state.filters?.school?
        delete filteredMentors[id] if mentor.primary_kids_school?.id isnt @state.filters?.school
      if @state.filters?.numberOfKids?
        switch @state.filters.numberOfKids
          when 'primary-only' 
            delete filteredMentors[id] unless hasPrimaryKid(mentor) and not hasSecondaryKid(mentor)
          when 'secondary-only'
            delete filteredMentors[id] unless hasSecondaryKid(mentor) and not hasPrimaryKid(mentor)
          when 'primary-and-secondary'
            delete filteredMentors[id] unless hasPrimaryKid(mentor) and hasSecondaryKid(mentor)
          when 'no-kid'
            delete filteredMentors[id] if hasPrimaryKid(mentor) or hasSecondaryKid(mentor)

    return filteredMentors
  getSelectedMentors: (filteredMentors) ->
{'fraction_non_alphanumeric': 0.0881649731022116, 'fraction_numerical': 0.0017931858936043037, 'mean_word_length': 3.18375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1461789', 'n_tokens_mistral': 1081, 'n_tokens_neox': 1043, 'n_words': 237}