-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
executable file
·34 lines (32 loc) · 2.01 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# https://www.kaggle.com/wolfram77/puzzlef-rak-communities-seq
import os
from IPython.display import FileLink
src="rak-communities-seq"
inp="/kaggle/input/graphs"
out="{}.txt".format(src)
!printf "" > "$out"
display(FileLink(out))
!ulimit -s unlimited && echo ""
# Download program
!rm -rf $src
!git clone https://github.com/puzzlef/$src
!echo ""
# Run
!g++ -std=c++17 -O3 $src/main.cxx
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/web-Stanford.mtx 2>&1 | tee -a "$out"
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/web-BerkStan.mtx 2>&1 | tee -a "$out"
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/web-Google.mtx 2>&1 | tee -a "$out"
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/web-NotreDame.mtx 2>&1 | tee -a "$out"
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/soc-Slashdot0811.mtx 2>&1 | tee -a "$out"
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/soc-Slashdot0902.mtx 2>&1 | tee -a "$out"
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/soc-Epinions1.mtx 2>&1 | tee -a "$out"
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/coAuthorsDBLP.mtx 2>&1 | tee -a "$out"
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/coAuthorsCiteseer.mtx 2>&1 | tee -a "$out"
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/soc-LiveJournal1.mtx 2>&1 | tee -a "$out"
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/coPapersCiteseer.mtx 2>&1 | tee -a "$out"
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/coPapersDBLP.mtx 2>&1 | tee -a "$out"
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/indochina-2004.mtx 2>&1 | tee -a "$out"
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/italy_osm.mtx 2>&1 | tee -a "$out"
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/great-britain_osm.mtx 2>&1 | tee -a "$out"
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/germany_osm.mtx 2>&1 | tee -a "$out"
!ulimit -s unlimited && stdbuf --output=L ./a.out $inp/asia_osm.mtx 2>&1 | tee -a "$out"