2LABA/22lb/Untitled3.ipynb

111 lines
2.8 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": 6,
"id": "f3b57c0d-557d-41fd-9dcb-5bd23450d4d1",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"========== ЭТАП 1: ОБРАБОТКА ==========\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "4ba14952aa5b44cab19264f1070e2952",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Анализ строк: 0%| | 0/100 [00:00<?, ?строк/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"======================================\n",
"\n",
"========== ЭТАП 2: НЕЙРОСЕТЬ ==========\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3e5da2b4604645d18fa78063105cbc7a",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Загрузка весов: 0%| | 0/100 [00:00<?, ? слоев/s]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"from tqdm.auto import tqdm \n",
"import time\n",
"\n",
"df = pd.DataFrame({\n",
" 'ID': range(1, 101),\n",
" 'Data': np.random.randn(100)\n",
"})\n",
"\n",
"print(f\"{'='*10} ЭТАП 1: ОБРАБОТКА {'='*10}\")\n",
"# Использование tqdm напрямую для итерации по строкам\n",
"for _ in tqdm(df.values, desc=\"Анализ строк\", unit=\"строк\"):\n",
" time.sleep(0.01) # Ускорил для теста\n",
"\n",
"print(\"\\n\" + \"=\"*38 + \"\\n\")\n",
"print(f\"{'='*10} ЭТАП 2: НЕЙРОСЕТЬ {'='*10}\")\n",
"for i in tqdm(range(100), \n",
" desc='Загрузка весов', \n",
" unit=' слоев', \n",
" colour='green'):\n",
" time.sleep(0.02)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fdc92940-7e90-4489-948f-0141f7441baa",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}