<commit_before>from django.conf.urls import patterns, url
from django.views.generic import TemplateView

from repository.api_views import *

# Override handler403 to provide a custom permission denied page.
# Otherwise, a user has no links to get to their resources
# Esp. useful for 'next' redirection after login
handler403 = TemplateView.as_view(template_name='403.html')

# API routes
urlpatterns = patterns('repository.api_views',
    url(r'^api/repository/$', 'repository_api_root', name='repository-api-root'),
    url(r'^api/repository/specimens/$', SpecimenList.as_view(), name='specimen-list'),

    url(r'^api/repository/projects/$', ProjectList.as_view(), name='project-list'),
    url(r'^api/repository/projects/(?P<pk>\d+)/$', ProjectDetail.as_view(), name='project-detail'),
    url(r'^api/repository/project_panels/$', ProjectPanelList.as_view(), name='project-panel-list'),
    url(r'^api/repository/project_panels/(?P<pk>\d+)/$', ProjectPanelDetail.as_view(), name='project-panel-detail'),

    url(r'^api/repository/sites/$', SiteList.as_view(), name='site-list'),
    url(r'^api/repository/sites/(?P<pk>\d+)/$', SiteDetail.as_view(), name='site-detail'),
    url(r'^api/repository/site_panels/$', SitePanelList.as_view(), name='site-panel-list'),
    url(r'^api/repository/site_panels/(?P<pk>\d+)/$', SitePanelDetail.as_view(), name='site-panel-detail'),

    url(r'^api/repository/subject_groups/$', SubjectGroupList.as_view(), name='subject-group-list'),
    url(r'^api/repository/subjects/$', SubjectList.as_view(), name='subject-list'),
    url(r'^api/repository/subjects/(?P<pk>\d+)/$', SubjectDetail.as_view(), name='subject-detail'),

    url(r'^api/repository/visit_types/$', VisitTypeList.as_view(), name='visit-type-list'),
    url(r'^api/repository/visit_types/(?P<pk>\d+)/$', VisitTypeDetail.as_view(), name='visittype-detail'),

    url(r'^api/repository/stimulations/$', StimulationList.as_view(), name='stimulation-list'),
    url(r'^api/repository/stimulations/(?P<pk>\d+)/$', StimulationDetail.as_view(), name='stimulation-detail'),

    url(r'^api/repository/samples/$', SampleList.as_view(), name='sample-list'),
    url(r'^api/repository/samples/add/$', CreateSampleList.as_view(), name='create-sample-list'),
    url(r'^api/repository/samples/(?P<pk>\d+)/$', SampleDetail.as_view(), name='sample-detail'),
    url(r'^api/repository/samples/(?P<pk>\d+)/fcs/$', retrieve_sample, name='retrieve_sample'),
    url(r'^api/repository/samples/(?P<pk>\d+)/fcs_as_pk/$', retrieve_sample_as_pk, name='sample-download-as-pk'),
    url(r'^api/repository/samples/(?P<pk>\d+)/csv/$', retrieve_subsample_as_csv, name='retrieve_subsample_as_csv'),
    url(r'^api/repository/samples/(?P<pk>\d+)/npy/$', retrieve_subsample_as_numpy, name='retrieve_subsample_as_numpy'),
    url(r'^api/repository/samples/(?P<pk>\d+)/apply_panel/$', SamplePanelUpdate.as_view(), name='sample-panel-update'),

    url(r'^api/repository/compensations/$', CompensationList.as_view(), name='compensation-list'),<commit_msg>make sample data retrieval URL scheme consistent<commit_after>from django.conf.urls import patterns, url
from django.views.generic import TemplateView

from repository.api_views import *

# Override handler403 to provide a custom permission denied page.
# Otherwise, a user has no links to get to their resources
# Esp. useful for 'next' redirection after login
handler403 = TemplateView.as_view(template_name='403.html')

# API routes
urlpatterns = patterns('repository.api_views',
    url(r'^api/repository/$', 'repository_api_root', name='repository-api-root'),
    url(r'^api/repository/specimens/$', SpecimenList.as_view(), name='specimen-list'),

    url(r'^api/repository/projects/$', ProjectList.as_view(), name='project-list'),
    url(r'^api/repository/projects/(?P<pk>\d+)/$', ProjectDetail.as_view(), name='project-detail'),
    url(r'^api/repository/project_panels/$', ProjectPanelList.as_view(), name='project-panel-list'),
    url(r'^api/repository/project_panels/(?P<pk>\d+)/$', ProjectPanelDetail.as_view(), name='project-panel-detail'),

    url(r'^api/repository/sites/$', SiteList.as_view(), name='site-list'),
    url(r'^api/repository/sites/(?P<pk>\d+)/$', SiteDetail.as_view(), name='site-detail'),
    url(r'^api/repository/site_panels/$', SitePanelList.as_view(), name='site-panel-list'),
    url(r'^api/repository/site_panels/(?P<pk>\d+)/$', SitePanelDetail.as_view(), name='site-panel-detail'),

    url(r'^api/repository/subject_groups/$', SubjectGroupList.as_view(), name='subject-group-list'),
    url(r'^api/repository/subjects/$', SubjectList.as_view(), name='subject-list'),
    url(r'^api/repository/subjects/(?P<pk>\d+)/$', SubjectDetail.as_view(), name='subject-detail'),

    url(r'^api/repository/visit_types/$', VisitTypeList.as_view(), name='visit-type-list'),
    url(r'^api/repository/visit_types/(?P<pk>\d+)/$', VisitTypeDetail.as_view(), name='visittype-detail'),

    url(r'^api/repository/stimulations/$', StimulationList.as_view(), name='stimulation-list'),
    url(r'^api/repository/stimulations/(?P<pk>\d+)/$', StimulationDetail.as_view(), name='stimulation-detail'),

    url(r'^api/repository/samples/$', SampleList.as_view(), name='sample-list'),
    url(r'^api/repository/samples/add/$', CreateSampleList.as_view(), name='create-sample-list'),
    url(r'^api/repository/samples/(?P<pk>\d+)/$', SampleDetail.as_view(), name='sample-detail'),
    url(r'^api/repository/samples/(?P<pk>\d+)/fcs_original/$', retrieve_sample, name='retrieve_sample'),
    url(r'^api/repository/samples/(?P<pk>\d+)/fcs/$', retrieve_sample_as_pk, name='sample-download-as-pk'),
    url(r'^api/repository/samples/(?P<pk>\d+)/csv/$', retrieve_subsample_as_csv, name='retrieve_subsample_as_csv'),
    url(r'^api/repository/samples/(?P<pk>\d+)/npy/$', retrieve_subsample_as_numpy, name='retrieve_subsample_as_numpy'),

    url(r'^api/repository/compensations/$', CompensationList.as_view(), name='compensation-list'),
{'fraction_non_alphanumeric': 0.20667113643982568, 'fraction_numerical': 0.0030170968823332216, 'mean_word_length': 6.2327272727272724, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '722362', 'n_tokens_mistral': 2078, 'n_tokens_neox': 1977, 'n_words': 248}