I am trying to create a jumbled word but the right amount of letters are not showing when running the code. There’s only 1 letter being displayed and if the user actually inputs the right answer, the code only takes it as a wrong answer. Is there a way to fix this problem? Thank you! Answer O lord how m…
Tag: python
how to use mask using numba @jit
I would like to do simple division and average using jit function where nopython = True. my jit function goes however this throws me an error, what would be the workaround for this? I am trying to do this without the loop, any lights would be appreiciate. Answer numba doesn’t support some arguments for …
Python – OpenCV connectedComponents – user input + selecting feature/label
I have two images, let’s call them image 1 and image 2. I can use the following to select a random feature in image 1 and display it: Which will display an image such as: So the idea is that that is the feature from the previous frame (image 1), and then the user will select where that feature is
Error in making POST request to django API
From post man, I’m trying to make POST request to an order API created using django restframework but I’m getting the following error: The specific point where the error is located is specified in the error but I find difficulty constructing VALID json for the request body. Here is how I’m m…
PyTorch TransformerEncoderLayer different input order gets different results
Before I start, I’m very new to Transformers, and sorry for by bad sentence structure, I have a fever right now. Any time I use nn.TransformerEncoderLayer in anyway with a saved model if the data is in a different order I get different results. Is there a way to save the Encode table (or whatever this would b…
Converting prices in a Pandas dataframe
So I have a dataframe with the lines corresponding to different clothing items. I have two columns with prices and the syntax looks like this: price rrp 5.00 8.00 5 7.50 5.0 9.0 I want to convert these so that prices like 5.00/5.0 are converted to 5, but values like 7.50 stay the same. I’ve tried conver…
Using gmail through python without smtp
As of may 30th, smtp is no longer accepted. https://support.google.com/accounts/answer/6010255?hl=en&ref_topic=7188673 What is the new way to make a simple python emailer rather than a full application with the “login with google” option? Not sure why I was asked for the code and error, given …
Algorithm for finding missed data capture by device
We have 4 cameras “camA”, “camB”, “camC”, “camD” installed at every junction along a road and in this sequence. The flow of traffic is such “camA” is at the beginning, and “camD” is at the end. Whenever a vehicle passes a junction or make…
How to find the row having the minimum values in a given pandas dataframe?
I have created a dataframe using the following code. Then I found the minimum values of each row by using It gave me the minimum value of each column, but I also want to find out that at which index the min value is available for each column. Please give a sutiable solution for finding the index of the min
checking for computers in another dataframe
I have one data frame that outputs hostname and agent_version this is named df_filter output: i have another sccm data frame called df_sccm Name check cs dataframe is in sccm df i am trying to see if my output of the first dataframe is in my second dataframe (df_sccm), when i run it, it just says false, even …