<commit_before><div style="margin-top: 20px">
    <div class="col-xs-offset-2">
        <div ng-if="search.results.total != 0">
            <div class="row">
                <h4>Showing top {{search.results.hits.length}} matches of {{search.results.total}} found.</h4>
            </div>
            <div ng-repeat="hit in search.results.hits" class="row" style="margin-top: 20px">
                <div ng-switch="hit._source._type">
                    <div ng-switch-when="datafile">
                        <span>
                            <b>{{$index+1}}. </b>
                            <i class="fa fa-files-o fa-fw" style="color: #9F88C1;"></i>
                            <a ng-click="search.openFile(hit._source)">{{hit._source.name}}</a>
                            {{hit._source.mediatype.mime}}
                        </span>
                        <span class="row">Path: {{hit._source.path}}</span>

                        <div ng-if="search.isImage(hit._source.mediatype.mime)">
                            <a ng-click="search.openFile(hit._source)">
                                <img class="img-thumbnail" height="140" width="140"
                                     ng-src="{{search.fileSrc(hit._source.id)}}">
                            </a>
                        </div>
                        <div ng-if="hit._source.contents.length !== 0">
                            <p>{{hit._source.contents | truncate:75:'...':true}}</p>
                        </div>
                    </div>
                    <div ng-switch-when="sample">
                        Show sample
                    </div>
                    <div ng-switch-when="process">
                        Show process
                    </div>
                </div>
            </div>
        </div>
        <div ng-if="search.results.total === 0">
            <h4 class="center">No Matches Found</h4>
        </div>
    </div>
</div><commit_msg>Support showing samples.<commit_after><div style="margin-top: 20px">
    <div class="col-xs-offset-2">
        <div ng-if="search.results.total != 0">
            <div class="row">
                <h4>Showing top {{search.results.hits.length}} matches of {{search.results.total}} found.</h4>
            </div>
            <div ng-repeat="hit in search.results.hits" class="row" style="margin-top: 20px">
                <div ng-switch="hit._source._type">
                    <div ng-switch-when="datafile">
                        <span>
                            <b>{{$index+1}}. </b>
                            <i class="fa fa-files-o fa-fw" style="color: #9F88C1;"></i>
                            <a ng-click="search.openFile(hit._source)">{{hit._source.name}}</a>
                            {{hit._source.mediatype.mime}}
                        </span>
                        <span class="row">Path: {{hit._source.path}}</span>

                        <div ng-if="search.isImage(hit._source.mediatype.mime)">
                            <a ng-click="search.openFile(hit._source)">
                                <img class="img-thumbnail" height="140" width="140"
                                     ng-src="{{search.fileSrc(hit._source.id)}}">
                            </a>
                        </div>
                        <div ng-if="hit._source.contents.length !== 0">
                            <p>{{hit._source.contents | truncate:75:'...':true}}</p>
                        </div>
                    </div>
                    <div ng-switch-when="sample">
                        <span>
                            <b>{{$index+1}}.</b>
                            <i class="fa fa-fw fa-cubes" style="color: #f0ad4e;"></i>
                            <a ui-sref="projects.project.samples.edit({sample_id: hit._source.sample_id})">{{hit._source.name}}</a>
                        </span>

                        <div class="row">
                            <span>
                                <a ui-sref="projects.project.samples.edit({sample_id: hit._source.sample_id})">
                                    <img ng-repeat="image in search.images(hit._source.files)| first:3"
                                         class="img-thumbnail" height="140" width="140"
                                         ng-src={{search.fileSrc(image.datafile_id)}}>
                                </a>
                            </span>
                        </div>
                    </div>
                    <div ng-switch-when="process">
                        Show process
                    </div>
                </div>
            </div>
        </div>
        <div ng-if="search.results.total === 0">
            <h4 class="center">No Matches Found</h4>
        </div>
    </div>
</div>
{'fraction_non_alphanumeric': 0.15542521994134897, 'fraction_numerical': 0.012568077084206116, 'mean_word_length': 1.067994802944998, 'pattern_counts': {'":': 0, '<': 104, '<?xml version=': 0, '>': 104, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '371053', 'n_tokens_mistral': 1337, 'n_tokens_neox': 1233, 'n_words': 201}