I have an enum : from enum import Enum class MyEnum(Enum): val1 = "val1" val2 = "val2" val3 = "val3" I would like to validate a pydantic field bas
Here is my code. from keras.optimizers import gradient_descent_v2 as SGD sgd=SGD(lr=0.01,momentum=0.9,decay=(0.01/25),nesterov=False) I get the following er
In a pandas dataframe, I have a column of mixed data types, such as text, integers and datetimes. I need to find columns where datetimes match: (1) exact values
For the past many months I am trying to code in Jupyter Notebook but whenever I open Jupyter Notebook, then, I see a message where it is written 'A connection t
What i could find relating to git settings on pycharm
enter image description here My code shows the radiobuttons unaligned , tap picture to see, and I want to define var(1,2,3,4,5) in some better way. I am very
I'm running a Django app on Apache with mod_wsgi -- everything seems to be working but the following error has been clogging up my logs, running every 30 mins o
I am learning multiprocessing in Python, and thinking of a problem. I want that for a shared list(nums = mp.Manager().list), is there any way that it automatica
def patch(self, request): Claim.objects.filter(id__in=request.body).update(....) return HttpResponse(status=200) I'm trying to update some of m
A useful print for debugging in C++ is std::cout << __LINE__ << std::endl; Of course you can simply print a string with the line number, for exa
I need to draw slanted lines like this programmatically using opencv-python, and it has to be similar in terms of the slant angle and the distance between the l
I have a pytest fixture that I need to run only once across all pytest workers. @pytest.fixture(scope="session") @shared # this will call setup once for all pr
My code is working just the way I want - unless input contains alphabetical characters. If so, is crashes. How can I prevent that? My code is as follows: def ma
I have installed django channels and I have added routing.py in project root folder and added the line ASGI_APPLICATION = 'project.routing.application' but whe
I am trying to run a python file and I get the error: 'Python' is not recognized as an internal or external command, operable program or batch file. I know ther
I've made a PowerApps app which uploads an image to SharePoint. When Flow detects that this image is uploaded, I want to run a custom script that can interact w
My code in colab worked in January and now it doesn't. It's a Style Transfer program using pytorch (https://github.com/leongatys/PytorchNeuralStyleTransfer). Th
I'm trying to use the OpenCV Stitcher class for putting two images together. I ran the simple example provided in the answer to this question with the same koal
I am using revolt.chat which has a similar API to discord.py called defectio. This is the documentation for the default help command https://github.com/Darkflam
Im trying to create a new spider by running scrapy genspider -t crawl newspider "example.com". This is run in my recently created spider project directory C:\Us