<commit_before><%!
from staticfiles.storage import staticfiles_storage
from pipeline_mako import compressed_css, compressed_js
%>

<%def name='url(file)'>${staticfiles_storage.url(file)}</%def>

<%def name='css(group)'>
  % if settings.MITX_FEATURES['USE_DJANGO_PIPELINE']:
    ${compressed_css(group)}
  % else:
    % for filename in settings.PIPELINE_CSS[group]['source_filenames']:
      <link rel="stylesheet" href="${staticfiles_storage.url(filename.replace('.scss', '.css'))}" type="text/css" media="all" / >
    % endfor
  %endif
</%def>
<%def name='js(group)'>
  % if settings.MITX_FEATURES['USE_DJANGO_PIPELINE']:
    ${compressed_js(group)}
  % else:
    % for filename in settings.PIPELINE_JS[group]['source_filenames']:
      <script type="text/javascript" src="${staticfiles_storage.url(filename.replace('.coffee', '.js'))}"></script>
    % endfor
  %endif
</%def><commit_msg>If there is a missing static file, don't break the server, just leave a dead url<commit_after><%!
from staticfiles.storage import staticfiles_storage
from pipeline_mako import compressed_css, compressed_js
%>

<%def name='url(file)'>
<%
try:
    url = staticfiles_storage.url(file)
except:
    url = file
%>${url}</%def>

<%def name='css(group)'>
  % if settings.MITX_FEATURES['USE_DJANGO_PIPELINE']:
    ${compressed_css(group)}
  % else:
    % for filename in settings.PIPELINE_CSS[group]['source_filenames']:
      <link rel="stylesheet" href="${staticfiles_storage.url(filename.replace('.scss', '.css'))}" type="text/css" media="all" / >
    % endfor
  %endif
</%def>
<%def name='js(group)'>
  % if settings.MITX_FEATURES['USE_DJANGO_PIPELINE']:
    ${compressed_js(group)}
  % else:
    % for filename in settings.PIPELINE_JS[group]['source_filenames']:
      <script type="text/javascript" src="${staticfiles_storage.url(filename.replace('.coffee', '.js'))}"></script>
    % endfor
  %endif
</%def>
{'fraction_non_alphanumeric': 0.1769677760169044, 'fraction_numerical': 0.0, 'mean_word_length': 5.486301369863014, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 24, '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': '6718905', 'n_tokens_mistral': 671, 'n_tokens_neox': 664, 'n_words': 117}