<commit_before>from hashlib import md5
import operator
from os import makedirs
from os.path import basename, dirname, isdir
from shutil import rmtree, copyfileobj
import re
from time import time
import zipfile

from embedutils import VideoEmbedURLField
import magic

try:
    from PIL import Image
except ImportError:
    import Image

from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.core.files.storage import FileSystemStorage
from django.db import models
from django.db.models import Q
from django.db.models.fields.files import FieldFile, ImageFieldFile
from django.template.defaultfilters import slugify, filesizeformat
from django.utils.translation import ugettext_lazy as _

import south.modelsinspector
from taggit_extras.managers import NamespacedTaggableManager
from threadedcomments.models import ThreadedComment

from actioncounters.fields import ActionCounterField
from sumo.urlresolvers import reverse
from devmo.utils import generate_filename_and_delete_previous

from . import challenge_utils, DEMO_LICENSES, scale_image


south.modelsinspector.add_ignored_fields(["^taggit\.managers"])

SCREENSHOT_MAXW = getattr(settings, 'DEMO_SCREENSHOT_MAX_WIDTH', 480)
SCREENSHOT_MAXH = getattr(settings, 'DEMO_SCREENSHOT_MAX_HEIGHT', 360)

THUMBNAIL_MAXW = getattr(settings, 'DEMO_THUMBNAIL_MAX_WIDTH', 200)
THUMBNAIL_MAXH = getattr(settings, 'DEMO_THUMBNAIL_MAX_HEIGHT', 150)

DEMO_MAX_ZIP_FILESIZE = getattr(settings, 'DEMO_MAX_ZIP_FILESIZE', 60 * 1024 * 1024) # 60MB
DEMO_MAX_FILESIZE_IN_ZIP = getattr(settings, 'DEMO_MAX_FILESIZE_IN_ZIP', 60 * 1024 * 1024) # 60MB

# Set up a file system for demo uploads that can be kept separate from the rest
# of /media if necessary. Lots of hackery here to ensure a set of sensible<commit_msg>fix bug 1092208 - Update max file size for demo studio<commit_after>from hashlib import md5
import operator
from os import makedirs
from os.path import basename, dirname, isdir
from shutil import rmtree, copyfileobj
import re
from time import time
import zipfile

from embedutils import VideoEmbedURLField
import magic

try:
    from PIL import Image
except ImportError:
    import Image

from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.core.files.storage import FileSystemStorage
from django.db import models
from django.db.models import Q
from django.db.models.fields.files import FieldFile, ImageFieldFile
from django.template.defaultfilters import slugify, filesizeformat
from django.utils.translation import ugettext_lazy as _

import south.modelsinspector
from taggit_extras.managers import NamespacedTaggableManager
from threadedcomments.models import ThreadedComment

from actioncounters.fields import ActionCounterField
from sumo.urlresolvers import reverse
from devmo.utils import generate_filename_and_delete_previous

from . import challenge_utils, DEMO_LICENSES, scale_image


south.modelsinspector.add_ignored_fields(["^taggit\.managers"])

SCREENSHOT_MAXW = getattr(settings, 'DEMO_SCREENSHOT_MAX_WIDTH', 480)
SCREENSHOT_MAXH = getattr(settings, 'DEMO_SCREENSHOT_MAX_HEIGHT', 360)

THUMBNAIL_MAXW = getattr(settings, 'DEMO_THUMBNAIL_MAX_WIDTH', 200)
THUMBNAIL_MAXH = getattr(settings, 'DEMO_THUMBNAIL_MAX_HEIGHT', 150)

DEMO_MAX_ZIP_FILESIZE = getattr(settings, 'DEMO_MAX_ZIP_FILESIZE', 120 * 1024 * 1024) # 120MB
DEMO_MAX_FILESIZE_IN_ZIP = getattr(settings, 'DEMO_MAX_FILESIZE_IN_ZIP', 120 * 1024 * 1024) # 120MB

# Set up a file system for demo uploads that can be kept separate from the rest
# of /media if necessary. Lots of hackery here to ensure a set of sensible
{'fraction_non_alphanumeric': 0.05584030213110332, 'fraction_numerical': 0.02292959266253035, 'mean_word_length': 6.536585365853658, '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': '878066', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1148, 'n_words': 350}