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

packageDir = "packages"
tempDir = os.path.join(packageDir, "temp")
zipDir = os.path.join(tempDir, "packages.zip")

# Check if we need to download packages
if not os.path.exists(packageDir):	
	
	# Create package directory, and temp download directory
	os.makedirs(packageDir)
	os.makedirs(tempDir)
	
	# Identify and download correct set of packages
	if True:# platform.system() == "Windows":
		print("Downloading Windows packages...")
		urllib.urlretrieve("http://www.willcassella.net/WillowEngine/packages/windows.zip", zipDir)
	
	print "Extracting packages..."
	pak = zipfile.ZipFile(zipDir)
	pak.extractall(packageDir)
	pak.close()
	
	# Delete temp directory
	shutil.rmtree(tempDir)
	
print("Packages up to date")<commit_msg>Updated packages script to Python 3<commit_after>import os
import urllib
import zipfile
import shutil
import platform

packageDir = "packages"
tempDir = os.path.join(packageDir, "temp")
zipDir = os.path.join(tempDir, "packages.zip")

# Check if we need to download packages
if not os.path.exists(packageDir):	
	
	# Create package directory, and temp download directory
	os.makedirs(packageDir)
	os.makedirs(tempDir)
	
	# Identify and download correct set of packages
	if True:# platform.system() == "Windows":
		print("Downloading Windows packages...")
		urllib.urlretrieve("http://www.willcassella.net/WillowEngine/packages/windows.zip", zipDir)
	
	print("Extracting packages...")
	pak = zipfile.ZipFile(zipDir)
	pak.extractall(packageDir)
	pak.close()
	
	# Delete temp directory
	shutil.rmtree(tempDir)
	
print("Packages up to date")
{'fraction_non_alphanumeric': 0.11414693381906496, 'fraction_numerical': 0.0006071645415907711, 'mean_word_length': 5.081180811808118, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2697890', 'n_tokens_mistral': 552, 'n_tokens_neox': 524, 'n_words': 139}