Category "python"

Particle detection with Python OpenCV

I'm looking for a proper solution how to count particles and measure their sizes in this image: In the end I have to obtain the lists of particles' coordinates

access variables in list python

I need to acess a variable in list for example var1=[Orange,Banana] var2=[Apple,Pear] var3=[Banana,Pear] var4=[Grapes,Orange] var5=[Orange,Apple] user_fruit =

Find Corners of pool table for perspective warp with OpenCV

I have an image of a pool table with slight perspective distortion: I am trying to un-warp the image (such that the corners of the pool table correspond to the

Exception ignored in: <function Pool.__del__ at 0x7fbf30520550>

I'm using TensorFlow training a deep learning model and the model is successfully trained however at the end it returns this error message to me: Exception igno

What is the best way to mock disconnect within SQLAlchemy

I write tests for CRUD application and i want to be sure that its behaviour is correct during different scenarios when connection to DB permanently or temporari

Find Corners of pool table for perspective warp with OpenCV

I have an image of a pool table with slight perspective distortion: I am trying to un-warp the image (such that the corners of the pool table correspond to the

Replacing negative values in specific columns of a dataframe

This is driving me crazy! I want to replace all negative values in columns containing string "_p" with the value multiplied by -0.5. Here is the code, where Tdf

What is a better way to iterate over dataclass keys and values?

I have two dataclasses, Route and Factors. Route contains a value and three copies of Factors. Route does not know how many variables Factors contains. I want t

"on_message" of Discord.py can't work after I implemented "schedule" into it

I'm not familiar with Python so I'm afraid that this could be a silly question for all of you but I have already tried my best to solve it. I worked on a self-p

Copy dockerfile files ADD instruction in superset

I have the following DockerFile FROM apache/superset:pr-19860 RUN pip install elasticsearch-dbapi RUN superset superset fab create-admin \ --user

Generate PDF with Acroform using weasyprint

I use weasyprint to generate a PDF file from a HTML file in a Python application (I use yattag for the HTML generation if this may help). I would like to use Ac

python mongoening time series collection support

I was looking for a solution for storage and retrieval of time series data. As I have mongodb set up already in my project, I searched for a solution with mongo

How to extract data from grib files in AWS without downloading?

I'm looking to access a grib file to extract parameters (such as temperature, etc) from within the cloud without ever having to store the file locally. I've hea

I used pyinstaller to turn my .py file to a executable file, but it doesn't work

EDIT: I'm using the "random" library and the "os" library, could they be interfering with the file's execution? Good morning, I'm creating a hangman game that r

Flask:XMLHttpRequest at '...' from origin has been blocked by CORS policy No 'Access-Control-Allow-Origin' header is present on the requested resource

I am currently trying to get a small server running on my RaspberryPi and accessing it from my PC within the LAN. I get the following error when accessing the R

vmcloak failed after installation, invalid syntax

I've been having some issues with vmcloak after installation. I successfully installed vmcloak v.0.4.1 and when I try and run it I get this error: Successfully

Thales HSM Import Public Key (EO) error '04'

I am sending this command with a DER encoded public RSA key. 1234EO013082010a02820101ec7b6d6be7d0603e3f247c22dd0ae533f02f1216fd9099d6ec5c596eb92c95e8ee87e3437af

Comparing 2 columns with different rows in different csv files, and output status to another csv file

I have 2 csv files as shown below. They contain different numbers of rows and the columns are not aligned/sorted along a common index. I need to compare the col

Django REST Framework ApiView not allowing DELETE

I am new to Django and I am having a issue sending a DELETE request to a class based view which inherits from APIView. Here is my class: class PageDetail(APIV

Django: how to count posts related to a category in django?

i have a model class Category and also a model class Course. i want to count all the courses that are related to a model e.g: Web Devlopment - 26 Courses i dont