replace python script with bash script

This commit is contained in:
piotrwrzodak 2023-04-20 22:27:59 +02:00
parent 53e68c5435
commit 5a4cd037dd
2 changed files with 12 additions and 4 deletions

8
Jenkinsfile vendored
View File

@ -32,13 +32,13 @@ pipeline {
sh 'kaggle datasets download -d thedevastator/airbnb-prices-in-european-cities' sh 'kaggle datasets download -d thedevastator/airbnb-prices-in-european-cities'
sh 'unzip airbnb-prices-in-european-cities.zip -d ./ium_z444510' sh 'unzip airbnb-prices-in-european-cities.zip -d ./ium_z444510'
sh 'rm airbnb-prices-in-european-cities.zip' sh 'rm airbnb-prices-in-european-cities.zip'
sh 'python ium_z444510/create-dataset.py' sh './ium_z444510/create-dataset.sh'
sh 'ls -a' sh 'ls -a'
sh 'ls -a ./ium_z444510' sh 'ls -a ./ium_z444510'
} }
archiveArtifacts 'train.csv' archiveArtifacts 'ium_z444510/train.csv'
archiveArtifacts 'dev.csv' archiveArtifacts 'ium_z444510/dev.csv'
archiveArtifacts 'test.csv' archiveArtifacts 'ium_z444510/test.csv'
} }
} }
} }

8
create-dataset.sh Normal file
View File

@ -0,0 +1,8 @@
#! /usr/bin/bash
head -n -1 ium_z444510/barcelona_weekends.csv | shuf > ium_z444510/barcelona_weekends.shuf.csv
head -n 25 ium_z444510/barcelona_weekends.shuf.csv > ium_z444510/barcelona_weekends.test.csv
head -n 50 ium_z444510/barcelona_weekends.shuf.csv | tail -n 25 > ium_z444510/barcelona_weekends.dev.csv
tail -n +51 ium_z444510/barcelona_weekends.shuf.csv > ium_z444510/barcelona_weekends.train.csv
rm ium_z444510/barcelona_weekends.shuf.csv
wc -l ium_z444510/barcelona_weekends*