<commit_before>class WelcomeController < ApplicationController
  require "will_paginate/array"

  def index
    # redirect_to current_user if current_user
    # render "current_user_index" if current_user
  end

  def blog
    client = Tumblr::Client.new({
      :consumer_key => ENV['TUMBLR_CONSUMER_KEY',]
      :consumer_secret => ENV['TUMBLR_CONSUMER_SECRET',]
      :oauth_token => ENV['TUMBLR_OAUTH_TOKEN',]
      :oauth_token_secret => ENV['TUMBLR_OAUTH_TOKEN_SECRET']
    })
    
    result = client.posts('heatseeknyc.tumblr.com')['posts']
    result.sort!{|a,b| b['date'] <=> a['date']}
    
    @entries = WillPaginate::Collection.create(1, 4, result.count) do |pager|
      pager.replace(result)
    end

    @entries.paginate(:page => params[:page], :per_page => 4)
  end
end<commit_msg>fix typo in env vars for blog<commit_after>class WelcomeController < ApplicationController
  require "will_paginate/array"

  def index
    # redirect_to current_user if current_user
    # render "current_user_index" if current_user
  end

  def blog
    client = Tumblr::Client.new({
      :consumer_key => ENV['TUMBLR_CONSUMER_KEY'],
      :consumer_secret => ENV['TUMBLR_CONSUMER_SECRET'],
      :oauth_token => ENV['TUMBLR_OAUTH_TOKEN'],
      :oauth_token_secret => ENV['TUMBLR_OAUTH_TOKEN_SECRET']
    })
    
    result = client.posts('heatseeknyc.tumblr.com')['posts']
    result.sort!{|a,b| b['date'] <=> a['date']}
    
    @entries = WillPaginate::Collection.create(1, 4, result.count) do |pager|
      pager.replace(result)
    end

    @entries.paginate(:page => params[:page], :per_page => 4)
  end
end
{'fraction_non_alphanumeric': 0.1349009900990099, 'fraction_numerical': 0.0037128712871287127, 'mean_word_length': 3.9753846153846153, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, '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': '5433890', 'n_tokens_mistral': 603, 'n_tokens_neox': 578, 'n_words': 99}