Category "python"

python3 join lists that have same value in list of lists

I have similar question to one that has been asked several years ago, the link is down here. the thing is that all answers are in python 2 and does work for me.

Discount on a price

So this is my code so far but at the end there i am trying to add a discount option. I am not sure how to add it to multiple products. Please let me know how i

How do I get rid of black bar in python window?

I'm working on a Object Detection project for the game Cuphead using OpenCV and Python. Now I'm trying to capture objects in real time but when the detection wi

right way to deploy a django-rq worker

maybe it's a silly question, but I didn't found much while googling around. So I'm on the way to transform my development environment to a deploy environment. I

Localstack and python and docker-compose strange behaviour

I have created a docker-compose file for localstack and I'm using only services like s3 and SQS. It works fine and I could create a dummy SQS, S3 from localsta

how to remove and replace an element in a list using python

def functionA(): countries = ["Nigeria", "Uganda", "America", "Chad"] print(countries) name1 = input("choose a country you don't like:") for i in range(3):

Cartopy: coastlines not lining up with imshow projection

I'm trying to produce a figure in Python that will line up the map coastlines from Cartopy with a RGB projection using satellite data (POLDER) that is fixed to

Can't find the error in my django project

I am creating a booking website for hotels using Django, I used the booking api to get the hotels with its images and location highlights... I sent to the djang

Django-How can I upload image to a Model, without that field being present in the ModelForm

I am trying to build an image steganography application and for the encoding part I have a form with two fields, one for image and one for the message that is t

text based HTML of the element selenium python

I am actually trying to scrap a website. In fact I have a table like this below : Table I would like to navigate to the line that contains the word "Maîtr

Exception has occurred: ModuleNotFoundError No module named 'tensorflow.python'

im working on Simple RNN code with python, i want to use keras but when i run the code it show to me ( tensorflow error ), i uninstall tensorflow then i install

List not defined when importing a function

I made two modules in Python. The other one is a sentinel-controlled loop that asks for the data and the other module contains the functions needed for computat

Can't install opencv-python build dependencies on python2.7 inside alpine

I am having immense difficulty getting opencv-python to install on alpine. I have tried: Installing opencv-python==4.2.0.32 Using ubuntu instead of alpine Direc

werkzeug.routing.BuildError: Could not build url for endpoint robotReports' with values ['id']. Did you mean 'reports' instead?

im working on a website with flask so im trying to generate an url to see the reports linked to robots , so i have this route : @app.route("/robotReports/<in

how to append an entry with button in Tkinter

I tried to append entry text to a list with a button but after clicking on button the list still being empty. from audioop import add from html import entities

Python Script cannot run using Batch File

hihi, I just installed Anaconda3, and my script was able to run smoothly using Spyder. But when I call it using batch file, the below error is show: C:\Users\De

Whenever I try to run my script it stops working

I am currently making a py game and python stops working every time, but I'm not sure why. from turtle import Turtle, Screen screen = Screen() screen.setup(600

Tensorflow data pipeline stops working during training

I made a Tensorflow pipeline for loading numpy arrays (video data shape (40,160,160,3)). However, it stops working after loading the first x batches. The proble

how to dynamically set the number of variables in SciPy's optimize.minimize

I have this code work fine to optimize multiple variables. def f(params): a, b, c = params return a**2 + b**2 + c**2 initial_guess = [1, 1, 1] result

Can't install arcpy in Jupyter Notebook

I have ArcGIS Pro installed, which includes the installed Python packages. I am trying to learn Python and would like to use the ArcPy functions. I have never u