diff --git a/News_App/requirements.txt b/News_App/requirements.txt index 8ac66230937..50c11230a0d 100644 --- a/News_App/requirements.txt +++ b/News_App/requirements.txt @@ -1,4 +1,4 @@ -solara == 1.54.0 +solara == 1.55.1 Flask gunicorn ==23.0.0 simple-websocket diff --git a/encrypter_decrypter_gui.py b/encrypter_decrypter_gui.py index 75d10d37839..48504895408 100644 --- a/encrypter_decrypter_gui.py +++ b/encrypter_decrypter_gui.py @@ -257,6 +257,7 @@ def backend_work(self, todo, text_coming): # ==================== Classes End Here ... ! ================= +# this code runes only in this file if __name__ == "__main__": run = Main() Notebook(run) diff --git a/requirements_with_versions.txt b/requirements_with_versions.txt index 9d054daad6f..0868c2b7418 100644 --- a/requirements_with_versions.txt +++ b/requirements_with_versions.txt @@ -49,7 +49,7 @@ auto-mix-prep==0.2.0 lib==4.0.0 pywifi==1.1.12 patterns==0.3 -openai==2.9.0 +openai==2.12.0 background==0.2.1 pydantic==2.12.5 openpyxl==3.1.2 @@ -74,14 +74,14 @@ xor-cipher==5.0.2 bird==0.1.2 mechanize==0.4.10 translate==3.8.0 -solara==1.54.0 +solara==1.55.1 pywhatkit==5.4 mutagen==1.47.0 Unidecode==1.4.0 Ball==0.2.9 pynput==1.8.1 gTTS==2.5.4 -ccxt==4.5.27 +ccxt==4.5.28 fitz==0.0.1.dev2 fastapi==0.124.4 Django==6.0 diff --git a/webcam.py b/webcam.py index 30a89df27f4..d1aa682caac 100644 --- a/webcam.py +++ b/webcam.py @@ -6,6 +6,7 @@ # Improve this program and make it suitable for general module like use in another programs import cv2 +from colorama import Fore cap = cv2.VideoCapture(0) @@ -17,8 +18,13 @@ # FourCC is platform dependent; however, MJPG is a safe choice. fourcc = cv2.VideoWriter_fourcc(*"MJPG") -# Create video writer object. Save file to recording.avi -out = cv2.VideoWriter("recording.avi", fourcc, 20.0, (frames_width, frames_height)) +# exception Handling for captured video +try: + # 60 FPS video capture + # Create video writer object. Save file to recording.avi + out = cv2.VideoWriter("recording.avi", fourcc, 60.0, (frames_width, frames_height)) +except(Exception) as e: + print(Fore.RED, e, Fore.RESET) while True: # Capture frame-by-frame @@ -27,16 +33,18 @@ if ret == True: # Write frame to recording.avi out.write(frame) - + + # color video output # Our operations on the frame come here - gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) + gray = cv2.cvtColor(frame, cv2.COLOR_BGR2BGRA) # Display the resulting frame cv2.imshow("frame", gray) - if cv2.waitKey(1) & 0xFF == ord("q"): + if cv2.waitKey(1) & 0xFF == ord(" "): break # When everything is done, release the capture and video writer cap.release() out.release() cv2.destroyAllWindows() +