<commit_before>#!/bin/sh

prod=true
[ $# -gt 0 -a "$1" == -d ] && prod=false

if $prod; then
    [ $VIRTUAL_ENV ] || source /var/django/virtualenv/django/bin/activate
    sudo chmod -R g+w /var/log/django
else
    [ $VIRTUAL_ENV ] || source $HOME/virtualenvs/django/bin/activate
fi

chmod -R g+w static

python3 manage.py findstatic ncharts/jslib/ncharts.js
python3 manage.py collectstatic

chmod -R -w static
<commit_msg>Add user write permission before collecting static files<commit_after>#!/bin/sh

prod=true
[ $# -gt 0 -a "$1" == -d ] && prod=false

if $prod; then
    [ $VIRTUAL_ENV ] || source /var/django/virtualenv/django/bin/activate
    sudo chmod -R g+w /var/log/django
else
    [ $VIRTUAL_ENV ] || source $HOME/virtualenvs/django/bin/activate
fi

chmod -R ug+w static

python3 manage.py findstatic ncharts/jslib/ncharts.js
python3 manage.py collectstatic

chmod -R -w static

{'fraction_non_alphanumeric': 0.13513513513513514, 'fraction_numerical': 0.009009009009009009, 'mean_word_length': 3.5357142857142856, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5118348', 'n_tokens_mistral': 347, 'n_tokens_neox': 331, 'n_words': 85}