new python file

This commit is contained in:
s487178 2023-04-11 19:23:41 +02:00
parent ccbda8bf30
commit 9f4ae434a1
6 changed files with 35 additions and 36 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.ipynb_checkpoints/

View File

@ -3,7 +3,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "90a26b56",
"id": "441faeb9",
"metadata": {},
"outputs": [
{
@ -106,14 +106,14 @@
" os.rename(csv_filename, artifacts_path)\n",
" print(f\"Stworzono plik CSV: {artifacts_path}\")\n",
"else:\n",
" print(f\"Stworzono plik CSV: {csv_filename}\")\n",
" print(f\"Stworzono plik CSV: body_performance_processed.csv\")\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "287e7bb5",
"id": "d2f23d54",
"metadata": {},
"outputs": [],
"source": []

View File

@ -3,7 +3,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "90a26b56",
"id": "441faeb9",
"metadata": {},
"outputs": [
{
@ -106,14 +106,14 @@
" os.rename(csv_filename, artifacts_path)\n",
" print(f\"Stworzono plik CSV: {artifacts_path}\")\n",
"else:\n",
" print(f\"Stworzono plik CSV: {csv_filename}\")\n",
" print(f\"Stworzono plik CSV: body_performance_processed.csv\")\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "287e7bb5",
"id": "d2f23d54",
"metadata": {},
"outputs": [],
"source": []

View File

@ -49,7 +49,7 @@ if os.environ.get('JENKINS_HOME'):
os.rename(csv_filename, artifacts_path)
print(f"Stworzono plik CSV: {artifacts_path}")
else:
print(f"Stworzono plik CSV: {csv_filename}")
print(f"Stworzono plik CSV: body_performance_processed.csv")

27
python_dataset_stats.py Normal file
View File

@ -0,0 +1,27 @@
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
import os
df = pd.read_csv(os.path.join('.', 'body_performance_processed.csv'))
print(df.head())
print("number of elements in data frame: {}".format(df['age'].count()))
print(df.describe(include='all'))
print(df.info())
print('Each class in data frame: \n{}'.format(df['class'].value_counts()))
# In[ ]:

View File

@ -1,29 +0,0 @@
pipeline {
agent any
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
parameters {
string (
defaultValue: 'Hello UPDATED x4 World!',
description: 'Tekst, którym chcesz przywitać świat',
name: 'INPUT_TEXT',
trim: false
)
}
stages {
stage('Hello') {
steps {
//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!') {
steps {
echo 'Goodbye!'
//Zarchiwizuj wynik
archiveArtifacts 'output.txt'
}
}
}
}