<commit_before>import sys
import os
import urllib2
import tarfile
import subprocess
import json

packages = {
    "fftw" : ["http://www.fftw.org/fftw-3.3.4.tar.gz", 
              ["--enable-fortran", "--disable-mpi", "--enable-openmp", "--enable-threads"]
             ],
    "gsl"  : ["ftp://ftp.gnu.org/gnu/gsl/gsl-1.16.tar.gz", 
              ["--disable-shared"]
             ],
    "hdf5" : ["http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.14.tar.gz",
              ["--enable-fortran", "--disable-shared", "--enable-static=yes", 
               "--disable-deprecated-symbols", "--disable-filters","--disable-parallel", "--with-zlib=no","--with-szlib=no"]
             ],
    "xc"   : ["http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-2.2.1.tar.gz",
              []
             ],
    "spg"  : ["http://downloads.sourceforge.net/project/spglib/spglib/spglib-1.7/spglib-1.7.0.tar.gz",
              []
             ]
}

def configure_package(package_name, platform):

    package = packages[package_name]
   
    file_url = package[0]
    
    local_file_name = os.path.split(file_url)[1]

    package_dir = os.path.splitext(os.path.splitext(local_file_name)[0])[0]

    cwdlibs = os.getcwd() + "/libs/"
    
    if (not os.path.exists("./libs/" + local_file_name)):
        try:
            print "Downloading " + file_url
            req = urllib2.Request(file_url)
            furl = urllib2.urlopen(req)<commit_msg>update configure script<commit_after>import sys
import os
import urllib2
import tarfile
import subprocess
import json

packages = {
    "fftw" : ["http://www.fftw.org/fftw-3.3.4.tar.gz", 
              ["--enable-fortran", "--disable-mpi", "--enable-openmp", "--enable-threads"]
             ],
    "gsl"  : ["ftp://ftp.gnu.org/gnu/gsl/gsl-1.16.tar.gz", 
              ["--disable-shared"]
             ],
    "hdf5" : ["http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.14.tar.gz",
              ["--enable-fortran", "--disable-shared", "--enable-static=yes", 
               "--disable-deprecated-symbols", "--disable-filters","--disable-parallel", "--with-zlib=no","--with-szlib=no"]
             ],
    "xc"   : ["http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-2.2.2.tar.gz",
              []
             ],
    "spg"  : ["http://downloads.sourceforge.net/project/spglib/spglib/spglib-1.7/spglib-1.7.1.tar.gz",
              []
             ]
}

def configure_package(package_name, platform):

    package = packages[package_name]
   
    file_url = package[0]
    
    local_file_name = os.path.split(file_url)[1]

    package_dir = os.path.splitext(os.path.splitext(local_file_name)[0])[0]

    cwdlibs = os.getcwd() + "/libs/"
    
    if (not os.path.exists("./libs/" + local_file_name)):
        try:
            print "Downloading " + file_url
            req = urllib2.Request(file_url)
            furl = urllib2.urlopen(req)
{'fraction_non_alphanumeric': 0.1891334250343879, 'fraction_numerical': 0.01925722145804677, 'mean_word_length': 2.084835630965005, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '7095469', 'n_tokens_mistral': 1087, 'n_tokens_neox': 1053, 'n_words': 121}