<commit_before><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" >
	<meta http-equiv="Content-Language" content="{{ LANGUAGE_CODE }}">
	<script type="text/javascript" src="{{MEDIA_URL}}js/jquery.min.js"></script>
	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script>
	<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/base/jquery-ui.css" type="text/css"/>
	<link rel="stylesheet" href="{{MEDIA_URL}}css/embed_bill.css" type="text/css"/>

	
	<script type="text/javascript">
	  var log;
	  
	  if (window.console && typeof console.log === "function"){
	  // use apply to preserve context and invocations with multiple arguments
	  log = function () { console.log.apply(console, arguments); };
	  } else {
	  log = function(){ return; }
	  }

/*
states:
	1. initiated ("was-proposed")
	2. pre-vote ("pre-voted")
	3. summoned-1 
	4. commity-1
	5. vote-1 ("first-voted")
	6. summoned-2
	7. commity-2
	8. vote-2 ("second-voted")
	9. vote-3 ("approval-voted")
	10. passed ("approval-voted" == true)
	
stream example:
  { "note": "True/False/..." 
	"verb": "was-proposed/pre-voted/first-voted/approval-voted/was-discussed/was-voted-on-gov",
	"target": "/vote/xxxx/",
	"time": 1279717260 }
		
*/

/*
 * TODO (summary):
 *   1. bill abstract
 * √ 2. links
 * √ 3. bill title - bill.law.title VS. bill.title
 * √ 4. status
 *   6. dates - done for votes. what about future estimations?
 * √ 7. phase backgrounds
 *   8. active phase
 *   9. link "?" - try to do the expand if possible
 *  10. scale for votes - where to get the data? 
 * √11. what about DUPLICATIONS? go chronologically from the end. all the rest is history
 * √12. expand with jQuery UI on click on little arrow in pull DIV
 */ 
 
 /*
  * 
  * <li id="vote-1" class="passed/failed/pending voted odd current first/last">
  */
			
		var expanded = false;
		var stream = {{stream|safe}};
		var phases = {
			'was-proposed'         : 0,
			'was-pre-voted'        : 1,
			'was-discussed-1'      : 2,
			'was-knesset-proposed' : 3,
			'was-first-voted'      : 4,
			'was-discussed-2'      : 5,
			'was-approval-voted'   : 6 
		};
		
		for (var p in phases) phases[phases[p]] = p;
		
		var phasesArr = ['was-proposed', 'was-pre-voted', 'was-discussed-1', 'was-first-voted', 'was-discussed-2', 'was-approval-voted'];
		
	    formatDate = function(d) {

	    var curr_date = d.getDate();
	    var curr_month = d.getMonth() + 1; //months are zero based
	    var curr_year = d.getFullYear();
	    return curr_date + "/" + curr_month + "/" + curr_year
	    };

//adds explanation from 'Proposal.get_explanation' to header
function showExplanation() {

    try {
	$.get('/api/bill/' + {{ bill.id }}, function(data){

	    if (data.votes.first) {
	    $('#vote-1 .scale .against').css('backgroundPosition', ((data.votes.first.count_for_votes * 120) / (data.votes.first.count_for_votes + data.votes.first.count_against_votes)) + 'px bottom');
	    $('#vote-1 .scale .against').css('width', ((data.votes.first.count_for_votes * 120) / (data.votes.first.count_for_votes + data.votes.first.count_against_votes) - 120) + 'px');
	    }
	    if (data.votes.pre && data.votes.pre.length > 0) {
	    var lastpre = data.votes.pre[data.votes.pre.length - 1];
	    $('#pre-vote .scale .against').css('backgroundPosition',((lastpre.count_for_votes * 120) / (lastpre.count_for_votes + lastpre.count_against_votes)) + 'px bottom');
	    $('#pre-vote .scale .against').css('width', ((lastpre.count_for_votes * 120) / (lastpre.count_for_votes + lastpre.count_against_votes) - 120) + 'px');
	    }
	    if (data.popular_name){
	    $('#title h1').text(data.popular_name + ' - ' + $('#title h1').text())
	    }



		  var dlg = $('#explanation');<commit_msg>Its 6 AM red/green, popname changes<commit_after><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" >
	<meta http-equiv="Content-Language" content="{{ LANGUAGE_CODE }}">
	<script type="text/javascript" src="{{MEDIA_URL}}js/jquery.min.js"></script>
	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script>
	<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/base/jquery-ui.css" type="text/css"/>
	<link rel="stylesheet" href="{{MEDIA_URL}}css/embed_bill.css" type="text/css"/>

	
	<script type="text/javascript">
	  var log;
	  
	  if (window.console && typeof console.log === "function"){
	  // use apply to preserve context and invocations with multiple arguments
	  log = function () { console.log.apply(console, arguments); };
	  } else {
	  log = function(){ return; }
	  }

/*
states:
	1. initiated ("was-proposed")
	2. pre-vote ("pre-voted")
	3. summoned-1 
	4. commity-1
	5. vote-1 ("first-voted")
	6. summoned-2
	7. commity-2
	8. vote-2 ("second-voted")
	9. vote-3 ("approval-voted")
	10. passed ("approval-voted" == true)
	
stream example:
  { "note": "True/False/..." 
	"verb": "was-proposed/pre-voted/first-voted/approval-voted/was-discussed/was-voted-on-gov",
	"target": "/vote/xxxx/",
	"time": 1279717260 }
		
*/

/*
 * TODO (summary):
 *   1. bill abstract
 * √ 2. links
 * √ 3. bill title - bill.law.title VS. bill.title
 * √ 4. status
 *   6. dates - done for votes. what about future estimations?
 * √ 7. phase backgrounds
 *   8. active phase
 *   9. link "?" - try to do the expand if possible
 *  10. scale for votes - where to get the data? 
 * √11. what about DUPLICATIONS? go chronologically from the end. all the rest is history
 * √12. expand with jQuery UI on click on little arrow in pull DIV
 */ 
 
 /*
  * 
  * <li id="vote-1" class="passed/failed/pending voted odd current first/last">
  */
			
		var expanded = false;
		var stream = {{stream|safe}};
		var phases = {
			'was-proposed'         : 0,
			'was-pre-voted'        : 1,
			'was-discussed-1'      : 2,
			'was-knesset-proposed' : 3,
			'was-first-voted'      : 4,
			'was-discussed-2'      : 5,
			'was-approval-voted'   : 6 
		};
		
		for (var p in phases) phases[phases[p]] = p;
		
		var phasesArr = ['was-proposed', 'was-pre-voted', 'was-discussed-1', 'was-first-voted', 'was-discussed-2', 'was-approval-voted'];
		
	    formatDate = function(d) {

	    var curr_date = d.getDate();
	    var curr_month = d.getMonth() + 1; //months are zero based
	    var curr_year = d.getFullYear();
	    return curr_date + "/" + curr_month + "/" + curr_year
	    };

//adds explanation from 'Proposal.get_explanation' to header
function showExplanation() {

    try {
	$.get('/api/bill/' + {{ bill.id }}, function(data){

	    if (data.votes.first) {
	    $('#vote-1 .scale .against').css('width', (data.votes.first.count_against_votes * 120) / (data.votes.first.count_for_votes + data.votes.first.count_against_votes) + 'px');
	    $('#vote-1 .scale .against').css('backgroundPosition', ((data.votes.first.count_against_votes * 120) / (data.votes.first.count_for_votes + data.votes.first.count_against_votes) - 120) + 'px bottom');
	    }
	    if (data.votes.pre && data.votes.pre.length > 0) {
	    var lastpre = data.votes.pre[data.votes.pre.length - 1];
	    $('#pre-vote .scale .against').css('width', (lastpre.count_against_votes * 120) / (lastpre.count_for_votes + lastpre.count_against_votes) + 'px');
	    $('#pre-vote .scale .against').css('backgroundPosition', ((lastpre.count_against_votes * 120) / (lastpre.count_for_votes + lastpre.count_against_votes) - 120) + 'px bottom');
	    }
	    if (data.popular_name){
	    $('#title h1').text(data.popular_name + ' - ' + $('#title h1').text())
	    }



		  var dlg = $('#explanation');
{'fraction_non_alphanumeric': 0.18468863550933468, 'fraction_numerical': 0.024934218769577746, 'mean_word_length': 3.1790575916230366, 'pattern_counts': {'":': 8, '<': 29, '<?xml version=': 0, '>': 31, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, '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': '7551757', 'n_tokens_mistral': 3224, 'n_tokens_neox': 2893, 'n_words': 621}