<commit_before>import os

from django.conf.urls.defaults import patterns, url
from django.conf import settings
from django.contrib import admin
from django.shortcuts import redirect

from tagging.views import tagged_object_list

from djangopeople import views, api #, clustering
from djangopeople.models import DjangoPerson


def perm_redirect(url):
    return lambda req: redirect(url, permanent=True)

admin.autodiscover()

urlpatterns = patterns('',
    (r'^$', views.index),
    (r'^login/$', views.login),
    (r'^logout/$', views.logout),
    (r'^about/$', views.about),
    (r'^recent/$', views.recent),
    (r'^recover/$', views.lost_password),
    (r'^recover/([a-z0-9]{3,})/([a-f0-9]+)/([a-f0-9]{32})/$',
        views.lost_password_recover),
    (r'^signup/$', views.signup),

    (r'^openid/$', 'django_openidconsumer.views.begin', {
        'sreg': 'email,nickname,fullname',
        'redirect_to': '/openid/complete/',
    }),
    (r'^openid/complete/$', 'django_openidconsumer.views.complete'),
    (r'^openid/whatnext/$', views.openid_whatnext),
    (r'^openid/signout/$', 'django_openidconsumer.views.signout'),
    (r'^openid/associations/$', 'django_openidauth.views.associations'),

    (r'^search/$', views.search),
#    (r'^openid/$', views.openid),

    (r'^skills/(?P<tag>.*)/$', views.skill),
    (r'^skills/$', views.skill_cloud),

    (r'^static/(?P<path>.*)$', 'django.views.static.serve', {
        'document_root': os.path.join(settings.OUR_ROOT, 'static')
    }),
    (r'^admin/(.*)', admin.site.root),
    (r'^api/irc_lookup/(.*?)/$', api.irc_lookup),
    (r'^api/irc_spotted/(.*?)/$', api.irc_spotted),
    (r'^irc/active/$', views.irc_active),
    (r'^irc/(.*?)/$', api.irc_redirect),

    (r'^uk/$', perm_redirect('/gb/')),
    (r'^([a-z]{2})/$', views.country),
    (r'^([a-z]{2})/sites/$', views.country_sites),
    (r'^([a-z]{2})/skills/$', views.country_skill_cloud),
    (r'^([a-z]{2})/skills/(.*)/$', views.country_skill),
    (r'^([a-z]{2})/looking-for/(freelance|full-time)/$', views.country_looking_for),
    (r'^([a-z]{2})/(\w+)/$', views.region),

    (r'^([a-z0-9]{3,})/$', views.profile),
    (r'^([a-z0-9]{3,})/bio/$', views.edit_bio),
    (r'^([a-z0-9]{3,})/skills/$', views.edit_skills),
    (r'^([a-z0-9]{3,})/password/$', views.edit_password),
    (r'^([a-z0-9]{3,})/account/$', views.edit_account),
    (r'^([a-z0-9]{3,})/portfolio/$', views.edit_portfolio),
    (r'^([a-z0-9]{3,})/location/$', views.edit_location),
    (r'^([a-z0-9]{3,})/finding/$', views.edit_finding),
    (r'^([a-z0-9]{3,})/upload/$', views.upload_profile_photo),
    (r'^([a-z0-9]{3,})/upload/done/$', views.upload_done),

#    (r'^clusters/(\-?\d+\.?\d*)/(\-?\d+\.?\d*)/(\-?\d+\.?\d*)/(\-?\d+\.?\d*)/(\d+)/$', clustering.as_json),
)<commit_msg>Started to clean the rtoot URLconf<commit_after>import os

from django.conf.urls.defaults import patterns, url, include
from django.conf import settings
from django.contrib import admin
from django.shortcuts import redirect

from tagging.views import tagged_object_list

from djangopeople import views, api #, clustering
from djangopeople.models import DjangoPerson


def perm_redirect(url):
    return lambda req: redirect(url, permanent=True)

admin.autodiscover()

urlpatterns = patterns('',
    url(r'^$', views.index, name='index'),
    url(r'^login/$', views.login, name='login'),
    url(r'^logout/$', views.logout, name='logout'),
    url(r'^about/$', views.about, name='about'),
    url(r'^recent/$', views.recent, name='recent'),
    url(r'^recover/$', views.lost_password, name='recover'),
    url(r'^recover/([a-z0-9]{3,})/([a-f0-9]+)/([a-f0-9]{32})/$',
        views.lost_password_recover, name='do_recover'),
    url(r'^signup/$', views.signup, name='signup'),

    (r'^openid/$', 'django_openidconsumer.views.begin', {
        'sreg': 'email,nickname,fullname',
        'redirect_to': '/openid/complete/',
    }),
    (r'^openid/complete/$', 'django_openidconsumer.views.complete'),
    (r'^openid/whatnext/$', views.openid_whatnext),
    (r'^openid/signout/$', 'django_openidconsumer.views.signout'),
    (r'^openid/associations/$', 'django_openidauth.views.associations'),

    (r'^search/$', views.search),
#    (r'^openid/$', views.openid),

    (r'^skills/(?P<tag>.*)/$', views.skill),
    (r'^skills/$', views.skill_cloud),

    (r'^static/(?P<path>.*)$', 'django.views.static.serve', {
        'document_root': os.path.join(settings.OUR_ROOT, 'static')
    }),
    (r'^admin/', include(admin.site.urls)),
    (r'^api/irc_lookup/(.*?)/$', api.irc_lookup),
    (r'^api/irc_spotted/(.*?)/$', api.irc_spotted),
    (r'^irc/active/$', views.irc_active),
    (r'^irc/(.*?)/$', api.irc_redirect),

    (r'^uk/$', perm_redirect('/gb/')),
    (r'^([a-z]{2})/$', views.country),
    (r'^([a-z]{2})/sites/$', views.country_sites),
    (r'^([a-z]{2})/skills/$', views.country_skill_cloud),
    (r'^([a-z]{2})/skills/(.*)/$', views.country_skill),
    (r'^([a-z]{2})/looking-for/(freelance|full-time)/$', views.country_looking_for),
    (r'^([a-z]{2})/(\w+)/$', views.region),

    (r'^([a-z0-9]{3,})/$', views.profile),
    (r'^([a-z0-9]{3,})/bio/$', views.edit_bio),
    (r'^([a-z0-9]{3,})/skills/$', views.edit_skills),
    (r'^([a-z0-9]{3,})/password/$', views.edit_password),
    (r'^([a-z0-9]{3,})/account/$', views.edit_account),
    (r'^([a-z0-9]{3,})/portfolio/$', views.edit_portfolio),
    (r'^([a-z0-9]{3,})/location/$', views.edit_location),
    (r'^([a-z0-9]{3,})/finding/$', views.edit_finding),
    (r'^([a-z0-9]{3,})/upload/$', views.upload_profile_photo),
    (r'^([a-z0-9]{3,})/upload/done/$', views.upload_done),

#    (r'^clusters/(\-?\d+\.?\d*)/(\-?\d+\.?\d*)/(\-?\d+\.?\d*)/(\-?\d+\.?\d*)/(\d+)/$', clustering.as_json),
)
{'fraction_non_alphanumeric': 0.2806986899563319, 'fraction_numerical': 0.01572052401746725, 'mean_word_length': 3.9878048780487805, 'pattern_counts': {'":': 0, '<': 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': '1227981', 'n_tokens_mistral': 2453, 'n_tokens_neox': 2281, 'n_words': 278}