<commit_before>#!/usr/bin/env ruby

require 'net/http'
require 'ruby-debug'
require 'json'

module Hotlight
  # Given a location (or list of locations) return a json object of store info, including hotlight status
  # eg status('1115') or status('1115,1112')
  def Hotlight.status(params)
    uri = nil
    uri = URI('http://locations.krispykreme.com/Hotlight/HotLightStatus.ashx') if params.key? 'locations'
    uri = URI('http://locations.krispykreme.com/Hotlight/ListLocations.ashx') if params.key? 'zipcode'
    raise "unknown parameter #{params.inspect}" unless uri
    response = Net::HTTP.post_form(uri,params)

    if response.is_a?(Net::HTTPSuccess)
      result = JSON.parse(response.body)
      locations = result["data"]["locations"]
    else
      nil
    end
  end
end



<commit_msg>Update master<commit_after>#!/usr/bin/env ruby

require 'net/http'
require 'json'

module Hotlight
  # Given a location (or list of locations) return a json object of store info, including hotlight status
  # eg status('1115') or status('1115,1112')
  def Hotlight.status(params)
    uri = nil
    uri = URI('http://locations.krispykreme.com/Hotlight/HotLightStatus.ashx') if params.key? 'locations'
    uri = URI('http://locations.krispykreme.com/Hotlight/ListLocations.ashx') if params.key? 'zipcode'
    raise "unknown parameter #{params.inspect}" unless uri
    response = Net::HTTP.post_form(uri,params)

    if response.is_a?(Net::HTTPSuccess)
      result = JSON.parse(response.body)
      locations = result["data"]["locations"]
    else
      nil
    end
  end
end




{'fraction_non_alphanumeric': 0.12634920634920635, 'fraction_numerical': 0.015238095238095238, 'mean_word_length': 3.8492307692307692, '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': '2077816', 'n_tokens_mistral': 532, 'n_tokens_neox': 509, 'n_words': 127}