Category "python"

Quart error: ImportError: cannot import name 'Headers' from 'h11._headers'

i want to start a dashboard for my nextcord bot But when i import dashboard to run,it’s raise an error I tried search on internet for this but look like i

Python replace random specific element in list

I have a list containing many alphabets, and I want to replace a random "a" with "b", how can I do it? alphabets = ["a", "c", "a", "a", "b", "c"] Examples of w

How to map 5 numbers to 5 different colors

I have a problem concerning the management of a colormap. In the figure below, each point displayed is associated with a value : 2, 3, 4, 5 or 13. So, to know t

How to extract specified text from columns in Excel

I have tried numerous ways but have failed to get the right data to the new columns. The column description contains a lot of information in which I want to ext

Why does Tkinter image not show up if created in a function?

This code works: import tkinter root = tkinter.Tk() canvas = tkinter.Canvas(root) canvas.grid(row = 0, column = 0) photo = tkinter.PhotoImage(file = './test.g

How i can find a specific row and look for the minimum element index in a numpy array

I got a numpy array from a csv file. It is 6 X 6. I want to find a specific row and then find the lower element index.

How i can find a specific row and look for the minimum element index in a numpy array

I got a numpy array from a csv file. It is 6 X 6. I want to find a specific row and then find the lower element index.

Pymeshfix Error while trying to repair a stl file

If i try to repair an input stl file (https://www.file-upload.net/download-14916065/waxup_slm_cad.stl.html) with the library pymeshfix (https://github.com/pyvis

Client seems to hang after a specific reply from server

I am implementing an authentication process between a server and a client in order to exchange some information. I have created a function called serverToClient

How to define the pen width in the menu bar

I am trying to write the code for my own paint program. I have added the menu for few basic color options. Now I would like to add the same menu style pen width

How to rotate a rectangle/bounding box together with an image

I'm working on a data augmentation and im trying to generate synthetic version of every image in my dataset. So i need to rotate images and together with boundi

Python Image Library and Tkinter Clashing

I have an issue where PIL and Tkinter are not working together in the same program. Basically, I tried to run my program and when it was on the line 'image.open

Fastest way to remove white background from image/video

I need to make the below faster as I need it to run on a video. Basically I am trying to remove a white background on a video and then overlay that onto another

Updating database after reordering Datatable

I'm struggling with the datatables reordering. I want when user reorder to update table in the database. For this to happen i need: to configure the datatable t

Some one can explain to me how this code executes ? I still mess up with recursion

That output is supposed to be 4,3,2,1 right? def test(x): if x > 0 : test(x - 1) print(x) test(4) #output => 1 #output => 2 #output => 3 #outp

automatically remove items of a list every few second in redis

I'm trying to see how many users used my bot in the last 5 minute. I've got an idea to every time a user used my bot I add his/hers id into a redis list with a

run function file in google colab

In Google Colab, how can I execute the function file related to the original code? In the main code is part of the function that is in the file. PY is another,

Extracting rows from list in data frame where at max numbers [duplicate]

So i've been given a pandas data frame and created a definition for the maximum variable in one column. max_energy = D202['USAGE'].max() max_e

matrix with nodes that refer to which openings/connections they have

I would like some help on a problem that has been stressing me for a while now It revolves around recurdive backtracking maze generation, but should reurn a mat

How to make ball bounce off of triangle in Py.Processing?

Im building a game in processing python. It is similar to pong except the paddles can rotate thus changing the direction of the ball. There is also supposed to