Merge branch 'mcguirepr89:main' into main
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ pytz
|
||||
tzlocal
|
||||
pandas
|
||||
seaborn
|
||||
streamlit==1.11.1
|
||||
streamlit==1.19.0
|
||||
plotly
|
||||
apprise==1.2.1
|
||||
paho-mqtt
|
||||
|
||||
@@ -38,8 +38,7 @@ st.markdown("""
|
||||
""", unsafe_allow_html=True)
|
||||
|
||||
|
||||
@st.cache(hash_funcs={Connection: id})
|
||||
# @st.cache(allow_output_mutation=True)
|
||||
@st.cache_resource()
|
||||
def get_connection(path: str):
|
||||
return sqlite3.connect(path, check_same_thread=False)
|
||||
|
||||
@@ -89,7 +88,7 @@ else:
|
||||
# end_date = datetime(2022 ,5 ,17).date()
|
||||
|
||||
|
||||
@st.cache()
|
||||
@st.cache_data()
|
||||
def date_filter(df, start_date, end_date):
|
||||
filt = (df2.index >= pd.Timestamp(start_date)) & (df2.index <= pd.Timestamp(end_date + timedelta(days=1)))
|
||||
df = df[filt]
|
||||
@@ -132,7 +131,7 @@ else:
|
||||
resample_time = resample_times[resample_sel]
|
||||
|
||||
|
||||
@st.cache()
|
||||
@st.cache_data()
|
||||
def time_resample(df, resample_time):
|
||||
if resample_time == 'Raw':
|
||||
df_resample = df['Com_Name']
|
||||
|
||||
@@ -13,7 +13,8 @@ services=(chart_viewer.service
|
||||
icecast2.service
|
||||
extraction.service
|
||||
birdnet_recording.service
|
||||
birdnet_log.service)
|
||||
birdnet_log.service
|
||||
birdnet_stats.service)
|
||||
|
||||
for i in "${services[@]}";do
|
||||
sudo systemctl restart "${i}"
|
||||
|
||||
@@ -50,6 +50,9 @@ sudo_with_user git -C $HOME/BirdNET-Pi fetch $remote $branch
|
||||
# Switches git to specified branch
|
||||
sudo_with_user git -C $HOME/BirdNET-Pi switch -C $branch --track $remote/$branch
|
||||
|
||||
# Prints out changes
|
||||
sudo_with_user git -C $HOME/BirdNET-Pi diff --stat HEAD^ HEAD
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
sudo ln -sf $my_dir/* /usr/local/bin/
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ fi
|
||||
apprise_installation_status=$(~/BirdNET-Pi/birdnet/bin/python3 -c 'import pkgutil; print("installed" if pkgutil.find_loader("apprise") else "not installed")')
|
||||
if [[ "$apprise_installation_status" = "not installed" ]];then
|
||||
$HOME/BirdNET-Pi/birdnet/bin/pip3 install -U pip
|
||||
$HOME/BirdNET-Pi/birdnet/bin/pip3 install apprise
|
||||
$HOME/BirdNET-Pi/birdnet/bin/pip3 install apprise==1.2.1
|
||||
fi
|
||||
[ -f $HOME/BirdNET-Pi/apprise.txt ] || sudo -E -ucaddy touch $HOME/BirdNET-Pi/apprise.txt
|
||||
if ! which lsof &>/dev/null;then
|
||||
@@ -157,8 +157,11 @@ CREATE INDEX IF NOT EXISTS "detections_Com_Name" ON "detections" ("Com_Name");
|
||||
CREATE INDEX IF NOT EXISTS "detections_Date_Time" ON "detections" ("Date" DESC, "Time" DESC);
|
||||
EOF
|
||||
|
||||
$HOME/BirdNET-Pi/birdnet/bin/pip3 install apprise==1.2.1 >/dev/null
|
||||
$HOME/BirdNET-Pi/birdnet/bin/pip3 install streamlit==1.11.1 >/dev/null
|
||||
apprise_version=$($HOME/BirdNET-Pi/birdnet/bin/pip3 show apprise 2>/dev/null | grep Version | awk '{print $2}')
|
||||
streamlit_version=$($HOME/BirdNET-Pi/birdnet/bin/pip3 show streamlit 2>/dev/null | grep Version | awk '{print $2}')
|
||||
|
||||
[[ $apprise_version != "1.2.1" ]] && $HOME/BirdNET-Pi/birdnet/bin/pip3 install apprise==1.2.1
|
||||
[[ $streamlit_version != "1.19.0" ]] && $HOME/BirdNET-Pi/birdnet/bin/pip3 install streamlit==1.19.0
|
||||
|
||||
if ! grep -q 'RuntimeMaxSec=' "$HOME/BirdNET-Pi/templates/birdnet_analysis.service"&>/dev/null; then
|
||||
sudo -E sed -i '/\[Service\]/a RuntimeMaxSec=3600' "$HOME/BirdNET-Pi/templates/birdnet_analysis.service"
|
||||
|
||||
@@ -11,3 +11,4 @@ sed -i s/'^BIRDWEATHER_ID=$'/"BIRDWEATHER_ID=${birdweather_id}"/g ${birders_conf
|
||||
sed -i s/'^BIRDNETPI_URL=$'/"BIRDNETPI_URL=${birdnetpi_url/\/\//\\\/\\\/}"/g ${birders_conf}
|
||||
sed -i s/'^WEBTERMINAL_URL=$'/"WEBTERMINAL_URL=${extractionlog_url/\/\//\\\/\\\/}"/g ${birders_conf}
|
||||
sed -i s/'^BIRDNETLOG_URL=$'/"BIRDNETLOG_URL=${birdnetlog_url/\/\//\\\/\\\/}"/g ${birders_conf}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user