<commit_before>$def with (corp, pol, contributions)

$var width: 80%
$var color: white

$ c = contributions[0]
$var title: Contributions from $corp.title() to $c.firstname $c.lastname

<h1>Contributions from employees of <a href="/empl/$corp">$corp.title()</a> to <a href="/p/$pol">$c.firstname $c.lastname</a></h1>

<table class="structure" width=100%>
<tr>
    <th>Amount</th>
    <th>Year</th>
</tr>

$for c in contributions:
	<tr class="$loop.parity">
	    <td>\$$commify(c.amount)</td>
	    <td>$int(c.year)</td>
	</tr>
</table>
<commit_msg>aviod crash when no contributions are there<commit_after>$def with (corp, pol, contributions)

$var width: 80%
$var color: white

$if not contributions:
    $var title: Contributions from $corp.title() to $pol.replace('_', ' ').title()
    <h2>No contributions from <a href="/empl/$corp">$corp.title()</a> to <a href="/p/$pol">$pol.replace('_', ' ').title()</a></h2>
$else:
    $ c = contributions[0]
    $var title: Contributions from $corp.title() to $c.firstname $c.lastname
    
    <h1>Contributions from employees of <a href="/empl/$corp">$corp.title()</a> to <a href="/p/$pol">$c.firstname $c.lastname</a></h1>
    
    <table class="structure" width=100%>
    <tr>
        <th>Amount</th>
        <th>Year</th>
    </tr>
    
    $for c in contributions:
    	<tr class="$loop.parity">
    	    <td>\$$commify(c.amount)</td>
    	    <td>$int(c.year)</td>
    	</tr>
    </table>

{'fraction_non_alphanumeric': 0.2112970711297071, 'fraction_numerical': 0.012552301255230125, 'mean_word_length': 3.526813880126183, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 0, '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': '4124516', 'n_tokens_mistral': 565, 'n_tokens_neox': 530, 'n_words': 123}