<commit_before># -*- coding: utf-8 -*-
from datetime import datetime
from tempfile import mkstemp
from PIL import Image
from cStringIO import StringIO

from django.conf import settings
from django.core.files.uploadedfile import InMemoryUploadedFile

from ella.photos.models import Photo
from ella.core.models import Category, Publishable
# choose Article as an example publishable
from ella.articles.models import Article

def create_basic_categories(case):
    case.site_id = getattr(settings, "SITE_ID", 1)

    case.category = Category.objects.create(
        title=u"你好 category",
        description=u"exmple testing category",
        site_id=case.site_id,
        slug=u"ni-hao-category",
    )

    case.category_nested = Category.objects.create(
        title=u"nested category",<commit_msg>ella blows up when you import Photo before core<commit_after># -*- coding: utf-8 -*-
from datetime import datetime
from tempfile import mkstemp
from PIL import Image
from cStringIO import StringIO

from django.conf import settings
from django.core.files.uploadedfile import InMemoryUploadedFile

from ella.core.models import Category, Publishable
# choose Article as an example publishable
from ella.articles.models import Article
from ella.photos.models import Photo

def create_basic_categories(case):
    case.site_id = getattr(settings, "SITE_ID", 1)

    case.category = Category.objects.create(
        title=u"你好 category",
        description=u"exmple testing category",
        site_id=case.site_id,
        slug=u"ni-hao-category",
    )

    case.category_nested = Category.objects.create(
        title=u"nested category",
{'fraction_non_alphanumeric': 0.08200734394124846, 'fraction_numerical': 0.0024479804161566705, 'mean_word_length': 4.061919504643963, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4907620', 'n_tokens_mistral': 472, 'n_tokens_neox': 460, 'n_words': 137}