| import os, re, sys, time, math, shutil, urllib, string, random, pickle, zipfile, datetime, platform, psutil |
| import streamlit as st, pandas as pd, numpy as np |
|
|
| st.set_page_config(page_title="Стартовая страница", page_icon="🦋", layout="wide", initial_sidebar_state="expanded") |
| |
| |
|
|
| import my_static_tools as mst |
| from my_static_tools import HF_tools as hft |
| from my_static_tools import XYZV_tools as xvt |
|
|
| st.html(mst.STYLE_CORRECTION) |
|
|
| st.sidebar.markdown("💎 Стартовая страница") |
|
|
| df = pd.DataFrame([ |
| {"command": "st.selectbox", "rating": 4, "is_widget": True}, |
| {"command": "st.balloons", "rating": 5, "is_widget": False}, |
| {"command": "st.time_input", "rating": 3, "is_widget": True}, |
| ]) |
|
|
| edited_df = st.sidebar.data_editor(df, num_rows="dynamic") |
| favorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"] |
| st.sidebar.markdown(f"Your favorite command is **{favorite_command}** 🎚️") |
|
|
|
|
|
|
| with st.container(): |
| cols1 = st.columns([4,4,4,4]) |
| psutil_virtual_memory = psutil.virtual_memory() |
| dirParams = { |
| "psutil.virtual_memory": psutil_virtual_memory, |
| "os.getcwd": os.getcwd(), |
| "cpu_count": os.cpu_count(), |
| |
| |
| "platform": platform.platform(), |
| "release": platform.release(), |
| "node": platform.node(), |
| "processor": platform.processor(), |
| "machine": platform.machine(), |
| "system": platform.system(), |
| "version": platform.version(), |
| "python_version": platform.python_version(), |
| "python_implementation": platform.python_implementation(), |
| "uname": platform.uname(), |
| "libc_ver": platform.libc_ver(), |
| "architecture": platform.architecture(), |
| } |
| cols1[0].write(dirParams) |
| cols1[1].write(os.environ) |
| cols1[2].write(os.listdir()) |
| |
| cols1[2].write(psutil.cpu_percent(percpu=True)) |
|
|