done
This commit is contained in:
parent
6793833ece
commit
76569ee0d5
43
Jenkinsfile
vendored
Normal file
43
Jenkinsfile
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('One') {
|
||||
|
||||
properties([
|
||||
parameters([
|
||||
string(defaultValue: '',
|
||||
description: 'Kaggle username',
|
||||
name: 'KAGGLE_USERNAME',
|
||||
trim: false),
|
||||
password(defaultValue: '',
|
||||
description: 'Kaggle token',
|
||||
name: 'KAGGLE_KEY'),
|
||||
string(defaultValue: '5000',
|
||||
description: 'Data cutoff',
|
||||
name: 'CUTOFF',
|
||||
trim: false)
|
||||
])
|
||||
]
|
||||
)
|
||||
stage('Two') {
|
||||
steps {
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||
"KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}" ]) {
|
||||
|
||||
|
||||
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s434732/ium_434732']]])
|
||||
|
||||
|
||||
sh "chmod 777 ./skrypt_zad2.sh"
|
||||
sh "./skrypt_zad2.sh"
|
||||
|
||||
|
||||
|
||||
archiveArtifacts "results.csv_cut.dev"
|
||||
archiveArtifacts "results.csv_cut.test"
|
||||
archiveArtifacts "results.csv_cut.train"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
13
skrypt_zad2.sh
Normal file
13
skrypt_zad2.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
pip install kaggle
|
||||
kaggle datasets download martj42/international-football-results-from-1872-to-2017 --unzip
|
||||
|
||||
|
||||
shuf ./results.csv.csv | tail -n +"${CUTOFF}" > ./results.csv_cut.shuf
|
||||
|
||||
head -n 75384 ./results.csv_cut.shuf > ./results.csv_cut.test
|
||||
head -n 150768 ./results.csv_cut.shuf | tail -n 75384 > ./results.csv_cut.dev
|
||||
tail -n +150769 ./results.csv_cut.shuf > ./results.csv_cut.train
|
||||
rm ./results.csv_cut.shuf
|
||||
rm ./results.csv_cut.csv
|
||||
wc -l ./results.csv_cut*
|
Loading…
Reference in New Issue
Block a user