<commit_before>import _ from 'lodash';
import uuid from 'uuid';
import mongoose from 'mongoose';
import async from 'async';
import objectId from 'libs/objectId';
import errors from 'libs/errors';

const SUBMISSIONS_PER_PAGE = 50;

export default () => {
  const SubmissionSchema = new mongoose.Schema({
    user: { type: mongoose.Schema.Types.ObjectId, ref: 'User' },
    version: Number,  // nth submission of this user
    code: String,
    exeBlob: mongoose.Schema.Types.ObjectId,  // grid fs
    status: String,<commit_msg>grumble<commit_after>import _ from 'lodash';
import uuid from 'uuid';
import mongoose from 'mongoose';
import async from 'async';
import objectId from 'libs/objectId';
import errors from 'libs/errors';

export default () => {
  const SubmissionSchema = new mongoose.Schema({
    user: { type: mongoose.Schema.Types.ObjectId, ref: 'User' },
    version: Number,  // nth submission of this user
    code: String,
    exeBlob: mongoose.Schema.Types.ObjectId,  // grid fs
    status: String,
{'fraction_non_alphanumeric': 0.11834319526627218, 'fraction_numerical': 0.0019723865877712033, 'mean_word_length': 4.178571428571429, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '206165', 'n_tokens_mistral': 318, 'n_tokens_neox': 319, 'n_words': 100}