<commit_before>﻿@model StackExchange.DataExplorer.ViewModel.QueryViewerData
@using StackExchange.DataExplorer
@using StackExchange.DataExplorer.Models
@{
    Layout = "~/Views/Shared/Query.cshtml";
    this.SetPageTitle(Model.Revision.QuerySet.Title + " - Stack Exchange Data Explorer");

    var querySet = Model.Revision.QuerySet;
    var initialRevision = querySet.InitialRevision;
    var currentRevision = Model.Revision;
}

@section Metadata
{
    @Html.Partial("QueryVoting", Model.QuerySetVoting)
    <p class='description'>@Model.Revision.QuerySet.Description</p>
}

@helper UserSignature(User user, DateTime date, bool isEdit, bool isOwner)
{
<div class="user-info@(isOwner && !isEdit?" owner":"")">
    <div class="user-action-time">@(isEdit?"edited":"created") @date.ToRelativeTimeSpanMicro()</div>
    @if ((isOwner && !isEdit) || !isOwner)
    { 
        <div class="user-gravatar32"><a href="/users/@user.Id">@Html.Raw(user.Gravatar(32))</a>
            @if (user.IsAnonymous == null)
            { 
                <span>anonymous</span>
            }
            else
            { 
                <a href="/users/@user.Id">@user.Login</a>
            }
        </div>
    }
</div>
}

<pre id="queryBodyText" class="cm-s-default"><code>@Model.Revision.Query.QueryBody</code></pre>

<table class="fw"><commit_msg>Made sure the Gravatar isn't a link when the creating user is anonymous<commit_after>﻿@model StackExchange.DataExplorer.ViewModel.QueryViewerData
@using StackExchange.DataExplorer
@using StackExchange.DataExplorer.Models
@{
    Layout = "~/Views/Shared/Query.cshtml";
    this.SetPageTitle(Model.Revision.QuerySet.Title + " - Stack Exchange Data Explorer");

    var querySet = Model.Revision.QuerySet;
    var initialRevision = querySet.InitialRevision;
    var currentRevision = Model.Revision;
}

@section Metadata
{
    @Html.Partial("QueryVoting", Model.QuerySetVoting)
    <p class='description'>@Model.Revision.QuerySet.Description</p>
}

@helper UserSignature(User user, DateTime date, bool isEdit, bool isOwner)
{
<div class="user-info@(isOwner && !isEdit?" owner":"")">
    <div class="user-action-time">@(isEdit?"edited":"created") @date.ToRelativeTimeSpanMicro()</div>
    @if ((isOwner && !isEdit) || !isOwner)
    { 
        <div class="user-gravatar32">
            @if (user.IsAnonymous)
            { 
                @Html.Raw(user.Gravatar(32))
                <span>anonymous</span>
            }
            else
            { 
                <a href="/users/@<EMAIL>">@Html.Raw(user.Gravatar(32))</a>
                <a href="/users/@<EMAIL>">@user.Login</a>
            }
        </div>
    }
</div>
}

<pre id="queryBodyText" class="cm-s-default"><code>@Model.Revision.Query.QueryBody</code></pre>

<table class="fw">
{'fraction_non_alphanumeric': 0.16017316017316016, 'fraction_numerical': 0.0036075036075036075, 'mean_word_length': 3.1449925261584455, 'pattern_counts': {'":': 4, '<': 43, '<?xml version=': 0, '>': 43, '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': '4262089', 'n_tokens_mistral': 928, 'n_tokens_neox': 858, 'n_words': 142}