Address
Address Area
Address Building
Address City
Address Country
#!/bin/bash | |
# Function to check if Python is installed | |
check_python_installed() { | |
if command -v python3 &>/dev/null; then | |
echo "Python is installed" | |
else | |
echo "Python is not installed. Please install Python 3 and try again." | |
exit 1 | |
fi |
import time | |
import psutil | |
import platform | |
from prometheus_client import start_http_server, Gauge, Counter, Info | |
import logging | |
import sys | |
import argparse | |
from typing import Dict, Any | |
import socket | |
from datetime import datetime |
Address
Address Area
Address Building
Address City
Address Country
import streamlit as st | |
import cv2 | |
vid = cv2.VideoCapture( 'http://<network_ip_Address>:8080/video' ) | |
st.title( 'Using Mobile Camera with Streamlit' ) | |
frame_window = st.image( [] ) | |
take_picture_button = st.button( 'Take Picture' ) | |
while True: |
import streamlit as st | |
import cv2 | |
import numpy as np | |
import requests | |
st.title( 'Mobile Camera Preview in Streamlit' ) | |
frame_window = st.image( [] ) | |
take_picture_button = st.button( 'Take Picture' ) | |
while True: |
while True: | |
# Request the image from the server | |
response = requests.get(url="http://<network_ip_address>:<port>/photo.jpg") | |
imgNp = np.array(bytearray(response.content), dtype=np.uint8) | |
frame = cv2.imdecode(imgNp, cv2.IMREAD_UNCHANGED ) | |
# As OpenCV decodes images in BGR format, we'd convert it to the RGB format | |
frame = cv2.cvtColor( frame , cv2.COLOR_BGR2RGB ) | |
frame_window.image(frame) |
import streamlit as st | |
import cv2 | |
import numpy as np | |
import requests | |
# Title of the app | |
st.title( 'Mobile Camera Preview in Streamlit' ) | |
# An empty image container that will hold the frames we'll fetch from the server | |
frame_window = st.image( [] ) |
import random | |
a = 0 | |
b = 1 | |
N = 1000 | |
def f( x ): | |
return 2 * x**5 | |
def uniform(): |