Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the simply-static domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/wp-includes/functions.php on line 6121
2023 年 7 月

密码保护:exc

此内容受密码保护。如需查阅,请在下列字段中输入您的密码。

适用于windows的ubuntu子系统出现WSL2:Temporary Failure in Name Resolution解决方法

WSL2: Temporary Failure in Name Resolution

In WSL2, run:

登录后复制 
# remove existing resolv.conf symlink that is pointing to a wrong nameserver
sudo rm /etc/resolv.conf
# create a new resolv.conf with a correct nameserver
sudo bash -c 'echo "nameserver 1.1.1.1" > /etc/resolv.conf'
# stop wsl from regenerating resolv.conf symlink
sudo bash -c 'printf "[network]\ngenerateResolvConf = false" > /etc/wsl.conf'
# make current resolv.conf immutable so that wsl does not delete it
sudo chattr +i /etc/resolv.conf



In powershell, run

wsl --shutdown
wsl
出现问题No module named pip的解决
sudo apt update
sudo apt upgrade -y
sudo apt install --fix-missing python3-pip

streamlit运行参数

streamlit run app.py --server.port 80

以上以80端口运行

import numpy as np
import pandas as pd
import streamlit as st
x = st.slider("选择一个数字", 0, 100)
st.write(x, "的平方是", x * x)

chart_data = pd.DataFrame(
    np.random.randn(20, 3),
    columns = ['a', 'b', 'c'])

st.area_chart(chart_data)

hide_streamlit_style = """
<style>
#MainMenu {visibility: hidden;}
footer {visibility: hidden;}
</style>
"""
st.markdown(hide_streamlit_style, unsafe_allow_html=True)

以上代码隐藏了streamlit的logo