Quantcast
Channel: Active questions tagged python - Stack Overflow
Browsing all 13921 articles
Browse latest View live
↧

No video with supported format and MIME type found when trying to capture my...

I'm trying to capture a video of my scream and stream it in a Flask server but it returns **"No video with supported format and MIME type found"**I have two files:1- App.py -> for capturing the...

View Article


Reproduce Warp Transform function in Gimp using python

I want to reproduce the 'Warp transform' function specified 'Move pixels' in Gimp by using Python. I have debugged the code of Gimp and Gegl. I find the core code is in Gegl project named 'warp.cc' and...

View Article


Python get all sets of N pairs from two lists

This is some kind of elementary task in itertools probably, but my brain is not working today and I can't seem to find it answered here already.Suppose I have two lists with different numbers of...

View Article

Illegal instruction (Core Dumped) while importing tensorflow==2.13.0 in...

I am trying to import tensorflow==2.13.0 in my python code but facing error as "Illegal instruction (Core Dumped)"CPU specifications are compatible with AVX and AVX2 instruction sets.Error occurring...

View Article

Proxy object for lazy initialization

Are there any ready-to-use Python module that provides an easy to use proxy object that only initializes the "real" object when really needed?Ideally I'm looking for a transparent implementation so...

View Article


Enable GPU for Python programming with VS Code on Windows 10 (llama-cpp-python)

I struggled alot while enabling GPU on my 32GB Windows 10 machine with 4GB Nvidia P100 GPU during Python programming. My LLMs did not use the GPU of my machine while inferencing. After spending few...

View Article

Image may be NSFW.
Clik here to view.

Interactive charts PlotlyChart, PieChart, LineChart

Good afternoon colleagues!The question is: I’m making an application for myself that displays crypto exchange statistics. Stop at the graph output stage. Everything is displayed using PlotlyChart, but...

View Article

how to permanently label an object once the confidence hits a certain percent

I am using opencv to detect the cars, buses and trucks in a video, using this annotate_image function but my loop keeps running even though I tried putting breaks at every juncture, the labels and...

View Article


Error occurs when trying to redirect Python UTF-8 stdout to a file on Windows

When I try to redirect a UTF-8 stdout in Powershell by running python3 .\test.py > test.txt, error occurs :UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-1: character maps...

View Article


NLTK's sentence_nist() returns ZeroDivisionError when the hypothesis &...

NLTK's sentence_nist() returns ZeroDivisionError when the hypothesis & reference are the same. Here is my code:from nltk.translate.nist_score import sentence_nistref_test = '太少'hypo_test =...

View Article

How to send data and a file from one fastapi to another one? [duplicate]

I am executing the following post:response = requests.post(url=f'{os.environ["BASE_URL"]}/submit', files={'file': (file.filename, file.file)}, data = {'query': 'John Doe','model': '90.5'})and in the...

View Article

Pygame buttons clicks and if statments

I've just started again after a while and having some issues and a little lost.Have been trying to make menus in pygame using images as buttons. Fuigured most of it out after looking at others but...

View Article

What is thresh in this statement?

I am trying to do the equivalent in c++ of some code written in python.In the following link:How to automatically detect and crop individual sprite bounds in sprite sheet?thresh = cv2.threshold(gray,...

View Article


how to ensure tensorflow gpu version is in use with docker image?

I am using tensorflow 2.13 with help of docker file available within tensorflow models/research/object_detection/dockerfiles folder.The Docker file contents areFROM tensorflow/tensorflow:latest-gpuARG...

View Article

Python : appened the value of created_date based on the condition

i am trying to write one function which will create a new column called last_created_date, and appened the value in that column as per condition.so this is the...

View Article


Error in testing application.py in cloud9 using AWS Beanstalk...

I'm a beginner using AWS Beanstalk and now trying to test deploying a simple Flask app using the EB CLI. I have installed EB CLI on Amazon Linux, create new directory for flask and setup new virtual...

View Article

How can I get the correct orientation of the point array?

I'm having trouble using the VTK library in Python. I tried adding the data array to the VTK model, but found that the data was oriented incorrectly and was pointed randomly.Here is the basic code I...

View Article


Yolo v8 can help to detect keypoints, but how to count the number of the...

def extract_and_process_tracks(self, tracks): boxes = tracks[0].boxes.xyxy.cpu() clss = tracks[0].boxes.cls.cpu().tolist() track_ids = tracks[0].boxes.id.int().cpu().tolist() self.annotator =...

View Article

pytorch model summary - forward func has more than one argument

I am using torch summary from torchsummary import summaryI want to pass more than one argument when printing the model summary, but the examples mentioned here: Model summary in pytorch taken only one...

View Article

Compare Timestamps from columns and remove entries based on condition

I have a dataframedf1 = Instance sort_begin cop_begin ded_begina 04:19:07 04:31:56 04:32:32 a 04:19:07 02:34:22 02:34:22f 05:19:07 02:31:26 04:32:32f 04:19:17 04:35:56 04:34:35The columns are stages in...

View Article
Browsing all 13921 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>