<commit_before>from django.conf.urls.defaults import *
from django.contrib import admin
from django.views.generic.simple import direct_to_template
from django.conf import settings
admin.autodiscover()

urlpatterns = patterns(
    '',
    (r'', include('madrona.common.urls')),
    (r'^trees/', include('trees.urls')),
    (r'^auth/', include('allauth.urls')),
    url(
        r'^auth/profile/',
        direct_to_template,
        {'template': 'account/profile.html'},
        "auth_profile"
    ),
)

if settings.DEBUG:
    urlpatterns += patterns(
        '',
        url(
            r'^media/(?P<path>.*)$',
            'django.views.static.serve',
            {'document_root': settings.MEDIA_ROOT}
        ),
    )
<commit_msg>looser pattern matching for workspace urls; fixes #210<commit_after>from django.conf.urls.defaults import *
from django.contrib import admin
from django.views.generic.simple import direct_to_template
from django.conf import settings
admin.autodiscover()

urlpatterns = patterns(
    '',

    # Looser pattern matching for workspace username (as opposed to \w+)
    # Already in madrona 4.2dev+ but just in case we're still running <=4.1
    url(r'^features/(?P<username>.+)/workspace-owner.json', 'madrona.features.views.workspace', kwargs={"is_owner": True}, name='workspace-owner-json'),
    url(r'^features/(?P<username>.+)/workspace-shared.json', 'madrona.features.views.workspace', kwargs={"is_owner": False}, name='workspace-shared-json'),

    (r'', include('madrona.common.urls')),
    (r'^trees/', include('trees.urls')),
    (r'^auth/', include('allauth.urls')),
    url(
        r'^auth/profile/',
        direct_to_template,
        {'template': 'account/profile.html'},
        "auth_profile"
    ),
)

if settings.DEBUG:
    urlpatterns += patterns(
        '',
        url(
            r'^media/(?P<path>.*)$',
            'django.views.static.serve',
            {'document_root': settings.MEDIA_ROOT}
        ),
    )

{'fraction_non_alphanumeric': 0.16353478923311326, 'fraction_numerical': 0.0035551041137633316, 'mean_word_length': 3.0786749482401654, 'pattern_counts': {'":': 2, '<': 8, '<?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': '5340764', 'n_tokens_mistral': 635, 'n_tokens_neox': 625, 'n_words': 117}