<commit_before>var retricon = Meteor.npmRequire('retricon');

SyncedCron.add({
  name: 'Generate fake apps',
  schedule: function(parser) {
    return parser.text('every 5 seconds');
  },
  job: function() {
    var categories = _.pluck(Categories.find({}, {fields: {name: 1}}).fetch(), 'name'),
        users = _.pluck(Meteor.users.find({}, {fields: {_id: 1}}).fetch(), '_id');

    if (Apps.find().count() < 200)
      return Apps.insert({
        name: faker.company.bs(),
        category: _.sample(categories),
        description: faker.lorem.paragraph(),
        image: retricon(Random.id(), 50, 0).toDataURL(),
        approved: 1,
        author: _.sample(users),
        versions: ['0.0.1']<commit_msg>nuanced cron job to allow for non-optional spk file<commit_after>var retricon = Meteor.npmRequire('retricon');

SyncedCron.add({
  name: 'Generate fake apps',
  schedule: function(parser) {
    return parser.text('every 5 seconds');
  },
  job: function() {
    var categories = _.pluck(Categories.find({}, {fields: {name: 1}}).fetch(), 'name'),
        users = _.pluck(Meteor.users.find({}, {fields: {_id: 1}}).fetch(), '_id');

    if (Apps.find().count() < 200)
      return Apps.insert({
        name: faker.company.bs(),
        category: _.sample(categories),
        description: faker.lorem.paragraph(),
        image: retricon(Random.id(), 50, 0).toDataURL(),
        approved: 1,
        author: _.sample(users),
        versions: ['0.0.1'],
        spkLink: 'http://exampleurl.com/spkfile.spk'
{'fraction_non_alphanumeric': 0.1853562005277045, 'fraction_numerical': 0.017150395778364115, 'mean_word_length': 3.1335149863760217, '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': '871951', 'n_tokens_mistral': 523, 'n_tokens_neox': 491, 'n_words': 109}