add jenkinsfile

This commit is contained in:
s486867 2023-03-25 13:31:36 +01:00
parent 3714b5a301
commit 9cc0789433
2 changed files with 25 additions and 6 deletions

25
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,25 @@
node {
stage('Preparation') {
properties([
parameters([
string(
defaultValue: 'Hello World!',
description: 'Tekst do wyświetlenie',
name: 'INPUT_TEXT',
trim: false
)
])
])
}
stage('Hello') {
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
echo "INPUT_TEXT: ${INPUT_TEXT}"
//Wywołaj w konsoli komendę "figlet", która generuje ASCI-art
sh "figlet \"${INPUT_TEXT}\" | tee output.txt"
}
stage('Goodbye') {
echo 'Goodbye!'
//Zarchiwizuj wynik
archiveArtifacts 'output.txt'
}
}

View File

@ -12,18 +12,12 @@ with zipfile.ZipFile('./data/netflix-shows.zip', 'r') as zip_ref:
netflix = pd.read_csv('./data/netflix_titles.csv')
netflix['release_year'] = (netflix['release_year'] - netflix['release_year'].min()) / (netflix['release_year'].max() - netflix['release_year'].min())
netflix.dropna(inplace=True)
random_seed = 42
train_data, test_data = train_test_split(netflix, test_size=0.2, random_state=random_seed)
train_data, dev_data = train_test_split(train_data, test_size=0.25, random_state=random_seed)
train_data['release_year'] = (train_data['release_year'] - train_data['release_year'].min()) / (train_data['release_year'].max() - train_data['release_year'].min())
dev_data['release_year'] = (dev_data['release_year'] - dev_data['release_year'].min()) / (dev_data['release_year'].max() - dev_data['release_year'].min())
test_data['release_year'] = (test_data['release_year'] - test_data['release_year'].min()) / (test_data['release_year'].max() - test_data['release_year'].min())
train_stats = train_data.describe(include='all')
print(f"\nTraining set statistics:\n{train_stats}")
dev_stats = dev_data.describe(include='all')