Delete req_data.py

This commit is contained in:
HarshitGupta11 2019-07-24 15:55:44 +05:30 committed by GitHub
parent 6c0d50901a
commit 6387abb6a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,26 +0,0 @@
import os
import pandas
import sys
import urllib.request as urllib
import pandas as pd
lf=[]
def download_data(x,dir_name):
fname=x.split("/")[-1]
path=os.path.join(dir_name,fname)
urllib.urlretrieve(x,path)
def get_data_file(file,dir):
if not os.path.isfile(file):
print("The specified file does not exist!!!")
sys.exit(1)
with open(file,"r")as f:
lf=f.read().splitlines()
if not os.path.exists(dir):
os.mkdir(dir)
for x in lf:
download_data(x,dir)