<commit_before><!DOCTYPE html>
<html>
<head>
  <title>Embed API Demo</title>
</head>
<body>

<!-- Step 1: Create the containing elements. -->

<section id="auth-button"></section>


<p id="sessions-count-first"></p>

<section id="sessionsBarFirst"></section>
<section id="view-selector"></section>

<section id="sessionsBarSecond"></section>

<!-- Step 2: Load the library. -->
<script type="text/javascript" src="client_id.js"></script>
<script>
(function(w,d,s,g,js,fjs){
  g=w.gapi||(w.gapi={});g.analytics={q:[],ready:function(cb){this.q.push(cb)}};
  js=d.createElement(s);fjs=d.getElementsByTagName(s)[0];
  js.src='https://apis.google.com/js/platform.js';
  fjs.parentNode.insertBefore(js,fjs);js.onload=function(){g.load('analytics')};
}(window,document,'script'));
</script>

<script>
gapi.analytics.ready(function() {

  // Step 3: Authorize the user.

  var CLIENT_ID = id.client_id;

  gapi.analytics.auth.authorize({
    container: 'auth-button',
    clientid: CLIENT_ID,
  });

  // Step 4: Create the view selector.

  var viewSelector = new gapi.analytics.ViewSelector({
    container: 'view-selector'
  });

  var viewSelectorSecond = new gapi.analytics.ViewSelector({
    container: 'view-selector-second'
  });

  // Step 5: Create the sessionsBarFirst chart.

  var sessionsBarFirst = new gapi.analytics.googleCharts.DataChart({
    reportType: 'ga',
    query: {
      'dimensions': 'ga:date',
      'metrics': 'ga:sessions',
      'start-date': '2016-11-01',
      'end-date': '2016-11-30',
    },
    chart: {
      type: 'COLUMN',
      container: 'sessionsBarFirst'
    }
  });

  var sessionsBarSecond = new gapi.analytics.googleCharts.DataChart({
    reportType: 'ga',
    query: {
      'dimensions': 'ga:date',
      'metrics': 'ga:sessions',
      'start-date': '2016-11-01',
      'end-date': '2016-11-30',
    },
    chart: {
      type: 'COLUMN',
      container: 'sessionsBarSecond'
    }
  });

  sessionsBarFirst.on('success', function(result) {
    // Print the total pageview count to the console.
    document.getElementById("sessions-count-first").innerHTML = result.response.totalsForAllResults['ga:sessions'];
  });

  // Step 6: Hook up the components to work together.

  gapi.analytics.auth.on('success', function(response) {
    viewSelector.execute();<commit_msg>comment<commit_after><!DOCTYPE html>
<html>
<head>
  <title>Embed API Demo</title>
</head>
<body>

<!-- Step 1: Create the containing elements. -->

<section id="auth-button"></section>

<!-- Displaying counts -->
<p id="sessions-count-first"></p>


<section id="sessionsBarFirst"></section>
<section id="view-selector"></section>

<section id="sessionsBarSecond"></section>

<!-- Step 2: Load the library. -->
<script type="text/javascript" src="client_id.js"></script>
<script>
(function(w,d,s,g,js,fjs){
  g=w.gapi||(w.gapi={});g.analytics={q:[],ready:function(cb){this.q.push(cb)}};
  js=d.createElement(s);fjs=d.getElementsByTagName(s)[0];
  js.src='https://apis.google.com/js/platform.js';
  fjs.parentNode.insertBefore(js,fjs);js.onload=function(){g.load('analytics')};
}(window,document,'script'));
</script>

<script>
gapi.analytics.ready(function() {

  // Step 3: Authorize the user.

  var CLIENT_ID = id.client_id;

  gapi.analytics.auth.authorize({
    container: 'auth-button',
    clientid: CLIENT_ID,
  });

  // Step 4: Create the view selector.

  var viewSelector = new gapi.analytics.ViewSelector({
    container: 'view-selector'
  });

  var viewSelectorSecond = new gapi.analytics.ViewSelector({
    container: 'view-selector-second'
  });

  // Step 5: Create the sessionsBarFirst chart.

  var sessionsBarFirst = new gapi.analytics.googleCharts.DataChart({
    reportType: 'ga',
    query: {
      'dimensions': 'ga:date',
      'metrics': 'ga:sessions',
      'start-date': '2016-11-01',
      'end-date': '2016-11-30',
    },
    chart: {
      type: 'COLUMN',
      container: 'sessionsBarFirst'
    }
  });

  var sessionsBarSecond = new gapi.analytics.googleCharts.DataChart({
    reportType: 'ga',
    query: {
      'dimensions': 'ga:date',
      'metrics': 'ga:sessions',
      'start-date': '2016-10-01',
      'end-date': '2016-10-31',
    },
    chart: {
      type: 'COLUMN',
      container: 'sessionsBarSecond'
    }
  });

  sessionsBarFirst.on('success', function(result) {
    // Print the total pageview count to the console.
    document.getElementById("sessions-count-first").innerHTML = result.response.totalsForAllResults['ga:sessions'];
  });

  // Step 6: Hook up the components to work together.

  gapi.analytics.auth.on('success', function(response) {
    viewSelector.execute();
{'fraction_non_alphanumeric': 0.18250377073906485, 'fraction_numerical': 0.01680672268907563, 'mean_word_length': 3.761025641025641, 'pattern_counts': {'":': 0, '<': 52, '<?xml version=': 0, '>': 52, 'https://': 2, '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': '441004', 'n_tokens_mistral': 1667, 'n_tokens_neox': 1596, 'n_words': 289}