<commit_before>xml.instruct!
xml.tag! 'courses' do
  @courses.each do |course|
    xml.tag! 'course' do
      xml.tag! 'course-id', course.id
      xml.tag! 'course-name', course.name
      xml.tag! 'department-code', course.department.code
      xml.tag! 'course-number', course.number
      xml.tag! 'course-credits', course.min_credits == course.max_credits ? "#{course.min_credits}" : "#{course.min_credits}-#{course.max_credits}"
      xml.tag! 'course-description', course.description
      xml.tag! 'sections' do
        course.sections.each do |section|
          xml.tag! 'section' do
            xml.tag! 'section-id', section.id
            xml.tag! 'section-name', section.name
            xml.tag! 'section-instructors', section.instructors.join(", ")
            xml.tag! 'section-crn', section.crn
            xml.tag! 'section-seats', section.seats
            xml.tag! 'section-seats-taken', section.seats_taken
            xml.tag! 'section-seats-available', section.seats - section.seats_taken
            p = 0
            while p < section.num_periods
              xml.tag! 'period' do
                xml.tag! 'period-type', section.periods_type[p]
                xml.tag! 'period-day', section.periods_day[p]
                xml.tag! 'period-start', section.periods_start[p]
                xml.tag! 'period-end', section.periods_end[p]
              end
              p += 1
            end
          end
        end
      end
    end
  end
end<commit_msg>Moved period type after day, start, and end<commit_after>xml.instruct!
xml.tag! 'courses' do
  @courses.each do |course|
    xml.tag! 'course' do
      xml.tag! 'course-id', course.id
      xml.tag! 'course-name', course.name
      xml.tag! 'department-code', course.department.code
      xml.tag! 'course-number', course.number
      xml.tag! 'course-credits', course.min_credits == course.max_credits ? "#{course.min_credits}" : "#{course.min_credits}-#{course.max_credits}"
      xml.tag! 'course-description', course.description
      xml.tag! 'sections' do
        course.sections.each do |section|
          xml.tag! 'section' do
            xml.tag! 'section-id', section.id
            xml.tag! 'section-name', section.name
            xml.tag! 'section-instructors', section.instructors.join(", ")
            xml.tag! 'section-crn', section.crn
            xml.tag! 'section-seats', section.seats
            xml.tag! 'section-seats-taken', section.seats_taken
            xml.tag! 'section-seats-available', section.seats - section.seats_taken
            p = 0
            while p < section.num_periods
              xml.tag! 'period' do
                xml.tag! 'period-day', section.periods_day[p]
                xml.tag! 'period-start', section.periods_start[p]
                xml.tag! 'period-end', section.periods_end[p]
                xml.tag! 'period-type', section.periods_type[p]
              end
              p += 1
            end
          end
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.13293253173012692, 'fraction_numerical': 0.0013360053440213762, 'mean_word_length': 2.01307847082495, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 46}, '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': '2222973', 'n_tokens_mistral': 959, 'n_tokens_neox': 940, 'n_words': 190}