<commit_before>from django.conf.urls import url, include
from django.views.generic.base import RedirectView

from rest_framework import routers
from dplace_app import views, api_views

router = routers.DefaultRouter()
router.register(r'variables', api_views.CulturalVariableViewSet)
router.register(r'categories', api_views.CulturalCategoryViewSet)
router.register(r'codes', api_views.CulturalCodeDescriptionViewSet)
router.register(r'values', api_views.CulturalValueViewSet)
router.register(r'societies', api_views.SocietyViewSet)
router.register(r'environmental_categories', api_views.EnvironmentalCategoryViewSet)
router.register(r'environmental_variables', api_views.EnvironmentalVariableViewSet)
router.register(r'environmentals', api_views.EnvironmentalViewSet)
router.register(r'environmental_values', api_views.EnvironmentalValueViewSet)
router.register(r'isocodes', api_views.ISOCodeViewSet)
router.register(r'language_families', api_views.LanguageFamilyViewSet)
router.register(r'languages', api_views.LanguageViewSet)
router.register(r'language_trees', api_views.LanguageTreeViewSet)
router.register(r'geographic_regions', api_views.GeographicRegionViewSet)
router.register(r'sources', api_views.SourceViewSet)

urlpatterns = [
    url(r'^$', RedirectView.as_view(url='angular/', permanent=True), name='home'),
    url(r'^society/(?P<society_id>.*)/$', views.view_society, name='view_society'),
    url(r'^language/(?P<language_id>\d+)/$', views.view_language, name='view_language'),
    url(r'^angular/$', views.angular, name='angular'),
    # API
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
    url(r'^api/v1/', include(router.urls)),
    url(r'^api/v1/find_societies', api_views.find_societies, name='find_societies'),
    url(r'^api/v1/min_and_max', api_views.get_min_and_max, name="min_and_max"),
    url(r'^api/v1/cont_variable', api_views.bin_cont_data, name="cont_variable"),
    url(r'^api/v1/get_categories', api_views.get_categories, name="get_categories"),
    url(r'^api/v1/get_dataset_sources', api_views.get_dataset_sources, name="get_dataset_sources"),
    url(r'^api/v1/csv_download', api_views.csv_download, name='csv_download'),
    url(r'^api/v1/zip', api_views.zip_legends, name='zip_legends'),
]
<commit_msg>Remove trailing slash from society url<commit_after>from django.conf.urls import url, include
from django.views.generic.base import RedirectView

from rest_framework import routers
from dplace_app import views, api_views

router = routers.DefaultRouter()
router.register(r'variables', api_views.CulturalVariableViewSet)
router.register(r'categories', api_views.CulturalCategoryViewSet)
router.register(r'codes', api_views.CulturalCodeDescriptionViewSet)
router.register(r'values', api_views.CulturalValueViewSet)
router.register(r'societies', api_views.SocietyViewSet)
router.register(r'environmental_categories', api_views.EnvironmentalCategoryViewSet)
router.register(r'environmental_variables', api_views.EnvironmentalVariableViewSet)
router.register(r'environmentals', api_views.EnvironmentalViewSet)
router.register(r'environmental_values', api_views.EnvironmentalValueViewSet)
router.register(r'isocodes', api_views.ISOCodeViewSet)
router.register(r'language_families', api_views.LanguageFamilyViewSet)
router.register(r'languages', api_views.LanguageViewSet)
router.register(r'language_trees', api_views.LanguageTreeViewSet)
router.register(r'geographic_regions', api_views.GeographicRegionViewSet)
router.register(r'sources', api_views.SourceViewSet)

urlpatterns = [
    url(r'^$', RedirectView.as_view(url='angular/', permanent=True), name='home'),
    url(r'^society/(?P<society_id>.*)$', views.view_society, name='view_society'),
    url(r'^language/(?P<language_id>\d+)/$', views.view_language, name='view_language'),
    url(r'^angular/$', views.angular, name='angular'),
    # API
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
    url(r'^api/v1/', include(router.urls)),
    url(r'^api/v1/find_societies', api_views.find_societies, name='find_societies'),
    url(r'^api/v1/min_and_max', api_views.get_min_and_max, name="min_and_max"),
    url(r'^api/v1/cont_variable', api_views.bin_cont_data, name="cont_variable"),
    url(r'^api/v1/get_categories', api_views.get_categories, name="get_categories"),
    url(r'^api/v1/get_dataset_sources', api_views.get_dataset_sources, name="get_dataset_sources"),
    url(r'^api/v1/csv_download', api_views.csv_download, name='csv_download'),
    url(r'^api/v1/zip', api_views.zip_legends, name='zip_legends'),
]

{'fraction_non_alphanumeric': 0.14369821194941126, 'fraction_numerical': 0.0034888791975577847, 'mean_word_length': 8.864516129032259, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2084262', 'n_tokens_mistral': 1547, 'n_tokens_neox': 1524, 'n_words': 187}