<commit_before>var mongoose = require('mongoose');
mongoose.connect(process.env.MONGO_URL);

var BotSchema = mongoose.Schema({
  name: {type: String, default: '', unique: true},
  runs: {type: Number, default: 0},
  owner: Object,
  code: {type: String, default: ''}
});

var Bot = mongoose.model('Bot', BotSchema);

mongoose.connection.on('error', console.error.bind(console, 'connection error:'));

var bot = new Bot({name: 'default', code: "var Bot = require('bot').Bot;\nvar helpers = require('bot').helpers;\n\nvar bot = new Bot('YOUR_KEY_HERE', 'training');"});

Bot.count({}).exec().then(function(c) {
  if(c < 1) {
    bot.save();
  }
}).then(null, function(err) {
  console.log(err);
});<commit_msg>make it correspond with index.js<commit_after>var mongoose = require('mongoose');
mongoose.connect(process.env.MONGO_URL);

var BotSchema = mongoose.Schema({
  name: {type: String, default: '', unique: true},
  runs: {type: Number, default: 0},
  owner: Object,
  code: {type: String, default: ''}
});

var Bot = mongoose.model('Bot', BotSchema);

mongoose.connection.on('error', console.error.bind(console, 'connection error:'));

var bot = new Bot({name: 'default', code: "var Bot = require('bot');\n\nvar bot = new Bot('YOUR_KEY_HERE', 'training');\nvar helpers = bot.helpers;"});

Bot.count({}).exec().then(function(c) {
  if(c < 1) {
    bot.save();
  }
}).then(null, function(err) {
  console.log(err);
});
{'fraction_non_alphanumeric': 0.2084507042253521, 'fraction_numerical': 0.0028169014084507044, 'mean_word_length': 5.205240174672489, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '3640358', 'n_tokens_mistral': 500, 'n_tokens_neox': 508, 'n_words': 112}