diff --git a/dataset_stats/Jenkinsfile b/dataset_stats/Jenkinsfile new file mode 100644 index 0000000..87157c7 --- /dev/null +++ b/dataset_stats/Jenkinsfile @@ -0,0 +1,27 @@ +pipeline { + agent any + parameters { + buildSelector(defaultSelector: + lastSuccessful(), + description: 'Which build to use for copying artifacts', + name: 'BUILD_SELECTOR') + } + stages { + stage("copyArtifacts"){ + steps { + copyArtifacts fingerprintArtifacts: true, + projectName: 's434695-create-dataset', + selector: buildParameter('BUILD_SELECTOR') + sh "chmod +x ./stats.sh" + sh "./stats.sh" + archiveArtifacts "stats.txt" + } + } + } + stage('archiveArtifacts') { + steps { + archiveArtifacts 'stats.txt' + } + } + +} \ No newline at end of file diff --git a/dataset_stats/stats.sh b/dataset_stats/stats.sh new file mode 100644 index 0000000..ac1b2e2 --- /dev/null +++ b/dataset_stats/stats.sh @@ -0,0 +1,5 @@ +wc -l healthcare-dataset-stroke-data.csv >> stats.txt +wc -l test.csv >> stats.txt +wc -l dev.csv >> stats.txt +wc -l train.csv >> stats.txt +wc -l obcietedane.csv >> stats.txt \ No newline at end of file diff --git a/skrypt.sh b/skrypt.sh index 34d5815..ef29548 100644 --- a/skrypt.sh +++ b/skrypt.sh @@ -1,19 +1,19 @@ - #Pobranie pliku .csv - curl -OL https://git.wmi.amu.edu.pl/s434695/ium_434695/raw/branch/master/vgsales.csv +#Pobranie pliku .csv +curl -OL https://git.wmi.amu.edu.pl/s434695/ium_434695/raw/branch/master/vgsales.csv - #Podzielenie pliku csv na test/dev/train - head -n 1 vgsales.csv > header.csv - tail -n +2 vgsales.csv | shuf > data.shuffled +#Podzielenie pliku csv na test/dev/train +head -n 1 vgsales.csv > header.csv +tail -n +2 vgsales.csv | shuf > data.shuffled - head -n 3320 data.shuffled > games.data.test - head -n 6640 data.shuffled | tail -n 3320 > games.data.dev - tail -n +6641 data.shuffled > games.data.train +head -n 3320 data.shuffled > games.data.test +head -n 6640 data.shuffled | tail -n 3320 > games.data.dev +tail -n +6641 data.shuffled > games.data.train - cat header.csv games.data.test > test.csv - cat header.csv games.data.dev > dev.csv - cat header.csv games.data.train > train.csv +cat header.csv games.data.test > test.csv +cat header.csv games.data.dev > dev.csv +cat header.csv games.data.train > train.csv - #Obcinanie danych - head -n $1 data.shuffled > obcietedane.data - cat header.csv obcietedane.data > obcietedane.csv +#Obcinanie danych +head -n $1 data.shuffled > obcietedane.data +cat header.csv obcietedane.data > obcietedane.csv