<commit_before>class Twine < ActiveRecord::Base
  has_many :readings
  belongs_to :user

  def get_reading
    session = ScrapeDriver.new
    session.visit 'https://twine.cc/login?next=%2F'
    session.fill_in 'email', :with => self.email
    session.fill_in 'password', :with => "<PASSWORD>"
    sleep 1 + rand(1..10)/50
    session.click_button 'signin'
    sleep 5
    noko = Nokogiri::HTML(session.html)
    session.driver.quit
    temp = noko.css(".temperature-value").text.to_i
    new_reading = Reading.new
    new_reading.temp = temp
    new_reading.twine = self
    new_reading.user = self.user
    new_reading.save
  end
end
<commit_msg>make get_reading return value an instance of Reading<commit_after>class Twine < ActiveRecord::Base
  has_many :readings
  belongs_to :user

  def get_reading
    session = ScrapeDriver.new
    session.visit 'https://twine.cc/login?next=%2F'
    session.fill_in 'email', :with => self.email
    session.fill_in 'password', :with => "<PASSWORD>"
    sleep 1 + rand(1..10)/50
    session.click_button 'signin'
    sleep 5
    noko = Nokogiri::HTML(session.html)
    session.driver.quit
    temp = noko.css(".temperature-value").text.to_i
    new_reading = Reading.new
    new_reading.temp = temp
    new_reading.twine = self
    new_reading.user = self.user
    new_reading.save
    new_reading
  end
end

{'fraction_non_alphanumeric': 0.11415863602668644, 'fraction_numerical': 0.011860637509266123, 'mean_word_length': 3.2857142857142856, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '5130932', 'n_tokens_mistral': 483, 'n_tokens_neox': 454, 'n_words': 96}