add zadanie4 & kaggle

This commit is contained in:
jakubknczny 2021-03-28 13:29:04 +02:00
parent 823b7cd013
commit d542a56c49
2 changed files with 19 additions and 2 deletions

10
Jenkinsfile vendored
View File

@ -1,9 +1,15 @@
pipeline {
agent any
stages {
stage('Stage 1') {
stage('sh: Shell Script') {
steps {
echo 'Hello world!'
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
./script-zadanie-2-4.sh
}
archiveArtifacts 'train.csv'
archiveArtifacts 'test.csv'
archiveArtifacts 'valid.csv'
}
}
}

11
script-zadanie-2-4.sh Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
kaggle datasets download -d 'pcbreviglieri/smart-grid-stability' >>/dev/null 2>&1
unzip smart-grid-stability.zip >>/dev/null 2>&1
sed 1d smart_grid_stability_augmented.csv | cut -f 1,5,9,13,14 -d "," | shuf | split -l 48000
mv xaa train.csv
mv xab toDivide
split -l 6000 toDivide
mv xaa test.csv
mv xab valid.csv