<commit_before>if (Meteor.isServer) {
  Meteor.startup(function () {
    // code to run on server at startup

    // create the necessary indexes here?
    // NOTE: The underscore before ensureIndex indicates that the function is
    //  undocumented by the Meteor Dev Group
    CommitMessages._ensureIndex( {"date" : -1} );
    CommitMessages._ensureIndex( {"sha" : 1} );
    Meteor.users._ensureIndex( {"username" : 1} );

    // refresh the commit database every 30 seconds
    Meteor.setInterval(function() {
      Meteor.call("refreshCommitsAllRepos");
    }, 60*1000);

    // show check for new announcements to show every 30 seconds
    Meteor.setInterval(function() {
      Meteor.call("showAnnouncements");
    }, 10*1000);

    // assign free mentors to hackers in the queue every 60 seconds
    Meteor.setInterval(function() {
      Meteor.call("assignMentors");
    }, 60*1000);

    // check for responses from mentors to clear their statuses
    Meteor.setInterval(function() {
      Meteor.call("checkMentorResponses");
    }, 60*1000);

    // create the admin account with a default password
    if (Meteor.users.find( {username: Meteor.settings.admin_username} ).fetch().length == 0) {
      console.log(">> admin account created");
      Accounts.createUser({
        "username": Meteor.settings.admin_username,
        "password": <PASSWORD>,
        "profile": {
          "name": "Administrator"
        }
      });

      // give the admin admin rights
      var adminUser = Meteor.users.find( {username: Meteor.settings.admin_username} ).fetch()[0];
      Roles.addUsersToRoles(adminUser, ["super","admin","flagger","mentor","announcer","manager"]);
    }


    // Prevent non-authorized users from creating new users:<commit_msg>fixed server.js to match settings.json<commit_after>if (Meteor.isServer) {
  Meteor.startup(function () {
    // code to run on server at startup

    // create the necessary indexes here?
    // NOTE: The underscore before ensureIndex indicates that the function is
    //  undocumented by the Meteor Dev Group
    CommitMessages._ensureIndex( {"date" : -1} );
    CommitMessages._ensureIndex( {"sha" : 1} );
    Meteor.users._ensureIndex( {"username" : 1} );

    // refresh the commit database every 30 seconds
    Meteor.setInterval(function() {
      Meteor.call("refreshCommitsAllRepos");
    }, 60*1000);

    // show check for new announcements to show every 30 seconds
    Meteor.setInterval(function() {
      Meteor.call("showAnnouncements");
    }, 10*1000);

    // assign free mentors to hackers in the queue every 60 seconds
    Meteor.setInterval(function() {
      Meteor.call("assignMentors");
    }, 60*1000);

    // check for responses from mentors to clear their statuses
    Meteor.setInterval(function() {
      Meteor.call("checkMentorResponses");
    }, 60*1000);

    // create the admin account with a default password
    if (Meteor.users.find( {username: Meteor.settings.default_admin_username} ).fetch().length == 0) {
      console.log(">> admin account created");
      Accounts.createUser({
        "username": Meteor.settings.default_admin_username,
        "password": <PASSWORD>,
        "profile": {
          "name": "Administrator"
        }
      });

      // give the admin admin rights
      var adminUser = Meteor.users.find( {username: Meteor.settings.default.admin_username} ).fetch()[0];
      Roles.addUsersToRoles(adminUser, ["super","admin","flagger","mentor","announcer","manager"]);
    }


    // Prevent non-authorized users from creating new users:
{'fraction_non_alphanumeric': 0.12784490025288003, 'fraction_numerical': 0.019668446192750773, 'mean_word_length': 3.1108545034642034, 'pattern_counts': {'":': 8, '<': 5, '<?xml version=': 0, '>': 9, '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': '459801', 'n_tokens_mistral': 1119, 'n_tokens_neox': 1004, 'n_words': 273}