<commit_before>from django.conf.urls import url
from stats.views import import_jsons, get_geography, get_areas_tree,\
    get_stats, get_candidates

urlpatterns = [
    url(r'^data/import/$', import_jsons, name='data-import'),
    url(r'^api/stats/areas-tree/$', get_areas_tree, name='areas-tree'), # returns  json {''}
    url(r'^api/stats/geography/$', get_geography, name='geography'),
    url(r'^api/stats/(?P<election_type>.+)/district-(?P<district>[\w|\W]+)/circle-(?P<number_of_district>[1-9]+)/circuit-(?P<number_of_electoral_circuit>[1-9]+)/$',
        get_stats, name='electoral-circuit-stats'),
    url(r'^api/stats/(?P<election_type>.+)/district-(?P<district>[\w|\W]+)/circuit-(?P<number_of_electoral_circuit>[1-9]+)/$',
        get_stats, name='district-stats'),
    url(r'^api/stats/(?P<election_type>.+)/district-(?P<district>[\w|\W]+)/circle-(?P<number_of_district>[1-9]+)/$',
        get_stats, name='electoral-circle-stats'),
    url(r'^api/stats/(?P<election_type>.+)/circle-(?P<number_of_district>[1-9]+)/$',
        get_stats, name='district-stats'), 
    url(r'^api/stats/(?P<election_type>.+)/circle-(?P<number_of_district>[1-9]+)/circuit-(?P<number_of_electoral_circuit>[1-9]+)/$',
        get_stats, name='district-stats'),
    url(r'^api/stats/(?P<election_type>.+)/district-(?P<district>[\w|\W]+)/$',
        get_stats, name='district-stats'),
    url(r'^api/stats/(?P<election_type>.+)/$', get_stats, name='stats'),
    url(r'^api/candidates/(?P<election_type>[a-z]+)/(?P<district>[\w|\W]+)/(?P<party>[\w|\W]+)/$', 
        get_candidates, name='candidates'),
    url(r'^api/candidates/(?P<election_type>[a-z]+)/(?P<district>[\w|\W]+)/(?P<circle>[1-9]+)/$', 
        get_candidates, name='index'),
]
<commit_msg>candidates urls improved<commit_after>from django.conf.urls import url
from stats.views import import_jsons, get_geography, get_areas_tree,\
    get_stats, get_candidates

urlpatterns = [
    url(r'^data/import/$', import_jsons, name='data-import'),
    url(r'^api/stats/areas-tree/$', get_areas_tree, name='areas-tree'), # returns  json {''}
    url(r'^api/stats/geography/$', get_geography, name='geography'),
    url(r'^api/stats/(?P<election_type>.+)/district-(?P<district>[\w|\W]+)/circle-(?P<number_of_district>[1-9]+)/circuit-(?P<number_of_electoral_circuit>[1-9]+)/$',
        get_stats, name='electoral-circuit-stats'),
    url(r'^api/stats/(?P<election_type>.+)/district-(?P<district>[\w|\W]+)/circuit-(?P<number_of_electoral_circuit>[1-9]+)/$',
        get_stats, name='district-stats'),
    url(r'^api/stats/(?P<election_type>.+)/district-(?P<district>[\w|\W]+)/circle-(?P<number_of_district>[1-9]+)/$',
        get_stats, name='electoral-circle-stats'),
    url(r'^api/stats/(?P<election_type>.+)/circle-(?P<number_of_district>[1-9]+)/$',
        get_stats, name='district-stats'), 
    url(r'^api/stats/(?P<election_type>.+)/circle-(?P<number_of_district>[1-9]+)/circuit-(?P<number_of_electoral_circuit>[1-9]+)/$',
        get_stats, name='district-stats'),
    url(r'^api/stats/(?P<election_type>.+)/district-(?P<district>[\w|\W]+)/$',
        get_stats, name='district-stats'),
    url(r'^api/stats/(?P<election_type>.+)/$', get_stats, name='stats'),
    url(r'^api/candidates/(?P<election_type>[a-z]+)/district-(?P<district>[\w|\W]+)/pparty-(?P<election_committee>[\w|\W]+)/$', 
        get_candidates, name='candidates'),
    url(r'^api/candidates/(?P<election_type>[a-z]+)/district-(?P<district>[\w|\W]+)/circle-(?P<number_of_district>[1-9]+)/$', 
        get_candidates, name='index'),
    url(r'^api/candidates/(?P<election_type>[a-z]+)/district-(?P<district>[\w|\W]+)/circle-(?P<number_of_district>[1-9]+)/circuit-(?P<number_of_electoral_circuit>[1-9]+)/$', 
        get_candidates, name='index'),
]

{'fraction_non_alphanumeric': 0.25651249335459864, 'fraction_numerical': 0.009569377990430622, 'mean_word_length': 5.219834710743801, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, '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': '5496841', 'n_tokens_mistral': 1577, 'n_tokens_neox': 1433, 'n_words': 107}