<commit_before>from __future__ import unicode_literals

from django.conf.urls import patterns, include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin

from mezzanine.core.views import direct_to_template
from mezzanine.conf import settings

import autocomplete_light

from hs_core.views.discovery_view import DiscoveryView
from hs_core.views.discovery_json_view import DiscoveryJsonView
from theme import views as theme
from hs_tracking import views as tracking
from hs_core import views as hs_core_views
from hs_app_timeseries import views as hs_ts_views
from hs_app_netCDF import views as nc_views


autocomplete_light.autodiscover()
admin.autodiscover()

# Add the urlpatterns for any custom Django applications here.
# You can also change the ``home`` view to add your own functionality
# to the project's homepage.

urlpatterns = i18n_patterns("",

    # Change the admin prefix here to use an alternate URL for the
    # admin interface, which would be marginally more secure.
    url("^admin/", include(admin.site.urls)),
    url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
    url("^inplaceeditform/", include("inplaceeditform.urls")),
    url('^r/(?P<shortkey>[A-z0-9\-_]+)', 'hs_core.views.short_url'),
    url(r'^tracking/reports/profiles/$', tracking.VisitorProfileReport.as_view(),
        name='tracking-report-profiles'),
    url(r'^tracking/reports/history/$', tracking.HistoryReport.as_view(),
        name='tracking-report-history'),
    url(r'^tracking/$', tracking.UseTrackingView.as_view(), name='tracking'),
    url(r'^tracking/applaunch/', tracking.AppLaunch.as_view(), name='tracking-applaunch'),
    url(r'^user/$', theme.UserProfileView.as_view()),
    url(r'^user/(?P<user>.*)/', theme.UserProfileView.as_view()),
    url(r'^comment/$', theme.comment),
    url(r'^rating/$', theme.rating),
    url(r'^profile/$', theme.update_user_profile, name='update_profile'),
    url(r'^update_password/$', theme.update_user_password, name='update_password'),
    url(r'^resend_verification_email/(?P<email>.*)/', theme.resend_verification_email,
        name='resend_verification_email'),
    url(r'^reset_password_request/$', theme.request_password_reset,
        name='reset_password_request'),
    url(r'^new_password_for_reset/(?P<token>[-\w]+)/', theme.UserPasswordResetView.as_view(),
        name='new_password_for_reset'),
    url(r'^confirm_reset_password/$', theme.reset_user_password,
        name='confirm_reset_password'),
    url(r'^deactivate_account/$', theme.deactivate_user, name='deactivate_account'),
    url(r'^delete_irods_account/$', theme.delete_irods_account, name='delete_irods_account'),
    url(r'^create_irods_account/$', theme.create_irods_account, name='create_irods_account'),
    url(r'^accounts/login/$', theme.login, name='login'),
    url(r'^email_verify/(?P<new_email>.*)/(?P<token>[-\w]+)/(?P<uidb36>[-\w]+)/',
        theme.email_verify, name='email_verify'),
    url(r'^email_verify_password_reset/(?P<token>[-\w]+)/(?P<uidb36>[-\w]+)/',
        theme.email_verify_password_reset, name='email_verify_password_reset'),
    url(r'^verify/(?P<token>[0-9a-zA-Z:_\-]*)/', 'hs_core.views.verify'),
    url(r'^django_irods/', include('django_irods.urls')),
    url(r'^autocomplete/', include('autocomplete_light.urls')),
    url(r'^search/$', DiscoveryView.as_view(), name='haystack_search'),
    url(r'^searchjson/$', DiscoveryJsonView.as_view(), name='haystack_json_search'),
    url(r'^sitemap/$', 'hs_sitemap.views.sitemap', name='sitemap'),
    url(r'^collaborate/$', hs_core_views.CollaborateView.as_view(), name='collaborate'),
    url(r'^my-groups/$', hs_core_views.MyGroupsView.as_view(), name='my_groups'),
    url(r'^group/(?P<group_id>[0-9]+)', hs_core_views.GroupView.as_view(), name='group'),
    url(r'^timeseries/sqlite/update/(?P<resource_id>[A-z0-9\-_]+)', hs_ts_views.update_sqlite_file,
        name='update_sqlite_file'),
    url(r'^apps/$', hs_core_views.apps.AppsView.as_view(), name="apps")
)

# Filebrowser admin media library.<commit_msg>Fixing URLs.py<commit_after>from __future__ import unicode_literals

from django.conf.urls import patterns, include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin

from mezzanine.core.views import direct_to_template
from mezzanine.conf import settings

import autocomplete_light

from hs_core.views.discovery_view import DiscoveryView
from hs_core.views.discovery_json_view import DiscoveryJsonView
from theme import views as theme
from hs_tracking import views as tracking
from hs_core import views as hs_core_views
from hs_app_timeseries import views as hs_ts_views
from hs_app_netCDF import views as nc_views


autocomplete_light.autodiscover()
admin.autodiscover()

# Add the urlpatterns for any custom Django applications here.
# You can also change the ``home`` view to add your own functionality
# to the project's homepage.

urlpatterns = i18n_patterns("",

    # Change the admin prefix here to use an alternate URL for the
    # admin interface, which would be marginally more secure.
    url("^admin/", include(admin.site.urls)),
    url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
    url("^inplaceeditform/", include("inplaceeditform.urls")),
    url('^r/(?P<shortkey>[A-z0-9\-_]+)', 'hs_core.views.short_url'),
    url(r'^tracking/reports/profiles/$', tracking.VisitorProfileReport.as_view(),
        name='tracking-report-profiles'),
    url(r'^tracking/reports/history/$', tracking.HistoryReport.as_view(),
        name='tracking-report-history'),
    url(r'^tracking/$', tracking.UseTrackingView.as_view(), name='tracking'),
    url(r'^tracking/applaunch/', tracking.AppLaunch.as_view(), name='tracking-applaunch'),
    url(r'^user/$', theme.UserProfileView.as_view()),
    url(r'^user/(?P<user>.*)/', theme.UserProfileView.as_view()),
    url(r'^comment/$', theme.comment),
    url(r'^rating/$', theme.rating),
    url(r'^profile/$', theme.update_user_profile, name='update_profile'),
    url(r'^update_password/$', theme.update_user_password, name='update_password'),
    url(r'^resend_verification_email/(?P<email>.*)/', theme.resend_verification_email,
        name='resend_verification_email'),
    url(r'^reset_password_request/$', theme.request_password_reset,
        name='reset_password_request'),
    url(r'^new_password_for_reset/(?P<token>[-\w]+)/', theme.UserPasswordResetView.as_view(),
        name='new_password_for_reset'),
    url(r'^confirm_reset_password/$', theme.reset_user_password,
        name='confirm_reset_password'),
    url(r'^deactivate_account/$', theme.deactivate_user, name='deactivate_account'),
    url(r'^delete_irods_account/$', theme.delete_irods_account, name='delete_irods_account'),
    url(r'^create_irods_account/$', theme.create_irods_account, name='create_irods_account'),
    url(r'^accounts/login/$', theme.login, name='login'),
    url(r'^email_verify/(?P<new_email>.*)/(?P<token>[-\w]+)/(?P<uidb36>[-\w]+)/',
        theme.email_verify, name='email_verify'),
    url(r'^email_verify_password_reset/(?P<token>[-\w]+)/(?P<uidb36>[-\w]+)/',
        theme.email_verify_password_reset, name='email_verify_password_reset'),
    url(r'^verify/(?P<token>[0-9a-zA-Z:_\-]*)/', 'hs_core.views.verify'),
    url(r'^django_irods/', include('django_irods.urls')),
    url(r'^autocomplete/', include('autocomplete_light.urls')),
    url(r'^search/$', DiscoveryView.as_view(), name='haystack_search'),
    url(r'^searchjson/$', DiscoveryJsonView.as_view(), name='haystack_json_search'),
    url(r'^sitemap/$', 'hs_sitemap.views.sitemap', name='sitemap'),
    url(r'^sitemap', include('hs_sitemap.urls')),
    url(r'^collaborate/$', hs_core_views.CollaborateView.as_view(), name='collaborate'),
    url(r'^my-groups/$', hs_core_views.MyGroupsView.as_view(), name='my_groups'),
    url(r'^group/(?P<group_id>[0-9]+)', hs_core_views.GroupView.as_view(), name='group'),
    url(r'^timeseries/sqlite/update/(?P<resource_id>[A-z0-9\-_]+)', hs_ts_views.update_sqlite_file,
        name='update_sqlite_file'),
    url(r'^apps/$', hs_core_views.apps.AppsView.as_view(), name="apps")
)

# Filebrowser admin media library.
{'fraction_non_alphanumeric': 0.16900207140246132, 'fraction_numerical': 0.004873888144267089, 'mean_word_length': 5.716857610474632, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '721689', 'n_tokens_mistral': 2917, 'n_tokens_neox': 2737, 'n_words': 430}