Python wget.download() Examples

The following are 30 code examples for showing how to use wget.download(). These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

You may check out the related API usage on the sidebar.

You may also want to check out all available functions/classes of the module wget , or try the search function .

Example 1
Project: nmp_qc   Author: priba   File: download.py    License: MIT License 7 votes vote down vote up
def download_figshare(file_name, file_ext, dir_path='./', change_name = None):
    prepare_data_dir(dir_path)
    url = 'https://ndownloader.figshare.com/files/' + file_name
    wget.download(url, out=dir_path)
    file_path = os.path.join(dir_path, file_name)

    if file_ext == '.zip':
        zip_ref = zipfile.ZipFile(file_path,'r')
        if change_name is not None:
            dir_path = os.path.join(dir_path, change_name)
        zip_ref.extractall(dir_path)
        zip_ref.close()
        os.remove(file_path)
    elif file_ext == '.tar.bz2':
        tar_ref = tarfile.open(file_path,'r:bz2')
        if change_name is not None:
            dir_path = os.path.join(dir_path, change_name)
        tar_ref.extractall(dir_path)
        tar_ref.close()
        os.remove(file_path)
    elif change_name is not None:
        os.rename(file_path, os.path.join(dir_path, change_name))

# Download QM9 dataset 
Example 2
Project: iAI   Author: aimuch   File: yolov3_to_onnx.py    License: MIT License 7 votes vote down vote up
def download_file(local_path, link, checksum_reference=None):
    """Checks if a local file is present and downloads it from the specified path otherwise.
    If checksum_reference is specified, the file's md5 checksum is compared against the
    expected value.

    Keyword arguments:
    local_path -- path of the file whose checksum shall be generated
    link -- link where the file shall be downloaded from if it is not found locally
    checksum_reference -- expected MD5 checksum of the file
    """
    if not os.path.exists(local_path):
        print('Downloading from %s, this may take a while...' % link)
        wget.download(link, local_path)
        print()
    if checksum_reference is not None:
        checksum = generate_md5_checksum(local_path)
        if checksum != checksum_reference:
            raise ValueError(
                'The MD5 checksum of local file %s differs from %s, please manually remove \
                 the file and try again.' %
                (local_path, checksum_reference))
    return local_path 
Example 3
Project: dleccap   Author: maxim123   File: dleccap.py    License: Creative Commons Zero v1.0 Universal 7 votes vote down vote up
def download_recoding(recording, dest_folder=None):
    # construct url
    url = "https:%s%s/%s.%s" % (recording["mediaPrefix"],
                                recording["sitekey"],
                                recording["info"]["movie_exported_name"],
                                recording["info"]["movie_type"])

    if dest_folder is None:
        dest_folder = os.path.realpath(recording["sitename"])

    title = recording["title"].replace("/", "-")
    filename = "%s.%s" % (title, recording["info"]["movie_type"])
    destination = os.path.join(dest_folder, filename)

    # download!
    wget.download(url, out=destination) 
Example 4
Project: iAI   Author: aimuch   File: yolov3_to_onnx.py    License: MIT License 6 votes vote down vote up
def download_file(local_path, link, checksum_reference=None):
    """Checks if a local file is present and downloads it from the specified path otherwise.
    If checksum_reference is specified, the file's md5 checksum is compared against the
    expected value.

    Keyword arguments:
    local_path -- path of the file whose checksum shall be generated
    link -- link where the file shall be downloaded from if it is not found locally
    checksum_reference -- expected MD5 checksum of the file
    """
    if not os.path.exists(local_path):
        print('Downloading from %s, this may take a while...' % link)
        wget.download(link, local_path)
        print()
    if checksum_reference is not None:
        checksum = generate_md5_checksum(local_path)
        if checksum != checksum_reference:
            raise ValueError(
                'The MD5 checksum of local file %s differs from %s, please manually remove \
                 the file and try again.' %
                (local_path, checksum_reference))
    return local_path 
Example 5
Project: cdQA   Author: cdqa-suite   File: test_converters.py    License: Apache License 2.0 6 votes vote down vote up
def download_test_assets(tmpdir_factory):
    assets_urls = [
        # PDF
        "https://invest.bnpparibas.com/documents/1q19-pr-12648",
        "https://invest.bnpparibas.com/documents/4q18-pr-18000",
        "https://invest.bnpparibas.com/documents/4q17-pr",
        # MD
        "https://raw.githubusercontent.com/cdqa-suite/cdQA/master/README.md",
        "https://raw.githubusercontent.com/huggingface/pytorch-transformers/master/docs/source/quickstart.md",
        "https://raw.githubusercontent.com/huggingface/pytorch-transformers/master/docs/source/migration.md",
    ]

    print("\nDownloading assets...")
    fn = tmpdir_factory.mktemp("assets_data")
    for url in assets_urls:
        wget.download(url=url, out=str(fn))
    return fn 
Example 6
Project: cdQA   Author: cdqa-suite   File: download.py    License: Apache License 2.0 6 votes vote down vote up
def download_bnpp_data(dir="."):
    """
    Download BNP Paribas' dataset

    Parameters
    ----------
    dir: str
        Directory where the dataset will be stored

    """

    dir = os.path.expanduser(dir)
    if not os.path.exists(dir):
        os.makedirs(dir)

    url = "https://github.com/cdqa-suite/cdQA/releases/download/bnpp_newsroom_v1.1/bnpp_newsroom-v1.1.csv"

    print("\nDownloading BNP data...")

    file = url.split("/")[-1]
    if os.path.exists(os.path.join(dir, file)):
        print(file, "already downloaded")
    else:
        wget.download(url=url, out=dir) 
Example 7
Project: helen   Author: kishwarshafin   File: DownloadModel.py    License: MIT License 6 votes vote down vote up
def download_models(output_dir):
    output_dir = FileManager.handle_output_directory(output_dir)
    sys.stderr.write(TextColor.YELLOW + "DOWNLOADING MODEL DESCRIPTION FILE" + TextColor.END + "\n")
    description_file = "https://storage.googleapis.com/kishwar-helen/models_helen/mp_helen_model_description.csv"
    wget.download(description_file, output_dir)
    sys.stderr.write("\n")
    sys.stderr.flush()

    with open(output_dir+'/mp_helen_model_description.csv') as f:
        models = [line.rstrip() for line in f]

    os.remove(output_dir+'/mp_helen_model_description.csv')

    for model in models:
        model_name, model_url = model.split(',')
        sys.stderr.write("INFO: DOWNLOADING FILE: " + str(model_name) + ".pkl\n")
        sys.stderr.write("INFO: DOWNLOADING LINK: " + str(model_url) + "\n")
        wget.download(model_url, output_dir)
        sys.stderr.write("\n")
        sys.stderr.flush() 
Example 8
Project: kubeflow-and-mlops   Author: aronchick   File: data.py    License: Apache License 2.0 6 votes vote down vote up
def download(source, target, force_clear=False):
    if force_clear and os.path.exists(target):
        print('Removing {}...'.format(target))
        shutil.rmtree(target)

    check_dir(target)
    
    targt_file = str(Path(target).joinpath('data.zip'))
    if os.path.exists(targt_file) and not force_clear:
        print('data already exists, skipping download')
        return

    if source.startswith('http'):
        print("Downloading from {} to {}".format(source, target))
        wget.download(source, targt_file)  
        print("Done!")
    else:
        print("Copying from {} to {}".format(source, target))
        shutil.copyfile(source, targt_file)

    print('Unzipping {}'.format(targt_file))
    zipr = zipfile.ZipFile(targt_file)
    zipr.extractall(target)
    zipr.close() 
Example 9
Project: spraykatz   Author: aas-n   File: Resources.py    License: MIT License 6 votes vote down vote up
def initSpraykatz():
    logging.warning("%sHey, did you read the code?\n" % (debugBlue))

    # Ensure procdump binaries are available to be used by Spraykatz.
    procdumpPath = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), 'misc', 'procdump')
    procdumpZip = os.path.join(procdumpPath, 'procdump.zip')
    procdump32 = os.path.join(procdumpPath, 'procdump32.exe')
    procdump64 = os.path.join(procdumpPath, 'procdump64.exe')
    if not os.path.isfile(procdump32) or not os.path.isfile(procdump64):
        choices = ['y','yes','Y','Yes','YES']
        choice = input("%sProcDump binaries have not been found. Do you want Spraykatz to download them? [y/N]" % (infoYellow)).lower()

        if choice in choices:
            url = 'https://download.sysinternals.com/files/Procdump.zip'
            wget.download(url, procdumpZip)
            with zipfile.ZipFile(procdumpZip, 'r') as zip_ref:
                zip_ref.extractall(procdumpPath)
            os.rename(os.path.join(procdumpPath, 'procdump.exe'), procdump32)
            os.remove(procdumpZip)
            logging.warning("\n")
        else:
            logging.warning("\n%sYou can manually download and put 'procdump32.exe' and 'procdump64.exe' into misc/procdump folder." % (warningRed))
            sys.exit(2) 
Example 10
Project: mvsec   Author: daniilidis-group   File: downloader.py    License: MIT License 6 votes vote down vote up
def get_data(experiment_name, experiment_numbers=None,overwrite=False):
    assert experiment_name in experiments
    if type(experiment_numbers)==int:
        experiment_numbers=[experiment_numbers]
    elif type(experiment_numbers)==list:
        pass
    elif experiment_numbers is None:
        experiment_numbers = range(0, number_of_runs[experiments.index(experiment_name)])
    else:
        raise TypeError("Unsupported type "+type(experiment_numbers))

    base_url = os.path.join(MVSEC_URL, experiment_name, experiment_name)
    full_urls = [base_url+str(n)+"_data.bag" for n in experiment_numbers]

    base_path = os.path.join(TMP_FOLDER, experiment_name, experiment_name)
    full_paths = [base_path+str(n)+"_data.bag" for n in experiment_numbers]

    download(full_urls, full_paths, overwrite)

    return full_paths 
Example 11
Project: mvsec   Author: daniilidis-group   File: downloader.py    License: MIT License 6 votes vote down vote up
def get_ground_truth(experiment_name, experiment_numbers=None,overwrite=False):
    assert experiment_name in experiments
    if type(experiment_numbers)==int:
        experiment_numbers=[experiment_numbers]
    elif type(experiment_numbers)==list:
        pass
    elif experiment_numbers is None:
        experiment_numbers = range(0, number_of_runs[experiments.index(experiment_name)])
    else:
        raise TypeError("Unsupported type "+type(experiment_numbers))

    base_url = os.path.join(MVSEC_URL, experiment_name, experiment_name)
    full_urls = [base_url+str(n)+"_gt.bag" for n in experiment_numbers]

    base_path = os.path.join(TMP_FOLDER, experiment_name, experiment_name)
    full_paths = [base_path+str(n)+"_gt.bag" for n in experiment_numbers]

    download(full_urls, full_paths, overwrite)

    return full_paths 
Example 12
Project: combine-FEVER-NSMN   Author: easonnie   File: wiki_pageview_utils.py    License: MIT License 6 votes vote down vote up
def pageview_download():
    import wget

    qtime = datetime.datetime.now()
    one_hour = datetime.timedelta(hours=1)
    qtime -= one_hour
    for _ in range(30*24):
        qtime -= one_hour
        file_name = get_file_name(qtime.month, qtime.day, qtime.hour)
        rlink = link_path_root + file_name
        local_path = save_path_root + file_name

        dir_path = os.path.dirname(local_path)
        if not os.path.exists(dir_path):
            os.makedirs(dir_path)

        print(f"Downloading {file_name}")
        wget.download(rlink, out=local_path) 
Example 13
Project: digit-classifier   Author: kdexd   File: main.py    License: MIT License 6 votes vote down vote up
def load_mnist():
    if not os.path.exists(os.path.join(os.curdir, "data")):
        os.mkdir(os.path.join(os.curdir, "data"))
        wget.download("http://deeplearning.net/data/mnist/mnist.pkl.gz", out="data")

    data_file = gzip.open(os.path.join(os.curdir, "data", "mnist.pkl.gz"), "rb")
    train_data, val_data, test_data = pickle.load(data_file, encoding="latin1")
    data_file.close()

    train_inputs = [np.reshape(x, (784, 1)) for x in train_data[0]]
    train_results = [vectorized_result(y) for y in train_data[1]]
    train_data = list(zip(train_inputs, train_results))

    val_inputs = [np.reshape(x, (784, 1)) for x in val_data[0]]
    val_results = val_data[1]
    val_data = list(zip(val_inputs, val_results))

    test_inputs = [np.reshape(x, (784, 1)) for x in test_data[0]]
    test_data = list(zip(test_inputs, test_data[1]))
    return train_data, val_data, test_data 
Example 14
Project: RastLeak   Author: n4xh4ck5   File: RastLeak_1_0.py    License: GNU General Public License v3.0 6 votes vote down vote up
def Downloadfiles(urls_metadata):
	print "\nDo you like downloading these files to analyze metadata(Y/N)?"
	#try:
	resp = raw_input()
	if (resp == 'N'):
		print "Exiting"
		exit(1)
	if ((resp != 'Y') and (resp != 'N')):
		print "The option is not valided. Please, try again it"
	if (resp =='Y'):
		try:
			for url in urls_metadata:
				try:
					filename= wget.download(url,"/opt/")
					Analyze_Metadata(filename)
				except Exception, e:
					print e
		except:
			pass
#********************************************************#
#Definition and treatment of the parameters 
Example 15
Project: RastLeak   Author: n4xh4ck5   File: RastLeak_1_1.py    License: GNU General Public License v3.0 6 votes vote down vote up
def Downloadfiles(urls_metadata):
	print "\nDo you like downloading these files to analyze metadata(Y/N)?"
	#try:
	resp = raw_input().lower()
	if (resp == 'n'):
		print "Exiting"
		exit(1)
	if ((resp != 'y') and (resp != 'n')):
		print "The option is not valided. Please, try again it"
	if (resp =='y'):
		print "Indicate the location where you want to keep the files downloaded"
		path = raw_input()
		try:
			for url in urls_metadata:
				try:
					filename= wget.download(url,path)
					Analyze_Metadata(filename)
				except Exception, e:
					print e
		except:
			pass
#********************************************************#
#Definition and treatment of the parameters 
Example 16
Project: RastLeak   Author: n4xh4ck5   File: downloadfiles.py    License: GNU General Public License v3.0 6 votes vote down vote up
def Downloadfiles(urls_metadata,output,target):
	path = None
	try:
		filename = None
		print "\nDo you like downloading these files to analyze metadata(Y/N)?"
		#Convert to lower the input
		resp = raw_input().lower()
		if (resp == 'n'):
			print "Exiting"
			exit(1)
		if ((resp != 'y') and (resp != 'n')):
			print "The option is not valided. Please, try again it"
		if (resp =='y'):
			path = str(target) + '/temp'
			for url in urls_metadata:
				filename = wget.download(url,str(path))
				Analyze_Metadata(filename)
			time.sleep(3)
			#Delete temp folder
			os.system('rm -r ' + str(path))
			Display_Export_Metadata(metadata_files,output,target)
	except Exception as e:
		print str(e) 
Example 17
Project: RastLeak   Author: n4xh4ck5   File: RastLeak_1_0.py    License: GNU General Public License v3.0 6 votes vote down vote up
def Downloadfiles(urls_metadata):
	print "\nDo you like downloading these files to analyze metadata(Y/N)?"
	#try:
	resp = raw_input()
	if (resp == 'N'):
		print "Exiting"
		exit(1)
	if ((resp != 'Y') and (resp != 'N')):
		print "The option is not valided. Please, try again it"
	if (resp =='Y'):
		try:
			for url in urls_metadata:
				try:
					filename= wget.download(url,"/opt/")
					Analyze_Metadata(filename)
				except Exception, e:
					print e
		except:
			pass
#********************************************************#
#Definition and treatment of the parameters 
Example 18
Project: RastLeak   Author: n4xh4ck5   File: RastLeak_1_1.py    License: GNU General Public License v3.0 6 votes vote down vote up
def Downloadfiles(urls_metadata):
	print "\nDo you like downloading these files to analyze metadata(Y/N)?"
	#try:
	resp = raw_input().lower()
	if (resp == 'n'):
		print "Exiting"
		exit(1)
	if ((resp != 'y') and (resp != 'n')):
		print "The option is not valided. Please, try again it"
	if (resp =='y'):
		print "Indicate the location where you want to keep the files downloaded"
		path = raw_input()
		try:
			for url in urls_metadata:
				try:
					filename= wget.download(url,path)
					Analyze_Metadata(filename)
				except Exception, e:
					print e
		except:
			pass
#********************************************************#
#Definition and treatment of the parameters 
Example 19
Project: RastLeak   Author: n4xh4ck5   File: RastLeak_1_2.py    License: GNU General Public License v3.0 6 votes vote down vote up
def Downloadfiles(urls_metadata):
	print "\nDo you like downloading these files to analyze metadata(Y/N)?"
	#try:
	resp = raw_input()
	if (resp == 'N'):
		print "Exiting"
		exit(1)
	if ((resp != 'Y') and (resp != 'N')):
		print "The option is not valided. Please, try again it"
	if (resp =='Y'):
		print "Indicate the location where keep the files downloaded"
		path = raw_input()
		try:
			for url in urls_metadata:
				try:
					filename = wget.download(url,path)
					Analyze_Metadata(filename)
				except:
					pass
			Display_Export_Metadata(metadata_files)
		except:
			pass
#********************************************************#
#Definition and treatment of the parameters 
Example 20
Project: nmp_qc   Author: priba   File: download.py    License: MIT License 5 votes vote down vote up
def download_file(url, file_ext, dir_path='./'):
    file_name = wget.download(url, out=dir_path)
    file_path = os.path.join(dir_path, file_name)
    if file_ext == '.zip':
        zip_ref = zipfile.ZipFile(file_path,'r')
        zip_ref.extractall(dir_path)
        zip_ref.close()
        os.remove(file_path)

# Download data from figshare 
Example 21
Project: pywren-ibm-cloud   Author: pywren   File: gromacs_with_pywren.py    License: Apache License 2.0 5 votes vote down vote up
def sh_cmd_executor(x, param1, ibm_cos):
    pywren_config = json.loads(os.environ['PYWREN_CONFIG'])
    bucket = pywren_config['pywren']['storage_bucket']
    print (bucket)
    print (param1)
    filename = 'benchMEM.zip'
    outfile = os.path.join(temp_dir, filename)

    if not os.path.isfile(filename):
        filename = wget.download('https://www.mpibpc.mpg.de/15101317/benchMEM.zip', out=outfile)
        print(filename, "was downloaded")
        with zipfile.ZipFile(outfile, 'r') as zip_ref:
            print('Extracting file to %s' % temp_dir)
            zip_ref.extractall(temp_dir)
    else:
        print(filename, " already exists")

    os.chdir(temp_dir)
    cmd = "/usr/local/gromacs/bin/gmx mdrun -nt 4 -s benchMEM.tpr -nsteps 1000 -resethway"

    st = time.time()
    import subprocess
    subprocess.call(cmd, shell=True)
    run_time = time.time() - st

    # upload results to IBM COS
    res = ['confout.gro', 'ener.edr', 'md.log',  'state.cpt']
    for name in res:
        f = open(os.path.join(temp_dir, name), "rb")
        ibm_cos.put_object(Bucket=bucket, Key=os.path.join('gmx-mem', name), Body=f)

    with open('md.log', 'r') as file:
        data = file.read()

    return {'run_time': run_time, 'md_log': data} 
Example 22
Project: dleccap   Author: maxim123   File: dleccap.py    License: Creative Commons Zero v1.0 Universal 5 votes vote down vote up
def get_site_id(url):
    # followed by site ID
    str1 = "//leccap.engin.umich.edu/leccap/site/"
    str2 = "//leccap.engin.umich.edu/leccap/viewer/s/"
    # followed by recording ID
    str3 = "//leccap.engin.umich.edu/leccap/viewer/r/"
    # CTools page
    str4 = "//ctools.umich.edu/portal/site/"
    # Canvas page
    str5 = "//umich.instructure.com/courses/"

    # parse
    if str1 in url:
        return url.split(str1, 1)[1]
    elif str2 in url:
        return url.split(str2, 1)[1]
    elif str3 in url:
        # more complicated
        return get_site_id_from_view_url(url)
    elif str4 in url:
        return get_cookie_and_site_id_from_ctools(url)
    elif str5 in url:
        print_error(":( Cannot download recordings published to Canvas (yet)!")
        return
        # return get_cookie_and_site_id_from_canvas(url)
    else:
        return None 
Example 23
Project: yolo2-pytorch   Author: ruiminshen   File: download_url.py    License: GNU Lesser General Public License v3.0 5 votes vote down vote up
def _task(url, root, ext):
    path = wget.download(url, bar=None)
    with open(path + ext, 'w') as f:
        f.write(url) 
Example 24
Project: cdQA   Author: cdqa-suite   File: download.py    License: Apache License 2.0 5 votes vote down vote up
def download_model(model="bert-squad_1.1", dir="."):
    """
    Download pretrained models

    Parameters
    ----------
    model: str
        Model to be download. It should be one of the models in the list:
        `bert-squad_1.1`, `distilbert-squad_1.1`

    dir: str
        Directory where the dataset will be stored

    """

    models_url = {
        "bert-squad_1.1": "https://github.com/cdqa-suite/cdQA/releases/download/bert_qa/bert_qa.joblib",
        "distilbert-squad_1.1": "https://github.com/cdqa-suite/cdQA/releases/download/distilbert_qa/distilbert_qa.joblib"
    }

    if not model in models_url:
        print(
            "The model you chose does not exist. Please choose one of the following models:"
        )
        for model in models_url.keys():
            print(model)
    else:
        print("\nDownloading trained model...")

        dir = os.path.expanduser(dir)
        if not os.path.exists(dir):
            os.makedirs(dir)

        url = models_url[model]
        file = url.split("/")[-1]
        if os.path.exists(os.path.join(dir, file)):
            print(file, "already downloaded")
        else:
            wget.download(url=url, out=dir) 
Example 25
Project: Grok-backdoor   Author: deepzec   File: grok-backdoor.py    License: GNU General Public License v3.0 5 votes vote down vote up
def Ngrok_Download(ostype):
    filename = 'ngrok-stable-{0}-386.zip'.format(ostype)
    url = 'https://bin.equinox.io/c/4VmDzA7iaHb/' + filename
    download(url) 
Example 26
Project: Grok-backdoor   Author: deepzec   File: grok-backdoor.py    License: GNU General Public License v3.0 5 votes vote down vote up
def NgrokDownload(platform):
    user_input = raw_input("\nDo you want to download Ngrok executable during backdoor execution?(Y/N):\n\nOption >  ".format(GREEN, END)).upper()
    if user_input == 'Y':
        Ngrok_Download_Conf(True, platform)

    else:
        print("We will bind ngrok binary with the backdoor..\n\n")
        Ngrok_Download_Conf(False, platform) 
Example 27
Project: holy-edge   Author: moabitcoin   File: io.py    License: GNU General Public License v3.0 5 votes vote down vote up
def download_data(self, filepath, outputdir):

        _, rar_file = os.path.split(filepath)
        rar_file = os.path.join(outputdir, rar_file)

        if not os.path.exists(rar_file):
            self.print_info('Downloading {} to {}'.format(filepath, rar_file))
            _ = wget.download(filepath, out=outputdir)

        self.print_info('Decompressing {} to {}'.format(rar_file, outputdir))
        Archive(rar_file).extractall(outputdir) 
Example 28
Project: mvsec   Author: daniilidis-group   File: downloader.py    License: MIT License 5 votes vote down vote up
def download(urls, filenames, overwrite=False):
    for url, fn in zip(urls, filenames):
        if not os.path.exists(fn) or overwrite:
            if not os.path.exists(os.path.dirname(fn)):
                os.makedirs(os.path.dirname(fn))
            if HAS_WGET:
                wget.download(url, fn)
            else:
                subprocess.call(['wget',
                    '--no-check-certificate',
                    url,
                    '-O', fn]) 
Example 29
Project: mvsec   Author: daniilidis-group   File: downloader.py    License: MIT License 5 votes vote down vote up
def get_calibration(experiment, overwrite=False):
    assert experiment in experiments
    full_url = [os.path.join(MVSEC_URL, experiment, experiment+"_calib.zip")]
    full_local = [os.path.join(TMP_FOLDER, experiment, experiment+"_calib.zip")]

    download(full_url, full_local, overwrite)

    return full_local[0] 
Example 30
Project: AiGEM_TeamHeidelberg2017   Author: igemsoftware2017   File: DeeProtein.py    License: MIT License 5 votes vote down vote up
def download_weights(self):
        """Download the weigths to restore DeeProtein from the 2017 iGEM wiki.

        Returns:
          A path to the dir containing the downloaded weigths.
        """
        url = 'https://zenodo.org/record/1035806/files/DeeProtein_weigths_ResNet30_886.tar.gz'
        curr_wd = os.getcwd()
        if not os.path.exists(self._opts._restorepath):
            os.mkdir(self._opts._restorepath)
        os.chdir(self._opts._restorepath)
        zip = wget.download(url)
        helpers.untar(zip)
        os.chdir(curr_wd)
        return os.path.join(self._opts._restorepath, 'DeeProtein_weights/')