File size: 2,213 Bytes
78341be
87c4cb5
cd92f14
bf0d601
 
9cc36bf
aae26e1
74fa2db
 
 
 
 
3dd6bc7
2e745f7
87c4cb5
807d200
b7a9316
 
 
807d200
764d922
2e745f7
764d922
b7a9316
 
 
976835c
b7a9316
78341be
3f0a88b
2e750d5
3f0a88b
2e750d5
ea2884d
 
bc6facb
2e750d5
bc6facb
2e750d5
 
 
976835c
 
 
bc6facb
976835c
 
2e750d5
 
976835c
ea2884d
976835c
6cb185a
5bdcb8c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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")
# This must be the first Streamlit command used on an app page, and must only be set once per page.
# set_page_config() can only be called once per app page, and must be called as the first Streamlit command in your script.

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(),
        #"environ": os.environ,
        #"os.listdir": os.listdir(),
        "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())
    #_ = psutil.cpu_percent(percpu=True) # first time is zeros
    cols1[2].write(psutil.cpu_percent(percpu=True))