<commit_before>import os
import sys
try:                 # Python 3
    import urllib.request as urllib
except ImportError:  # Python 2
    import urllib


pkg_version = os.environ['PKG_VERSION']
driver_version = "{0}.{1}".format(*pkg_version.split("."))
if sys.platform == 'win32':
    chromedriver_pkg = 'chromedriver_win32.zip'
elif sys.platform == 'darwin':
    chromedriver_pkg = 'chromedriver_mac64.zip'
else:
    chromedriver_pkg = 'chromedriver_linux64.zip'


download_url = 'https://chromedriver.storage.googleapis.com/{0}/{1}'.format(driver_version, chromedriver_pkg)

resp = urllib.urlopen(download_url)
with open('chromedriver.zip', 'wb') as zip_file:
    zip_file.write(resp.read())<commit_msg>Use curl instead urllib<commit_after>import os
import sys
import subprocess

pkg_version = os.environ['PKG_VERSION']
driver_version = "{0}.{1}".format(*pkg_version.split("."))
if sys.platform == 'win32':
    chromedriver_pkg = 'chromedriver_win32.zip'
elif sys.platform == 'darwin':
    chromedriver_pkg = 'chromedriver_mac64.zip'
else:
    chromedriver_pkg = 'chromedriver_linux64.zip'


download_url = 'https://chromedriver.storage.googleapis.com/{0}/{1}'.format(driver_version, chromedriver_pkg)

subprocess.call(['curl', download_url, '-o', 'chromedriver.zip'], shell=True)
{'fraction_non_alphanumeric': 0.14330218068535824, 'fraction_numerical': 0.020249221183800622, 'mean_word_length': 5.330049261083744, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4330839', 'n_tokens_mistral': 470, 'n_tokens_neox': 445, 'n_words': 78}