<commit_before>class HomepagesController < ApplicationController
  def index
  end

  def getPotholes
    @holes = Pothole.where('"potholes"."creation_date" IN (?) OR "potholes"."creation_date" IN (?)', params[:all_dates], params[:all_dates])
    respond_to do |format|
      format.html
      format.json { render :json => @holes }
    end
  end


  def renderReport
  end

  def submitReport


    uri = URI.parse('http://test311request.cityofchicago.org/open311/v2/requests.json')
    api_key = ENV["open311_key"]

    http = Net::HTTP.new(uri.host, uri.port)
    request = Net::HTTP::Post.new(uri.request_uri)
    request.set_form_data({'api_key' => api_key,
                           'service_code'=> '4fd3b656e750846c53000004',
                           'lat' => params["latitude"],
                           'long' => params["longitude"],
                           'address_string' => params["address"],
                           'attribute[WHEREIST]' => params["attribute"],
                           'activity[A511OPTN]' => params["activity"]})

    response = http.request(request)
    msg = response.body
    token = JSON.parse(msg).pop["token"]
    respond_to do |format|
      format.json {
        render :json => {msg: token}
        # render :json => "#{token.to_json}", :content_type => "text/html"
      }
    end
  end


end<commit_msg>fixing merge conflict by hand - 1 more file to go<commit_after>class HomepagesController < ApplicationController
  def index
  end

  def getPotholes
    @holes = Pothole.where('"potholes"."creation_date" IN (?) OR "potholes"."creation_date" IN (?)', params[:all_dates], params[:all_dates])
    respond_to do |format|
      format.html
      format.json { render :json => @holes }
    end
  end


  def renderReport
  end

  def submitReport


    uri = URI.parse('http://test311request.cityofchicago.org/open311/v2/requests.json')
    api_key = ENV["open311_key"]

    http = Net::HTTP.new(uri.host, uri.port)
    request = Net::HTTP::Post.new(uri.request_uri)
    request.set_form_data({'api_key' => api_key,
                           'service_code'=> '4fd3b656e750846c53000004',
                           'lat' => params["latitude"],
                           'long' => params["longitude"],
                           'address_string' => params["address"],
                           'description' => params["description"],
                           'attribute[WHEREIST]' => params["attribute"],
                           'phone' => params["phone"],
+                          'media_url' => params["mediaUrl"]})

    response = http.request(request)
    msg = response.body
    token = JSON.parse(msg).pop["token"]
    respond_to do |format|
      format.json {
        render :json => {msg: token}
      }
    end
  end


end
{'fraction_non_alphanumeric': 0.13698140200286124, 'fraction_numerical': 0.022174535050071532, 'mean_word_length': 2.2186421173762945, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '5381269', 'n_tokens_mistral': 898, 'n_tokens_neox': 826, 'n_words': 159}