<commit_before>var _ = require('lodash')


// this abstracts over memory allowing storage of various data
memoryManager = {

    collect: function() {
        var deleted = [];

        for(var name in Memory.creeps) {
            if(!Game.creeps[name]) {
                delete Memory.creeps[name];
                console.log('collecting non-existing creep memory:', name);
                deleted.push(name);
            }
        }

        for(var resourceId in Memory.assignments) {
            for(i=0; i < deleted.length; i++) {
                _.pull(Memory.assignments[resourceId], deleted[i]);
            }
        }

    },

    updateStructureStore: function(roomId) {

        var room = Game.getObjectById(roomId);
        var structures = room.find(FIND_STRUCTURES);
        var structureMap = {};
<commit_msg>wrong lookup func<commit_after>var _ = require('lodash')


// this abstracts over memory allowing storage of various data
memoryManager = {

    collect: function() {
        var deleted = [];

        for(var name in Memory.creeps) {
            if(!Game.creeps[name]) {
                delete Memory.creeps[name];
                console.log('collecting non-existing creep memory:', name);
                deleted.push(name);
            }
        }

        for(var resourceId in Memory.assignments) {
            for(i=0; i < deleted.length; i++) {
                _.pull(Memory.assignments[resourceId], deleted[i]);
            }
        }

    },

    updateStructureStore: function(roomId) {

        var room = Game.rooms[roomId];
        var structures = room.find(FIND_STRUCTURES);
        var structureMap = {};

{'fraction_non_alphanumeric': 0.11636363636363636, 'fraction_numerical': 0.0012121212121212121, 'mean_word_length': 1.911816578483245, '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': '7420946', 'n_tokens_mistral': 466, 'n_tokens_neox': 442, 'n_words': 100}