<commit_before>#!/usr/bin/env python
import os
import subprocess

def run(*a, **kw):
    ret = subprocess.call(*a, **kw)
    if ret != 0:
        print("Error runnning: %r" % a)
        raise SystemExit(1)

def main():
    run(['virtualenv', 'env'])
    print("\n\n" + "-"*79)
    print("Downloading and installing requirements")
    print("\n\n")
    run(['./env/bin/pip', 'install', '-r', 'requirements.txt'])
    print("\n\n" + "-"*79)
    print("Answer 'yes' to whether you want to create a superuser")
    print("\n\n")
    run(['./env/bin/python', 'manage.py', 'syncdb'])
    run(['./env/bin/python', 'manage.py', 'migrate'])
    print("\n\n" + "-"*79)
    print("Answer 'yes' to the question")
    print("\n\n")
    run(['./env/bin/python', 'manage.py', 'collectstatic'])
    print("\n\n" + "-"*79)
    print("Database + environment setup done!")
    print("\n\n")

if __name__ == "__main__":
    main()<commit_msg>Use pypi mirrors in bootstrap.py<commit_after>#!/usr/bin/env python
import os
import subprocess

def run(*a, **kw):
    ret = subprocess.call(*a, **kw)
    if ret != 0:
        print("Error runnning: %r" % a)
        raise SystemExit(1)

def main():
    run(['virtualenv', 'env'])
    print("\n\n" + "-"*79)
    print("Downloading and installing requirements")
    print("\n\n")
    run(['./env/bin/pip', 'install', '-r', 'requirements.txt', '--use-mirrors'])
    print("\n\n" + "-"*79)
    print("Answer 'yes' to whether you want to create a superuser")
    print("\n\n")
    run(['./env/bin/python', 'manage.py', 'syncdb'])
    run(['./env/bin/python', 'manage.py', 'migrate'])
    print("\n\n" + "-"*79)
    print("Answer 'yes' to the question")
    print("\n\n")
    run(['./env/bin/python', 'manage.py', 'collectstatic'])
    print("\n\n" + "-"*79)
    print("Database + environment setup done!")
    print("\n\n")

if __name__ == "__main__":
    main()
{'fraction_non_alphanumeric': 0.23351063829787233, 'fraction_numerical': 0.010638297872340425, 'mean_word_length': 3.019230769230769, 'pattern_counts': {'":': 2, '<': 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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1243414', 'n_tokens_mistral': 702, 'n_tokens_neox': 678, 'n_words': 158}