<commit_before>also_reload 'repoclass.rb'

get '/' do
  erb :form     
end

post '/' do
  redirect "/map?owner=#{params[:owner]}&repo=#{params[:repo]}"
end

get '/notfound' do
  erb :notfound
end

get '/map' do
  @repo = Repo.new(params[:owner], params[:repo])
  data_table_markers = GoogleVisualr::DataTable.new
  data_table_markers.new_column('string' , 'Location' )
  data_table_markers.new_column('number' , 'Contributions')
  begin
    data_table_markers.add_rows(@repo.location_count.count)
  rescue
    redirect '/notfound'
  end
  i = 0
  while i < @repo.location_count.count
    @repo.location_count.each do |x|<commit_msg>undo begin/rescue app.rb<commit_after>also_reload 'repoclass.rb'

get '/' do
  erb :form     
end

post '/' do
  redirect "/map?owner=#{params[:owner]}&repo=#{params[:repo]}"
end

get '/notfound' do
  erb :notfound
end

get '/map' do
  @repo = Repo.new(params[:owner], params[:repo])
  begin
    @repo.get_locations
  rescue
    redirect '/notfound'
  end
  data_table_markers = GoogleVisualr::DataTable.new
  data_table_markers.new_column('string' , 'Location' )
  data_table_markers.new_column('number' , 'Contributions')
  data_table_markers.add_rows(@repo.location_count.count)
  i = 0
  while i < @repo.location_count.count
    @repo.location_count.each do |x|
{'fraction_non_alphanumeric': 0.14186584425597532, 'fraction_numerical': 0.0015420200462606013, 'mean_word_length': 4.430962343096234, 'pattern_counts': {'":': 0, '<': 5, '<?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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3879738', 'n_tokens_mistral': 483, 'n_tokens_neox': 478, 'n_words': 90}