<commit_before>module Jekyll
  class SpeekersGenerator < Generator
    def generate(site)
      site.data['speakers'].each do | year, data |
        data['speakers'].each do | speaker |
          site.pages << SpeakerPage.new(site, "speakers", year, speaker)
        end
        data['speakers'].each do | speaker |
          site.pages << SpeakerRedirectPage.new(site, "speakers", year, speaker)
        end
      end
    end
  end

  class SpeakerPage < Page
    def initialize(site, type, year, speaker)
      @site = site
      @base = "/"
      @dir = type + "/" + speaker['url']
      @name = 'index.html'
      self.process(@name)
      self.read_yaml(File.join(@base, 'pages'), 'speakers/single.html')
      self.data['speaker'] = speaker
      self.data['year'] = year
      self.data['title'] = "#{ speaker['first_name'] } #{speaker['last_name']}"
      self.data['description'] = "#{ speaker['bio'].gsub(/<\/?[^>]*>/, "")[0, 150] } ..."
      self.data['image'] = "/assets/images/speakers/#{year}/#{ speaker['first_name'] }_#{ speaker['last_name'] }.png"
    end
  end

  class SpeakerRedirectPage < Page
    def initialize(site, type, year, speaker)
      @site = site<commit_msg>fix order of speakers profile<commit_after>module Jekyll
  class SpeekersGenerator < Generator
    def generate(site)
      site.data['speakers'].reverse_each do | year, data |
        data['speakers'].each do | speaker |
          site.pages << SpeakerPage.new(site, "speakers", year, speaker)
        end
        data['speakers'].each do | speaker |
          site.pages << SpeakerRedirectPage.new(site, "speakers", year, speaker)
        end
      end
    end
  end

  class SpeakerPage < Page
    def initialize(site, type, year, speaker)
      @site = site
      @base = "/"
      @dir = type + "/" + speaker['url']
      @name = 'index.html'
      self.process(@name)
      self.read_yaml(File.join(@base, 'pages'), 'speakers/single.html')
      self.data['speaker'] = speaker
      self.data['year'] = year
      self.data['title'] = "#{ speaker['first_name'] } #{speaker['last_name']}"
      self.data['description'] = "#{ speaker['bio'].gsub(/<\/?[^>]*>/, "")[0, 150] } ..."
      self.data['image'] = "/assets/images/speakers/#{year}/#{ speaker['first_name'] }_#{ speaker['last_name'] }.png"
    end
  end

  class SpeakerRedirectPage < Page
    def initialize(site, type, year, speaker)
      @site = site
{'fraction_non_alphanumeric': 0.17524916943521596, 'fraction_numerical': 0.0033222591362126247, 'mean_word_length': 2.8177496038034864, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 7, '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': '1758274', 'n_tokens_mistral': 773, 'n_tokens_neox': 750, 'n_words': 163}