<commit_before>  <% content_for(:js) do %>
    <%= headjs_include_tag "plugins/jquery.min", "admin/show/helpers.js", "admin/api/api" %>
  <% end %>
  <% content_for(:head) do %>
    <%= stylesheet_link_tag('reset','admin/layout','admin/others/tokens') %>
  <% end %>

  <%= render :partial => 'admin/shared/subheader' %>

  <section id="content">
    <div class="inner_content">

      <%= render :partial => 'shared/flash_message' %>

      <div class="tables_list">
        <div class="left">
          <div class="top_blue_medium">
            <h3>Your <strong>API keys</strong></h3>
            <p><a class="oauth selected" href="<%= api_key_credentials_path %>">API Key</a><a class="jsonp" href="<%= oauth_credentials_path %>">OAuth</a></p>
          </div>
          <div class="middle_white_medium">
            <div class="end_oauth">
              <p>Use your API key with the SQL API and Maps API for full API access to your CartoDB tables. Learn more about using the API Key in <a href="<%= APP_CONFIG[:developers_host] %>/api/">our documentation</a>.</p>
            <%= form_tag(regenerate_api_key_path, :method => :post, :id => 'regenerate_api_key') do %>
              <span class="form_block" style="width:350px;">
                <%= label_tag      :api_key, "YOUR API KEY" %>
                <%= text_field_tag :api_key, current_user.get_map_key, :readonly => 'readonly', :style => "width:350px;"  %>
              </span>
              <a href="#submit" class="green submit regenerate_api_key" style="margin-left:25px;" ><span>Regenerate API key</span></a>
            <% end %>
            <p style="background:#eee;font-size:12px;padding:1em;margin-top:10px;">
              <b>Example write:</b><br/>                                        
              http://<%= current_user.username %>.cartodb.com/api/v1/sql?q=INSERT INTO table_name (the_geom, observation)
              VALUES (ST_GeomFromText('POINT(-71.2 42.5)', 4326),'rare bird spotted')&api_key=<%= current_user.get_map_key%><br><br>              

              <b>Example private table read:</b><br/>                            
              http://<%= current_user.username %>.cartodb.com/api/v1/sql?q=SELECT * FROM private_table&api_key=<%= current_user.get_map_key%><br>
            </p>
            
            </div>
          </div>
          <div class="bottom_white_medium"></div>
        </div>
        <div class="right">
          <%= render :partial => 'create_first' %>
        </div>
      </div>
    </div>
  </section>

  <% content_for(:mamufas) do %>
    <div class="mamufas">
      <div class="delete_window">
        <a href="#close_window" class="close_delete"></a>
        <div class="inner_">
          <span class="top">
            <h3>You are about to regenerate your API key</h3>
            <p>You will need to update all deployed apps with a new API key. Are you sure you want to continue?</p>
          </span>
          <span class="bottom">
            <a href="#close_window" class="cancel">cancel</a>
            <a href="#confirm_delete" class="confirm_delete" key="">Regenerate API key</a><commit_msg>update displayed url to v2<commit_after>  <% content_for(:js) do %>
    <%= headjs_include_tag "plugins/jquery.min", "admin/show/helpers.js", "admin/api/api" %>
  <% end %>
  <% content_for(:head) do %>
    <%= stylesheet_link_tag('reset','admin/layout','admin/others/tokens') %>
  <% end %>

  <%= render :partial => 'admin/shared/subheader' %>

  <section id="content">
    <div class="inner_content">

      <%= render :partial => 'shared/flash_message' %>

      <div class="tables_list">
        <div class="left">
          <div class="top_blue_medium">
            <h3>Your <strong>API keys</strong></h3>
            <p><a class="oauth selected" href="<%= api_key_credentials_path %>">API Key</a><a class="jsonp" href="<%= oauth_credentials_path %>">OAuth</a></p>
          </div>
          <div class="middle_white_medium">
            <div class="end_oauth">
              <p>Use your API key with the SQL API and Maps API for full API access to your CartoDB tables. Learn more about using the API Key in <a href="<%= APP_CONFIG[:developers_host] %>/api/">our documentation</a>.</p>
            <%= form_tag(regenerate_api_key_path, :method => :post, :id => 'regenerate_api_key') do %>
              <span class="form_block" style="width:350px;">
                <%= label_tag      :api_key, "YOUR API KEY" %>
                <%= text_field_tag :api_key, current_user.get_map_key, :readonly => 'readonly', :style => "width:350px;"  %>
              </span>
              <a href="#submit" class="green submit regenerate_api_key" style="margin-left:25px;" ><span>Regenerate API key</span></a>
            <% end %>
            <p style="background:#eee;font-size:12px;padding:1em;margin-top:10px;">
              <b>Example write:</b><br/>                                        
              http://<%= current_user.username %>.cartodb.com/api/v2/sql?q=INSERT INTO table_name (the_geom, observation)
              VALUES (ST_GeomFromText('POINT(-71.2 42.5)', 4326),'rare bird spotted')&api_key=<%= current_user.get_map_key%><br><br>              

              <b>Example private table read:</b><br/>                            
              http://<%= current_user.username %>.cartodb.com/api/v2/sql?q=SELECT * FROM private_table&api_key=<%= current_user.get_map_key%><br>
            </p>
            
            </div>
          </div>
          <div class="bottom_white_medium"></div>
        </div>
        <div class="right">
          <%= render :partial => 'create_first' %>
        </div>
      </div>
    </div>
  </section>

  <% content_for(:mamufas) do %>
    <div class="mamufas">
      <div class="delete_window">
        <a href="#close_window" class="close_delete"></a>
        <div class="inner_">
          <span class="top">
            <h3>You are about to regenerate your API key</h3>
            <p>You will need to update all deployed apps with a new API key. Are you sure you want to continue?</p>
          </span>
          <span class="bottom">
            <a href="#close_window" class="cancel">cancel</a>
            <a href="#confirm_delete" class="confirm_delete" key="">Regenerate API key</a>
{'fraction_non_alphanumeric': 0.16765128532652085, 'fraction_numerical': 0.0094204055564426, 'mean_word_length': 2.3914455874390903, 'pattern_counts': {'":': 0, '<': 175, '<?xml version=': 0, '>': 189, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '930526', 'n_tokens_mistral': 2087, 'n_tokens_neox': 1942, 'n_words': 417}