<commit_before>// make sure all models are loaded
import PantryItem from './pantry-item.model';
import User from './user.model';
import db from './db';
import {userNames, itemNames} from './init-data';

function randomCount() {
    return Math.ceil(Math.random() * 100);
}

export default () =>
    db
        .sync()
        .then(() => {
            const users = userNames.map(name => ({name}));
            const items = itemNames.map(name => ({name, count: randomCount()}));

            return Promise.all([
                User.bulkCreate(users),
                PantryItem.bulkCreate(items)
            ]);
        });
<commit_msg>less items in pantry<commit_after>// make sure all models are loaded
import PantryItem from './pantry-item.model';
import User from './user.model';
import db from './db';
import {userNames, itemNames} from './init-data';

function randomCount() {
    return Math.ceil(Math.random() * 10);
}

export default () =>
    db
        .sync()
        .then(() => {
            const users = userNames.map(name => ({name}));
            const items = itemNames.map(name => ({name, count: randomCount()}));

            return Promise.all([
                User.bulkCreate(users),
                PantryItem.bulkCreate(items)
            ]);
        });

{'fraction_non_alphanumeric': 0.1557632398753894, 'fraction_numerical': 0.003894080996884735, 'mean_word_length': 2.1965174129353233, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4859017', 'n_tokens_mistral': 370, 'n_tokens_neox': 360, 'n_words': 99}