提交 cf6dd99e 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!2781 clean codedex warning

Merge pull request !2781 from hanjun996/master
...@@ -17,6 +17,8 @@ import os ...@@ -17,6 +17,8 @@ import os
import pickle import pickle
import collections import collections
import argparse import argparse
import urllib.request
import tarfile
import numpy as np import numpy as np
from mindspore.mindrecord import FileWriter from mindspore.mindrecord import FileWriter
...@@ -257,10 +259,15 @@ if __name__ == '__main__': ...@@ -257,10 +259,15 @@ if __name__ == '__main__':
download_data_path = data_path + "origin_data/" download_data_path = data_path + "origin_data/"
mkdir_path(download_data_path) mkdir_path(download_data_path)
os.system( url = "https://s3-eu-west-1.amazonaws.com/kaggle-display-advertising-challenge-dataset/dac.tar.gz"
"wget -P {} -c https://s3-eu-west-1.amazonaws.com/kaggle-display-advertising-challenge-dataset/dac.tar.gz --no-check-certificate".format( file_name = download_data_path + '/' + url.split('/')[-1]
download_data_path)) urllib.request.urlretrieve(url, filename=file_name)
os.system("tar -zxvf {}dac.tar.gz".format(download_data_path))
tar = tarfile.open(file_name)
names = tar.getnames()
for name in names:
tar.extract(name, path=download_data_path)
tar.close()
criteo_stats = CriteoStatsDict() criteo_stats = CriteoStatsDict()
data_file_path = data_path + "origin_data/train.txt" data_file_path = data_path + "origin_data/train.txt"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册