<commit_before><div class="overlay database-overlay" ng-class="{true: 'sr-only', false: ''}[activeDataset.data]"></div>

<ul class="nav navbar-nav overlay-above">
    <li class="dropdown">
    <a data-toggle="dropdown" ng-bind="activeDataset.name" class="dropdown-toggle primary" href="#" ng-click="activeDataset.info = 'sr-only'"><b class="caret"></b></a>
    <ul class="dropdown-menu">
        <li ng-repeat="dataset in datasets" ng-class="{true: 'active', false: ''}[dataset.name == activeDataset.name]">
        <a href="#" ng-click="connectToPreset($index)" ng-bind="dataset.name"></a>
        </li>

        <li class="divider" ng-hide="hideAdvancedOptions"></li>

        <li ng-class="{true: 'active', false: ''}[activeDataset.custom || !(datasets.length > 0)]" ng-hide="hideAdvancedOptions">
        <a data-toggle="modal" href="#customConnectionModal" ng-click="selectCustom()">Custom...</a>
        </li>
    </ul>
    </li>

    <div class="popover fade bottom in {{activeDataset.info}}" style="display: block; top: 51px;">
        <div class="arrow"></div>
        <h3 class="popover-title">Start here!</h3>
        <div class="popover-content">
            <p>Please select a dataset from the menu or create your own custom dataset.</p>
        </div>
    </div>
</ul>

<div class="modal fade neon-popup" id="customConnectionModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="customConnectionModalLabel">Custom Dataset</h4>
            </div>

            <div class="modal-body">
                <div class="neon-well neon-well-dark">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label>Dataset Name</label>
                                <input type="text" class="form-control" ng-class="{true: '', false: 'ng-invalid'}[datasetNameIsValid]" ng-model="datasetName" ng-change="validateDatasetName()">
                            </div>
                        </div>

                        <div class="col-md-6">
                            <div class="form-group no-margin">
                                <label class="bottom text-danger" ng-bind="datasetNameIsValid ? '' : 'Please enter a unique name.'"></label>
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label>Datastore Type</label>
                                <select class="form-control" ng-model="datastoreType">
                                    <option value="mongo">Mongo</option>
                                    <option value="sparksql">Spark SQL</option>
                                </select>
                            </div>
                        </div>

                        <div class="col-md-6">
                            <div class="form-group">
                                <label>Datastore Host Name</label>
                                <div class="input-group">
                                    <input class="form-control" type="text" ng-model="datastoreHost" ng-change="changeHost()"/>
                                    <span class="input-group-btn">
                                        <button class="btn btn-default" ng-click="connectToServer()" ng-bind="isConnected ? 'Connected' : 'Connect'" ng-disabled="(isConnected)"></button>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="neon-well neon-well-dark" ng-repeat="customDatabase in customDatabases">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label>Database</label>
                                <select class="form-control" ng-change="selectDatabase(customDatabase)" ng-model="customDatabase.database" ng-disabled="(databases.length == 0)" ng-options="database.name for database in databases">
                                    <option value="">Select Database</option>
                                </select>
                            </div>
                        </div>

                        <div class="col-md-6">
                            <div class="form-group no-margin">
                                <label>&nbsp;</label>
                                <button class="btn btn-default form-control" ng-click="removeCustomDatabase($index)" ng-hide="($index == 0)">Remove Database</button>
                            </div>
                        </div>
                    </div>

                    <div class="neon-well" ng-repeat="customTable in customDatabase.customTables">
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Table</label>
                                    <select class="form-control" ng-change="selectTable(customTable)" ng-model="customTable.table" ng-disabled="(!customDatabase.database.name || customDatabase.tables.length == 0)" ng-options="table.name for table in customDatabase.database.tables">
                                        <option value="">Select Table</option>
                                    </select>
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group no-margin">
                                    <label>&nbsp;</label>
                                    <button class="btn btn-default form-control" ng-click="removeCustomTable(customDatabase, $index)" ng-hide="($index == 0)">Remove Table</button>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Latitude Field</label>
                                    <select class="form-control" ng-change="selectMapping('latitude', customTable.latitude)" ng-model="customTable.latitude" ng-disabled="(!customDatabase.database.name || !customTable.table.name || customTable.table.fields.length == 0)" ng-options="field.prettyName for field in customTable.table.fields">
                                        <option value="">None</option>
                                    </select>
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Longitude Field</label>
                                    <select class="form-control" ng-change="selectMapping('longitude', customTable.longitude)" ng-model="customTable.longitude" ng-disabled="(!customDatabase.database.name || !customTable.table.name || customTable.table.fields.length == 0)" ng-options="field.prettyName for field in customTable.table.fields">
                                        <option value="">None</option>
                                    </select>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Date Field</label>
                                    <select class="form-control" ng-change="selectMapping('date', customTable.date)" ng-model="customTable.date" ng-disabled="(!customDatabase.database.name || !customTable.table.name || customTable.table.fields.length == 0)" ng-options="field.prettyName for field in customTable.table.fields">
                                        <option value="">None</option>
                                    </select>
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Hashtag Field</label>
                                    <select class="form-control" ng-change="selectMapping('hashtag', customTable.date)" ng-model="customTable.tags" ng-disabled="(!customDatabase.database.name || !customTable.table.name || customTable.table.fields.length == 0)" ng-options="field.prettyName for field in customTable.table.fields">
                                        <option value="">None</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group no-margin">
                                <button class="btn btn-default form-control" ng-click="addNewCustomTable(customDatabase)" ng-disabled="(customDatabase.database.tables.length == 0)">Add Table</button>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <button class="btn btn-default form-control" ng-click="addNewCustomDatabase()" ng-disabled="(databases.length == 0)">Add Database</button>
                        </div>
                    </div>
                </div>

                <div class="neon-well neon-well-dark" ng-repeat="customRelation in customRelations">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="top">Relation</label>
                            </div>
                        </div>

                        <div class="col-md-6">
                            <div class="form-group">
                                <button class="btn btn-default form-control" ng-click="removeCustomRelation($index)">Remove Relation</button>
                            </div>
                        </div>
                    </div>

                    <div class="neon-well" ng-repeat="customRelationDatabase in customRelation.customRelationDatabases">
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Database</label>
                                    <select class="form-control" ng-change="selectRelationDatabase(customRelationDatabase)" ng-model="customRelationDatabase.database" ng-disabled="(databases.length == 0)" ng-options="database.name for database in databases">
                                        <option value="">Select Database</option>
                                    </select>
                                </div>
                            </div>

                            <div class="col-md-4">
                                <div class="form-group">
                                    <label>&nbsp;</label>
                                    <button class="btn btn-default form-control" ng-click="removeCustomRelationDatabase(customRelation, $index)" ng-hide="($index == 0)">Remove Database</button>
                                </div>
                            </div>
                        </div>

                        <div class="neon-well neon-well-dark" ng-repeat="customRelationTable in customRelationDatabase.customRelationTables">
                            <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>Table</label>
                                        <select class="form-control" ng-change="selectRelationTable(customRelationTable)" ng-model="customRelationTable.table" ng-disabled="(!customRelationDatabase.database.name || customRelationDatabase.tables.length == 0)" ng-options="table.name for table in customRelationDatabase.database.tables">
                                            <option value="">Select Table</option>
                                        </select>
                                    </div>
                                </div>

                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>Field</label>
                                        <select class="form-control" ng-change="selectRelationField(customRelationTable)" ng-model="customRelationTable.field" ng-disabled="(!customRelationDatabase.database.name || !customRelationTable.table.name || customRelationTable.table.fields.length == 0)" ng-options="field.prettyName for field in customRelationTable.table.fields">
                                            <option value="">Select Field</option>
                                        </select>
                                    </div>
                                </div>
                            </div>

                            <div class="row" ng-hide="($index == 0)">
                                <div class="col-md-6">
                                    <div class="form-group no-margin">
                                        <button class="btn btn-default form-control" ng-click="removeCustomRelationTable(customRelationDatabase, $index)">Remove Table</button>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group no-margin">
                                    <button class="btn btn-default form-control" ng-click="addNewCustomRelationTable(customRelationDatabase)" ng-disabled="(customRelationDatabase.database.tables.length == 0)">Add Table</button>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group no-margin">
                                <button class="btn btn-default form-control" ng-click="addNewCustomRelationDatabase(customRelation)" ng-disabled="(databases.length == 0)">Add Database</button>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <button class="btn btn-default form-control" ng-click="addNewCustomRelation()" ng-disabled="(databases.length == 0)">Add Relation</button>
                        </div>
                    </div>
                </div>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-default" ng-click="resetCustomDataset()">Reset</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal" ng-disabled="(customDatabases.length == 0 || !datasetNameIsValid)" ng-click="setDataset()">Done</button>
            </div>
        </div>
    </div>
</div>
<commit_msg>Adding elasticsearch to the database type menu<commit_after><div class="overlay database-overlay" ng-class="{true: 'sr-only', false: ''}[activeDataset.data]"></div>

<ul class="nav navbar-nav overlay-above">
    <li class="dropdown">
    <a data-toggle="dropdown" ng-bind="activeDataset.name" class="dropdown-toggle primary" href="#" ng-click="activeDataset.info = 'sr-only'"><b class="caret"></b></a>
    <ul class="dropdown-menu">
        <li ng-repeat="dataset in datasets" ng-class="{true: 'active', false: ''}[dataset.name == activeDataset.name]">
        <a href="#" ng-click="connectToPreset($index)" ng-bind="dataset.name"></a>
        </li>

        <li class="divider" ng-hide="hideAdvancedOptions"></li>

        <li ng-class="{true: 'active', false: ''}[activeDataset.custom || !(datasets.length > 0)]" ng-hide="hideAdvancedOptions">
        <a data-toggle="modal" href="#customConnectionModal" ng-click="selectCustom()">Custom...</a>
        </li>
    </ul>
    </li>

    <div class="popover fade bottom in {{activeDataset.info}}" style="display: block; top: 51px;">
        <div class="arrow"></div>
        <h3 class="popover-title">Start here!</h3>
        <div class="popover-content">
            <p>Please select a dataset from the menu or create your own custom dataset.</p>
        </div>
    </div>
</ul>

<div class="modal fade neon-popup" id="customConnectionModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="customConnectionModalLabel">Custom Dataset</h4>
            </div>

            <div class="modal-body">
                <div class="neon-well neon-well-dark">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label>Dataset Name</label>
                                <input type="text" class="form-control" ng-class="{true: '', false: 'ng-invalid'}[datasetNameIsValid]" ng-model="datasetName" ng-change="validateDatasetName()">
                            </div>
                        </div>

                        <div class="col-md-6">
                            <div class="form-group no-margin">
                                <label class="bottom text-danger" ng-bind="datasetNameIsValid ? '' : 'Please enter a unique name.'"></label>
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label>Datastore Type</label>
                                <select class="form-control" ng-model="datastoreType">
                                    <option value="mongo">Mongo</option>
                                    <option value="sparksql">Spark SQL</option>
                                    <option value="elasticsearch">Elasticsearch</option>
                                </select>
                            </div>
                        </div>

                        <div class="col-md-6">
                            <div class="form-group">
                                <label>Datastore Host Name</label>
                                <div class="input-group">
                                    <input class="form-control" type="text" ng-model="datastoreHost" ng-change="changeHost()"/>
                                    <span class="input-group-btn">
                                        <button class="btn btn-default" ng-click="connectToServer()" ng-bind="isConnected ? 'Connected' : 'Connect'" ng-disabled="(isConnected)"></button>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="neon-well neon-well-dark" ng-repeat="customDatabase in customDatabases">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label>Database</label>
                                <select class="form-control" ng-change="selectDatabase(customDatabase)" ng-model="customDatabase.database" ng-disabled="(databases.length == 0)" ng-options="database.name for database in databases">
                                    <option value="">Select Database</option>
                                </select>
                            </div>
                        </div>

                        <div class="col-md-6">
                            <div class="form-group no-margin">
                                <label>&nbsp;</label>
                                <button class="btn btn-default form-control" ng-click="removeCustomDatabase($index)" ng-hide="($index == 0)">Remove Database</button>
                            </div>
                        </div>
                    </div>

                    <div class="neon-well" ng-repeat="customTable in customDatabase.customTables">
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Table</label>
                                    <select class="form-control" ng-change="selectTable(customTable)" ng-model="customTable.table" ng-disabled="(!customDatabase.database.name || customDatabase.tables.length == 0)" ng-options="table.name for table in customDatabase.database.tables">
                                        <option value="">Select Table</option>
                                    </select>
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group no-margin">
                                    <label>&nbsp;</label>
                                    <button class="btn btn-default form-control" ng-click="removeCustomTable(customDatabase, $index)" ng-hide="($index == 0)">Remove Table</button>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Latitude Field</label>
                                    <select class="form-control" ng-change="selectMapping('latitude', customTable.latitude)" ng-model="customTable.latitude" ng-disabled="(!customDatabase.database.name || !customTable.table.name || customTable.table.fields.length == 0)" ng-options="field.prettyName for field in customTable.table.fields">
                                        <option value="">None</option>
                                    </select>
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Longitude Field</label>
                                    <select class="form-control" ng-change="selectMapping('longitude', customTable.longitude)" ng-model="customTable.longitude" ng-disabled="(!customDatabase.database.name || !customTable.table.name || customTable.table.fields.length == 0)" ng-options="field.prettyName for field in customTable.table.fields">
                                        <option value="">None</option>
                                    </select>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Date Field</label>
                                    <select class="form-control" ng-change="selectMapping('date', customTable.date)" ng-model="customTable.date" ng-disabled="(!customDatabase.database.name || !customTable.table.name || customTable.table.fields.length == 0)" ng-options="field.prettyName for field in customTable.table.fields">
                                        <option value="">None</option>
                                    </select>
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Hashtag Field</label>
                                    <select class="form-control" ng-change="selectMapping('hashtag', customTable.date)" ng-model="customTable.tags" ng-disabled="(!customDatabase.database.name || !customTable.table.name || customTable.table.fields.length == 0)" ng-options="field.prettyName for field in customTable.table.fields">
                                        <option value="">None</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group no-margin">
                                <button class="btn btn-default form-control" ng-click="addNewCustomTable(customDatabase)" ng-disabled="(customDatabase.database.tables.length == 0)">Add Table</button>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <button class="btn btn-default form-control" ng-click="addNewCustomDatabase()" ng-disabled="(databases.length == 0)">Add Database</button>
                        </div>
                    </div>
                </div>

                <div class="neon-well neon-well-dark" ng-repeat="customRelation in customRelations">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="top">Relation</label>
                            </div>
                        </div>

                        <div class="col-md-6">
                            <div class="form-group">
                                <button class="btn btn-default form-control" ng-click="removeCustomRelation($index)">Remove Relation</button>
                            </div>
                        </div>
                    </div>

                    <div class="neon-well" ng-repeat="customRelationDatabase in customRelation.customRelationDatabases">
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>Database</label>
                                    <select class="form-control" ng-change="selectRelationDatabase(customRelationDatabase)" ng-model="customRelationDatabase.database" ng-disabled="(databases.length == 0)" ng-options="database.name for database in databases">
                                        <option value="">Select Database</option>
                                    </select>
                                </div>
                            </div>

                            <div class="col-md-4">
                                <div class="form-group">
                                    <label>&nbsp;</label>
                                    <button class="btn btn-default form-control" ng-click="removeCustomRelationDatabase(customRelation, $index)" ng-hide="($index == 0)">Remove Database</button>
                                </div>
                            </div>
                        </div>

                        <div class="neon-well neon-well-dark" ng-repeat="customRelationTable in customRelationDatabase.customRelationTables">
                            <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>Table</label>
                                        <select class="form-control" ng-change="selectRelationTable(customRelationTable)" ng-model="customRelationTable.table" ng-disabled="(!customRelationDatabase.database.name || customRelationDatabase.tables.length == 0)" ng-options="table.name for table in customRelationDatabase.database.tables">
                                            <option value="">Select Table</option>
                                        </select>
                                    </div>
                                </div>

                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>Field</label>
                                        <select class="form-control" ng-change="selectRelationField(customRelationTable)" ng-model="customRelationTable.field" ng-disabled="(!customRelationDatabase.database.name || !customRelationTable.table.name || customRelationTable.table.fields.length == 0)" ng-options="field.prettyName for field in customRelationTable.table.fields">
                                            <option value="">Select Field</option>
                                        </select>
                                    </div>
                                </div>
                            </div>

                            <div class="row" ng-hide="($index == 0)">
                                <div class="col-md-6">
                                    <div class="form-group no-margin">
                                        <button class="btn btn-default form-control" ng-click="removeCustomRelationTable(customRelationDatabase, $index)">Remove Table</button>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group no-margin">
                                    <button class="btn btn-default form-control" ng-click="addNewCustomRelationTable(customRelationDatabase)" ng-disabled="(customRelationDatabase.database.tables.length == 0)">Add Table</button>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group no-margin">
                                <button class="btn btn-default form-control" ng-click="addNewCustomRelationDatabase(customRelation)" ng-disabled="(databases.length == 0)">Add Database</button>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <button class="btn btn-default form-control" ng-click="addNewCustomRelation()" ng-disabled="(databases.length == 0)">Add Relation</button>
                        </div>
                    </div>
                </div>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-default" ng-click="resetCustomDataset()">Reset</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal" ng-disabled="(customDatabases.length == 0 || !datasetNameIsValid)" ng-click="setDataset()">Done</button>
            </div>
        </div>
    </div>
</div>

{'fraction_non_alphanumeric': 0.1275241708481214, 'fraction_numerical': 0.0031207930485864645, 'mean_word_length': 1.1851183313277176, 'pattern_counts': {'":': 0, '<': 597, '<?xml version=': 0, '>': 599, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 113, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5889591', 'n_tokens_mistral': 7768, 'n_tokens_neox': 7285, 'n_words': 1354}