<commit_before>import os
import urllib
import zipfile
import platform
import sys


CHROMEDRIVER_VERSION = '2.12'
CHROMEDRIVER_PATH_BASE = 'http://chromedriver.storage.googleapis.com/{0}/'\
    .format(CHROMEDRIVER_VERSION)

ARCHITECTURE = platform.architecture()[0][:-3]
PLATFORM = platform.platform()


def after_install(options, home_dir):
    bootstrap_root = os.path.abspath(os.path.dirname(__file__))
    project_root = os.path.abspath(os.path.join(bootstrap_root, '..'))

    def _download_and_extract(url, extract_path):
        print('Downloading {0}'.format(url))
        tmp_zip_path = urllib.urlretrieve(url)[0]
        zf = zipfile.ZipFile(tmp_zip_path)
<commit_msg>Make bootstrapsrc.py py3 compatible.<commit_after>import os
try:
    from urllib.request import urlretrieve
except ImportError:
    from urllib import urlretrieve
import urllib
import zipfile
import platform
import sys


CHROMEDRIVER_VERSION = '2.12'
CHROMEDRIVER_PATH_BASE = 'http://chromedriver.storage.googleapis.com/{0}/'\
    .format(CHROMEDRIVER_VERSION)

ARCHITECTURE = platform.architecture()[0][:-3]
PLATFORM = platform.platform()


def after_install(options, home_dir):
    bootstrap_root = os.path.abspath(os.path.dirname(__file__))
    project_root = os.path.abspath(os.path.join(bootstrap_root, '..'))

    def _download_and_extract(url, extract_path):
        print('Downloading {0}'.format(url))
        tmp_zip_path = urlretrieve(url)[0]
        zf = zipfile.ZipFile(tmp_zip_path)

{'fraction_non_alphanumeric': 0.12203389830508475, 'fraction_numerical': 0.01152542372881356, 'mean_word_length': 4.743190661478599, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6782172', 'n_tokens_mistral': 528, 'n_tokens_neox': 509, 'n_words': 84}