<commit_before>{% extends "base.html" %}
{% import "macros.html" as macros with context %}

{% block content %}
  {{super()}}
  {# do not move the next string, it's here because it's needed before using jwplayer #}
  <script type="text/javascript" src="http://jwpsrv.com/library/6VhvUr6JEeSgMBJtO5t17w.js"></script>
  <div class="alert alert-info alert-dismissible regular-streamer-alert" role="alert">
    <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
    Check out <a class="alert-link" href="https://www.youtube.com/watch?v=FYHGKYgFlXQ">latest gamedev timelapse</a> by <a class="alert-link" href="{{url_for("streamer_page", streamer_name='gkbrk')}}">gkbrk</a> {#<button class="btn btn-success btn-xs subscribe-button subscribe-button-{{regular_streamer.id}} regular-streamer-subscribe-button"> Follow </button> #}

  </div>
  <div class="container">
    <h2 class="text-center">Livestreams right now: {{ live_streams|length }}</h2>
    <p class="text-center"> The website is closely integrated with <a href="http://www.reddit.com/r/WatchPeopleCode">/r/WatchPeopleCode</a> subreddit. If you want to start streaming, check out <a href="{{url_for('streaming_guide')}}">Streaming guide</a></p>

    <div class="row">

      <div class="col-md-8">
        {% if live_streams %}
          {{ macros.streams(live_streams, 'live', true) }}
        {% else %}
          <p>
            {{ wtf.quick_form(idea_form) }}
          </p>
          <h4>How about watching a random recorded stream?</h4>
          {{ macros.stream_macro(random_stream, false, with_subscribe_button=true) }}
          <hr>
        {% endif %}


        {% if upcoming_streams %}
          <h4>Upcoming streams</h4><br>
          {{ macros.streams(upcoming_streams, 'upcoming', true) }}
        {% endif %}
      </div>

      <div class="col-md-4"> 
        <br>
        <form action="" method="POST" class="form form-subscribe" role="form">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h1 class="panel-title">Subscribe to our newsletters</h1>
            </div>

            <div class="panel-body">
              {{ subscribe_form.hidden_tag() }}
              <div class="input-group">
                {{ wtf.form_field(subscribe_form.email, form_type="inline", value="", placeholder="Your e-mail") }}
                <span class="input-group-btn">
                  {{ wtf.form_field(subscribe_form.submit_button, button_map={'submit_button': 'primary'}) }}
                </span>
              </div>
              {{ wtf.form_errors(subscribe_form) }}
            </div>
          </div>
        </form>
        <p><b>Get notifications via Twitter</b></p>
        <a href="https://twitter.com/WatchPeopleCode" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @WatchPeopleCode</a>
      </div>
    </div>

  </div>

{% endblock %}


{% block scripts %}
  {{ super() }}
  <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
{% endblock %}<commit_msg>Don't show regular streamer alert after it is closed<commit_after>{% extends "base.html" %}
{% import "macros.html" as macros with context %}

{% block content %}
  {{super()}}
  {# do not move the next string, it's here because it's needed before using jwplayer #}
  <script type="text/javascript" src="http://jwpsrv.com/library/6VhvUr6JEeSgMBJtO5t17w.js"></script>
  {# TODO: better notifcation system? #}
  {% set rsa_id = "1" %}
  {% if request.cookies.get('dismissed-regular-streamer-alert') != rsa_id %}
    <div class="alert alert-info fade in alert-dismissible regular-streamer-alert regular-streamer-alert-num-{{rsa_id}}" role="alert">
      <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
      Check out <a class="alert-link" href="https://www.youtube.com/watch?v=FYHGKYgFlXQ">latest gamedev timelapse</a> by <a class="alert-link" href="{{url_for("streamer_page", streamer_name='gkbrk')}}">gkbrk</a> {#<button class="btn btn-success btn-xs subscribe-button subscribe-button-{{regular_streamer.id}} regular-streamer-subscribe-button"> Follow </button> #}
    </div>
  {% endif %}

  <div class="container">
    <h2 class="text-center">Livestreams right now: {{ live_streams|length }}</h2>
    <p class="text-center"> The website is closely integrated with <a href="http://www.reddit.com/r/WatchPeopleCode">/r/WatchPeopleCode</a> subreddit. If you want to start streaming, check out <a href="{{url_for('streaming_guide')}}">Streaming guide</a></p>

    <div class="row">

      <div class="col-md-8">
        {% if live_streams %}
          {{ macros.streams(live_streams, 'live', true) }}
        {% else %}
          <p>
            {{ wtf.quick_form(idea_form) }}
          </p>
          <h4>How about watching a random recorded stream?</h4>
          {{ macros.stream_macro(random_stream, false, with_subscribe_button=true) }}
          <hr>
        {% endif %}


        {% if upcoming_streams %}
          <h4>Upcoming streams</h4><br>
          {{ macros.streams(upcoming_streams, 'upcoming', true) }}
        {% endif %}
      </div>

      <div class="col-md-4"> 
        <br>
        <form action="" method="POST" class="form form-subscribe" role="form">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h1 class="panel-title">Subscribe to our newsletters</h1>
            </div>

            <div class="panel-body">
              {{ subscribe_form.hidden_tag() }}
              <div class="input-group">
                {{ wtf.form_field(subscribe_form.email, form_type="inline", value="", placeholder="Your e-mail") }}
                <span class="input-group-btn">
                  {{ wtf.form_field(subscribe_form.submit_button, button_map={'submit_button': 'primary'}) }}
                </span>
              </div>
              {{ wtf.form_errors(subscribe_form) }}
            </div>
          </div>
        </form>
        <p><b>Get notifications via Twitter</b></p>
        <a href="https://twitter.com/WatchPeopleCode" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @WatchPeopleCode</a>
      </div>
    </div>

  </div>

{% endblock %}


{% block scripts %}
  {{ super() }}
  <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<<<<<<< HEAD
=======
  <script>
    $(document).ready(function() {
      $('.regular-streamer-alert').on('closed.bs.alert', function () {
        var that = this;
        var alert_num_class = $(that).attr("class").split(' ').filter(
                function(c) {
                    return c.indexOf("regular-streamer-alert-num-") === 0;
                }
            )[0];
        var alert_num = +alert_num_class.split('-')[4];
        console.log("ALERT: ", alert_num);
        $.cookie('dismissed-regular-streamer-alert', alert_num, { expires: 30 });
      })
    });
  </script>
>>>>>>> d5dfe2f... Don't show regular streamer alert after it is closed
{% endblock %}
{'fraction_non_alphanumeric': 0.18298322103316159, 'fraction_numerical': 0.005284713964856652, 'mean_word_length': 3.0180467091295116, 'pattern_counts': {'":': 0, '<': 134, '<?xml version=': 0, '>': 134, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, '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': '7287045', 'n_tokens_mistral': 2545, 'n_tokens_neox': 2402, 'n_words': 439}