<commit_before>require 'sunlight/congress'

module Sunlight
  module Congress
    class District
      attr_accessor :state, :district

      def initialize(options)
        self.state = options["state"]
        self.district = options["district"]
      end

      def self.by_zipcode(zipcode)
        uri = URI("#{Sunlight::Congress::BASE_URI}/districts/locate?zip=#{zipcode}&apikey=#{Sunlight::Congress.api_key}")

        new(JSON.load(Net::HTTP.get(uri))["results"].first)
      end

      def self.by_latlong(latitude, longitude)
        uri = URI("#{Sunlight::Congress::BASE_URI}/districts/locate?latitude=#{latitude}&longitude=#{longitude}&apikey=#{Sunlight::Congress.api_key}")

        new(JSON.load(Net::HTTP.get(uri))["results"].first)
      end
    end
  end
end<commit_msg>Modified class definition for consistency<commit_after>require 'sunlight/congress'

class Sunlight::Congress::District
  attr_accessor :state, :district

  def initialize(options)
    self.state = options["state"]
    self.district = options["district"]
  end

  def self.by_zipcode(zipcode)
    uri = URI("#{Sunlight::Congress::BASE_URI}/districts/locate?zip=#{zipcode}&apikey=#{Sunlight::Congress.api_key}")

    new(JSON.load(Net::HTTP.get(uri))["results"].first)
  end

  def self.by_latlong(latitude, longitude)
    uri = URI("#{Sunlight::Congress::BASE_URI}/districts/locate?latitude=#{latitude}&longitude=#{longitude}&apikey=#{Sunlight::Congress.api_key}")

    new(JSON.load(Net::HTTP.get(uri))["results"].first)
  end
end
{'fraction_non_alphanumeric': 0.15963060686015831, 'fraction_numerical': 0.0, 'mean_word_length': 4.857142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2742920', 'n_tokens_mistral': 524, 'n_tokens_neox': 486, 'n_words': 65}