<commit_before>﻿@model MoviePicker.WebApp.Models.PicksViewModel

@{
	ViewBag.Title = "Picks";
}

<h2>@ViewBag.Title</h2>
<h5>weekend ending @Model.Miners.First().Movies.First().WeekendEnding.ToShortDateString()</h5>

<table class="table">
	<thead>
		<tr><th>Miner Weights</th></tr>
		<tr>
			@foreach (var miner in Model.Miners)
			{
				<th>
					@miner.Abbreviation
				</th>
			}
		</tr>

	</thead>
	<tbody>
		<tr>
			@foreach (var miner in Model.Miners)
			{
				<td>
					@if (miner.Movies?.Count > 0)
				{
						<a href="@Model.GetFMLNerdLink(miner)" class="btn btn-info btn-sm">Analyze</a>
				}
				</td>
			}
		</tr>
		<tr>
			@foreach (var miner in Model.Miners)
			{
				<th>
					@miner.Weight
				</th>
			}
		</tr>
	</tbody>
</table>

<div class="row">
	<div class="col-lg-6">

		<div class="col-sm-3">
			<h4>Bonus is ON</h4>
		</div>

		@Html.Partial("MovieList", Model.MovieList)
	</div>

	<div class="col-lg-6">
		<div class="col-sm-3">
			<h4>Bonus is OFF</h4>
		</div>

		@Html.Partial("MovieList", Model.MovieListBonusOff)
	</div>
</div>

<h4>Box Office Weighted Averages <a href="@Model.GetFMLNerdLink()" class="btn btn-info btn-sm">Analyze</a></h4>

<div class="row">
	<div class="col-lg-12">

		<table class="table table-striped">
			<thead>
				<tr>
					<th>BUX</th>
					<th>Name</th>
					<th>Earnings</th>
					<th>Efficiency</th>
					<th>Rank</th>
					<th>Bonus Earnings</th>
					<th>Difference</th>
					<th>% Difference</th>
				</tr>
			</thead>
			<tbody>
				@{
					var mostEfficient = Model.Movies.OrderByDescending(item => item.Efficiency).First();

					foreach (var movie in Model.Movies)
					{
						var rank = Model.Rank(movie);
						var rankStyle = rank <= 5 ? "text-align: right; font-weight: bold; color: #33cc33" : "text-align: right";

						<tr>
							<td style="text-align: right">@movie.Cost</td>
							<td>@movie.Name</td>
							<td style="text-align: right">@movie.Earnings.ToString("N0")</td>
							<td style="text-align: right">@movie.Efficiency.ToString("N2")</td>
							<td style="@rankStyle">@rank</td>
							<td style="text-align: right">@string.Format("{0:N2}", mostEfficient.Efficiency * movie.Cost)</td>
							<td style="text-align: right">@string.Format("{0:N2}", mostEfficient.Efficiency * movie.Cost - movie.Earnings)</td>
							<td style="@rankStyle">@string.Format("{0:N2}%", (mostEfficient.Efficiency * movie.Cost - movie.Earnings) / movie.Earnings * 100)</td>
						</tr>
					}
				}

			</tbody>


			@*Logger.WriteLine($"{index,2}. {movie.Name,-30} --  ${movie.Earnings,13:N2}  [${movie.Efficiency:N2}]"
				+ $"==> **${mostEfficient.Efficiency * movie.Cost,13:N2} "
				+ $"++ ${mostEfficient.Efficiency * movie.Cost - movie.Earnings,13:N2}  {(mostEfficient.Efficiency * movie.Cost - movie.Earnings) / movie.Earnings * 100,6:F2}%");*@

		</table>
	</div>
</div><commit_msg>Added most efficient.<commit_after>﻿@model MoviePicker.WebApp.Models.PicksViewModel

@{
	ViewBag.Title = "Picks";
}

<h2>@ViewBag.Title</h2>
<h5>weekend ending @Model.Miners.First().Movies.First().WeekendEnding.ToShortDateString()</h5>

<table class="table">
	<thead>
		<tr><th>Miner Weights</th></tr>
		<tr>
			@foreach (var miner in Model.Miners)
			{
				<th>
					@miner.Abbreviation
				</th>
			}
		</tr>

	</thead>
	<tbody>
		<tr>
			@foreach (var miner in Model.Miners)
			{
				<td>
					@if (miner.Movies?.Count > 0)
				{
						<a href="@Model.GetFMLNerdLink(miner)" class="btn btn-info btn-sm">Analyze</a>
				}
				</td>
			}
		</tr>
		<tr>
			@foreach (var miner in Model.Miners)
			{
				<th>
					@miner.Weight
				</th>
			}
		</tr>
	</tbody>
</table>

<div class="row">
	<div class="col-lg-6">

		<div class="col-sm-3">
			<h4>Bonus is ON</h4>
		</div>

		@Html.Partial("MovieList", Model.MovieList)
	</div>

	<div class="col-lg-6">
		<div class="col-sm-3">
			<h4>Bonus is OFF</h4>
		</div>

		@Html.Partial("MovieList", Model.MovieListBonusOff)
	</div>
</div>

<h4>Box Office Weighted Averages <a href="@Model.GetFMLNerdLink()" class="btn btn-info btn-sm">Analyze My Numbers</a></h4>

<div class="row">
	<div class="col-lg-12">

		<table class="table table-striped">
			<thead>
				<tr>
					<th>BUX</th>
					<th>Name</th>
					<th>Earnings</th>
					<th>Efficiency</th>
					<th>Rank</th>
					<th>Bonus Earnings</th>
					<th>Difference</th>
					<th>% Difference</th>
				</tr>
			</thead>
			<tbody>
				@{
					var mostEfficient = Model.Movies.OrderByDescending(item => item.Efficiency).First();

					foreach (var movie in Model.Movies)
					{
						var rank = Model.Rank(movie);
						var rankStyle = rank <= 5 ? "text-align: right; font-weight: bold; color: #33cc33" : "text-align: right";
						var rankStyle1 = rank == 1 ? "text-align: right; font-weight: bold; color: #33cc33" : "text-align: right";

						<tr>
							<td style="text-align: right">@movie.Cost</td>
							<td>@movie.Name</td>
							<td style="text-align: right">@movie.Earnings.ToString("N0")</td>
							<td style="@rankStyle1">@string.Format("{0}{1:N0}", rank == 1 ? "* " : string.Empty, movie.Efficiency)</td>
							<td style="@rankStyle">@rank</td>
							<td style="text-align: right">@string.Format("{0:N0}", mostEfficient.Efficiency * movie.Cost)</td>
							<td style="text-align: right">@string.Format("{0:N0}", mostEfficient.Efficiency * movie.Cost - movie.Earnings)</td>
							<td style="@rankStyle">@string.Format("{0:N2}%", (mostEfficient.Efficiency * movie.Cost - movie.Earnings) / movie.Earnings * 100)</td>
						</tr>
					}
				}
			</tbody>

			<tfoot>
				<tr>
					<td></td>
					<td></td>
					<td></td>
					<td style="font-weight: bold; color: #33cc33; text-align: right">* Most Efficient</td>
					<td style="font-weight: bold; color: #33cc33; text-align: right">Top 5</td>
					<td></td>
					<td></td>
					<td style="font-weight: bold; color: #33cc33; text-align: right">Top 5</td>
				</tr>
			</tfoot>
		</table>
	</div>
</div>
{'fraction_non_alphanumeric': 0.20881905727318803, 'fraction_numerical': 0.01824632539280284, 'mean_word_length': 3.0409556313993176, 'pattern_counts': {'":': 0, '<': 209, '<?xml version=': 0, '>': 212, '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': '4657660', 'n_tokens_mistral': 2967, 'n_tokens_neox': 2337, 'n_words': 406}