<commit_before>{% extends 'master.html' %}

{% block content %}
<div class="main page-content">
{% block general_content %}{% endblock %}
</div>

{% if load_angular %}
<script>
    /*
     * Provide current user info
     */
    'use strict';
    (function(angular) {

        var mod = angular.module('currentUserService', ['ngResource']);

        mod.factory('currentUserService', ['$resource', _factory]);

        function _factory($resource) {
            var userData = {
                "id": ("{{ user.id }}" == "None") ? null : parseInt("{{ user.id }}"),
                "authenticated": ("{{ user.is_authenticated }}" == "True") ? true : false, 
                "staff": ("{{ user.is_staff }}" == "True") ? true : false, 
                "username": "{{ user.username }}", 
                "created": ("{{ user.date_joined }}" == "") ? null : "{{ user.date_joined }}", 
                "modified": ("{{ user.last_login }}" == "") ? null : "{{ user.last_login }}", 
                "active": ("{{ user.is_active }}" == "True") ? true : false,
                "connected_to_github": ("{{ connected_to_github }}" == "True") ? true : false,
                "cache_refreshed": ("{{ user.cache_refreshed }}" == "True") ? true : false,
                "auth_orgs_url": "{{ auth_orgs_url }}",
                "subscriptions": [
                    {% for subscription in user.get_subscriptions %}
                        {
                           id: {{ subscription.id }},
                           github_user: "{{ subscription.github_user }}",
                           github_repo: "{{ subscription.github_repo }}"
                        }
                        {% if not forloop.last %},{%  endif %}
                    {% endfor %}
                ],
                "starred": [
                    {% for star in user.get_starred %}
                        {
                           id: {{ star.id }},
                           github_user: "{{ star.github_user }}",
                           github_repo: "{{ star.github_repo }}"
                        }
                        {% if not forloop.last %},{%  endif %}
                    {% endfor %}
                ],
                "update": function() {
                    // refresh anything about the user that may change
                    return $resource('/api/v1/users/' + userData.id + '/').get().$promise.then(function(response) {
                        userData.cache_refreshed = response.cache_refreshed;
                        userData.subscriptions = response.summary_fields.subscriptions;
                        userData.starred = response.summary_fields.starred;
                        return userData;
                    });
                }
            };

            return userData;
        }
    })(angular);
</script>
{% endif %}

{% if site_name == 'galaxy-qa.ansible.com' %}
    <!-- ##### Pendo.io bits #### -->
    <script>
        // Please use Strings, Numbers, or Bools for value types.
        window.pendo_options = {
            apiKey: 'dbde1b37-ee77-4baf-695a-d7a7752b9c78',

             // If you load your user info asynchronously, set this to true
             usePendoAgentAPI: false,

            visitor: {
              id:              "{{ user.id }}",         // Required if user is logged in
              session_id:      "{{ request.session.session_key }}"
              
              // You can add any additional visitor level key-values here,
              // as long as it's not one of the above reserved names.
            },

            account: {
              id:              "{{ user.id }}",        // Highly recommended
              email:           "{{ user.email }}",
              github_user:     "{{ user.github_user }}",
              full_name:       "{{ user.full_name }}",
              is_staff:        "{{ user.is_staff }}",
              date_joined:     "{{ user.date_joined }}"
              // name:         // Optional
              // planLevel:    // Optional
              // planPrice:    // Optional
              // creationDate: // Optional

              // You can add any additional account level key-values here,
              // as long as it's not one of the above reserved names.
            }
        };
        (function() {
            var script = document.createElement('script');
            script.type = 'text/javascript';
            script.async = true;
            script.src = ('https:' === document.location.protocol ? 'https://' : 'http://' ) + 'd3accju1t3mngt.cloudfront.net/js/pa.min.js';
            var firstScript = document.getElementsByTagName('script')[0];
            firstScript.parentNode.insertBefore(script, firstScript);
        })();
    </script>
{% endif %}

{% if site_name == 'galaxy-qa.ansible.com' %}
    <!-- Google Analytics galaxy-qa.ansible.com -->
    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','/static/vendorjs/ga.js','ga');

      ga('create', 'UA-29861888-6', 'auto');
{% if not load_angular %} 
      ga('send', 'pageview');
{% endif %}
    </script>
{% endif %}

{% if site_name == 'galaxy.ansible.com' %}
    <!-- Google Analytics galaxy.ansible.com -->
    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','/static/vendorjs/ga.js','ga');

      ga('create', 'UA-29861888-5', 'auto');
      ga('send', 'pageview');

    </script>
    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','/static/vendorjs/ga.js','ga');

      ga('create', 'UA-29861888-4', 'auto');
      ga('send', 'pageview');
    </script>
{% endif %}

{% endblock %}
<commit_msg>Commenting out GA code -5<commit_after>{% extends 'master.html' %}

{% block content %}
<div class="main page-content">
{% block general_content %}{% endblock %}
</div>

{% if load_angular %}
<script>
    /*
     * Provide current user info
     */
    'use strict';
    (function(angular) {

        var mod = angular.module('currentUserService', ['ngResource']);

        mod.factory('currentUserService', ['$resource', _factory]);

        function _factory($resource) {
            var userData = {
                "id": ("{{ user.id }}" == "None") ? null : parseInt("{{ user.id }}"),
                "authenticated": ("{{ user.is_authenticated }}" == "True") ? true : false, 
                "staff": ("{{ user.is_staff }}" == "True") ? true : false, 
                "username": "{{ user.username }}", 
                "created": ("{{ user.date_joined }}" == "") ? null : "{{ user.date_joined }}", 
                "modified": ("{{ user.last_login }}" == "") ? null : "{{ user.last_login }}", 
                "active": ("{{ user.is_active }}" == "True") ? true : false,
                "connected_to_github": ("{{ connected_to_github }}" == "True") ? true : false,
                "cache_refreshed": ("{{ user.cache_refreshed }}" == "True") ? true : false,
                "auth_orgs_url": "{{ auth_orgs_url }}",
                "subscriptions": [
                    {% for subscription in user.get_subscriptions %}
                        {
                           id: {{ subscription.id }},
                           github_user: "{{ subscription.github_user }}",
                           github_repo: "{{ subscription.github_repo }}"
                        }
                        {% if not forloop.last %},{%  endif %}
                    {% endfor %}
                ],
                "starred": [
                    {% for star in user.get_starred %}
                        {
                           id: {{ star.id }},
                           github_user: "{{ star.github_user }}",
                           github_repo: "{{ star.github_repo }}"
                        }
                        {% if not forloop.last %},{%  endif %}
                    {% endfor %}
                ],
                "update": function() {
                    // refresh anything about the user that may change
                    return $resource('/api/v1/users/' + userData.id + '/').get().$promise.then(function(response) {
                        userData.cache_refreshed = response.cache_refreshed;
                        userData.subscriptions = response.summary_fields.subscriptions;
                        userData.starred = response.summary_fields.starred;
                        return userData;
                    });
                }
            };

            return userData;
        }
    })(angular);
</script>
{% endif %}

{% if site_name == 'galaxy-qa.ansible.com' %}
    <!-- ##### Pendo.io bits #### -->
    <script>
        // Please use Strings, Numbers, or Bools for value types.
        window.pendo_options = {
            apiKey: 'dbde1b37-ee77-4baf-695a-d7a7752b9c78',

             // If you load your user info asynchronously, set this to true
             usePendoAgentAPI: false,

            visitor: {
              id:              "{{ user.id }}",         // Required if user is logged in
              session_id:      "{{ request.session.session_key }}"
              
              // You can add any additional visitor level key-values here,
              // as long as it's not one of the above reserved names.
            },

            account: {
              id:              "{{ user.id }}",        // Highly recommended
              email:           "{{ user.email }}",
              github_user:     "{{ user.github_user }}",
              full_name:       "{{ user.full_name }}",
              is_staff:        "{{ user.is_staff }}",
              date_joined:     "{{ user.date_joined }}"
              // name:         // Optional
              // planLevel:    // Optional
              // planPrice:    // Optional
              // creationDate: // Optional

              // You can add any additional account level key-values here,
              // as long as it's not one of the above reserved names.
            }
        };
        (function() {
            var script = document.createElement('script');
            script.type = 'text/javascript';
            script.async = true;
            script.src = ('https:' === document.location.protocol ? 'https://' : 'http://' ) + 'd3accju1t3mngt.cloudfront.net/js/pa.min.js';
            var firstScript = document.getElementsByTagName('script')[0];
            firstScript.parentNode.insertBefore(script, firstScript);
        })();
    </script>
{% endif %}

{% if site_name == 'galaxy-qa.ansible.com' %}
    <!-- Google Analytics galaxy-qa.ansible.com -->
    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','/static/vendorjs/ga.js','ga');

      ga('create', 'UA-29861888-6', 'auto');
{% if not load_angular %} 
      ga('send', 'pageview');
{% endif %}
    </script>
{% endif %}

{% if site_name == 'galaxy.ansible.com' %}
    <!-- Google Analytics galaxy.ansible.com -->
    <!--
    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','/static/vendorjs/ga.js','ga');

      ga('create', 'UA-29861888-5', 'auto');
      ga('send', 'pageview');

    </script>
    -->
    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','/static/vendorjs/ga.js','ga');

      ga('create', 'UA-29861888-4', 'auto');
      ga('send', 'pageview');
    </script>
{% endif %}

{% endblock %}

{'fraction_non_alphanumeric': 0.1769394680767106, 'fraction_numerical': 0.00923368321363744, 'mean_word_length': 1.7357512953367875, 'pattern_counts': {'":': 26, '<': 34, '<?xml version=': 0, '>': 34, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2069964', 'n_tokens_mistral': 3969, 'n_tokens_neox': 3718, 'n_words': 636}