Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
models
提交
836f4378
M
models
项目概览
PaddlePaddle
/
models
大约 1 年 前同步成功
通知
222
Star
6828
Fork
2962
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
602
列表
看板
标记
里程碑
合并请求
255
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
602
Issue
602
列表
看板
标记
里程碑
合并请求
255
合并请求
255
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
836f4378
编写于
6月 24, 2019
作者:
H
hutuxian
提交者:
GitHub
6月 24, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
transfer data to bos (#2520)
上级
d09a24c8
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
1 addition
and
80 deletion
+1
-80
PaddleRec/gnn/data/download.sh
PaddleRec/gnn/data/download.sh
+1
-5
PaddleRec/gnn/data/gdown.pl
PaddleRec/gnn/data/gdown.pl
+0
-75
未找到文件。
PaddleRec/gnn/data/download.sh
浏览文件 @
836f4378
#!/bin/bash
#The gdown.pl script comes from: https://github.com/circulosmeos/gdown.pl
./gdown.pl https://drive.google.com/open?id
=
0B7XZSACQf0KdenRmMk8yVUU5LWc dataset-train-diginetica.zip
unzip dataset-train-diginetica.zip
"train-item-views.csv"
sed
-i
'1d'
train-item-views.csv
sed
-i
'1i session_id;user_id;item_id;timeframe;eventdate'
train-item-views.csv
wget
--no-check-certificate
https://sr-gnn.bj.bcebos.com/train-item-views.csv
mkdir
diginetica
PaddleRec/gnn/data/gdown.pl
已删除
100755 → 0
浏览文件 @
d09a24c8
#!/usr/bin/env perl
#
# Google Drive direct download of big files
# ./gdown.pl 'gdrive file url' ['desired file name']
#
# v1.0 by circulosmeos 04-2014.
# v1.1 by circulosmeos 01-2017.
# v1.2, v1.3, v1.4 by circulosmeos 01-2019, 02-2019.
# //circulosmeos.wordpress.com/2014/04/12/google-drive-direct-download-of-big-files
# Distributed under GPL 3 (//www.gnu.org/licenses/gpl-3.0.html)
#
use
strict
;
use
POSIX
;
my
$TEMP
=
'
gdown.cookie.temp
';
my
$COMMAND
;
my
$confirm
;
my
$check
;
sub
execute_command
();
my
$URL
=
shift
;
die
"
\n
./gdown.pl 'gdrive file url' [desired file name]
\n\n
"
if
$URL
eq
'';
my
$FILENAME
=
shift
;
$FILENAME
=
'
gdown.
'
.
strftime
("
%Y%m%d%H%M%S
",
localtime
)
.
'
.
'
.
substr
(
rand
,
2
)
if
$FILENAME
eq
'';
if
(
$URL
=~
m#^https?://drive.google.com/file/d/([^/]+)#
)
{
$URL
=
"
https://docs.google.com/uc?id=$1&export=download
";
}
elsif
(
$URL
=~
m#^https?://drive.google.com/open\?id=([^/]+)#
)
{
$URL
=
"
https://docs.google.com/uc?id=$1&export=download
";
}
execute_command
();
while
(
-
s $FILENAME < 100000) { # only if the file isn't the download yet
open fFILENAME, '<', $FILENAME;
$c
heck
=
0
;
foreach
(
<
fFILENAME
>
)
{
if
(
/href="(\/uc\?export=download[^"]+)/
)
{
$URL
=
'
https://docs.google.com
'
.
$
1
;
$URL
=~
s/&/&/g
;
$confirm
=
'';
$check
=
1
;
last
;
}
if
(
/confirm=([^;&]+)/
)
{
$confirm
=
$
1
;
$check
=
1
;
last
;
}
if
(
/"downloadUrl":"([^"]+)/
)
{
$URL
=
$
1
;
$URL
=~
s/\\u003d/=/g
;
$URL
=~
s/\\u0026/&/g
;
$confirm
=
'';
$check
=
1
;
last
;
}
}
close
fFILENAME
;
die
"
Couldn't download the file :-(
\n
"
if
(
$check
==
0
);
$URL
=~
s/confirm=([^;&]+)/confirm=$confirm/
if
$confirm
ne
'';
execute_command
();
}
unlink
$TEMP
;
sub
execute_command
()
{
$COMMAND
=
"
wget --progress=dot:giga --no-check-certificate --load-cookie
$TEMP
--save-cookie
$TEMP
\"
$URL
\"
";
$COMMAND
.=
"
-O
\"
$FILENAME
\"
"
if
$FILENAME
ne
'';
system
(
$COMMAND
);
return
1
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录