<commit_before>import random

from django.conf import settings

from generate import IMAGES

def generate():
    objects = []
     
    for i in range(1, 14):
        objects.append({
            "model": "post.Post",
            "fields": {
                "title": "News Post %s" % i,
                "description": "News Post %s %s long description." % (i, 'very ' * 50),
                "content": "News Post %s <b>%s</b> long safe content." % (i, 'very ' * 100),
                "state": "published",
                "sites": settings.SITE_ID,
                "image": random.sample(IMAGES, 1)[0],
                "categories": [
                    {
                        "model": "category.Category",
                        "fields": {
                            "title": "News",
                            "slug": "anews",
                        }
                    },
                ],
                "primary_category": {
                    "model": "category.Category",
                    "fields": {
                        "slug": "news",
                    },
                },
            },
        })
    
    objects.append({
        "model": "jmbo.Pin",
        "fields": {
            "category": {
                "model": "category.Category",
                "fields": {
                    "slug": "news",
                },
            },
            "content": {
                "model": "post.Post",
                "fields": {
                    "title": "News Post 7",
                },
            },
        },
    })

    return objects<commit_msg>Flesh out dictionaries since traversal in django-generator is over unordered dict keys, leading to a potentially incomplete dictionary being evaluated first.<commit_after>import random

from django.conf import settings

from generate import IMAGES

def generate():
    objects = []
     
    for i in range(1, 14):
        objects.append({
            "model": "post.Post",
            "fields": {
                "title": "News Post %s" % i,
                "description": "News Post %s %s long description." % (i, 'very ' * 50),
                "content": "News Post %s <b>%s</b> long safe content." % (i, 'very ' * 100),
                "state": "published",
                "sites": settings.SITE_ID,
                "image": random.sample(IMAGES, 1)[0],
                "categories": [
                    {
                        "model": "category.Category",
                        "fields": {
                            "title": "News",
                            "slug": "news",
                        }
                    },
                ],
                "primary_category": {
                    "model": "category.Category",
                    "fields": {
                        "title": "News",
                        "slug": "news",
                    },
                },
            },
        })
    
    objects.append({
        "model": "jmbo.Pin",
        "fields": {
            "category": {
                "model": "category.Category",
                "fields": {
                    "slug": "news",
                },
            },
            "content": {
                "model": "post.Post",
                "fields": {
                    "title": "News Post 7",
                },
            },
        },
    })

    return objects
{'fraction_non_alphanumeric': 0.13536729857819904, 'fraction_numerical': 0.006516587677725118, 'mean_word_length': 0.9486439699942296, 'pattern_counts': {'":': 55, '<': 7, '<?xml version=': 0, '>': 7, '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': '3057890', 'n_tokens_mistral': 881, 'n_tokens_neox': 809, 'n_words': 199}