Category "python"

I can't run websocket django in server nginx

nginx map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { listen 80; server_name www.abo3aly.com abo3aly.com;

Trying to detect all the filled circle and get their value? OpenCV Python

What I am trying basically I want all the filled detected circle values, the circle will be filled with black or blue pen, I tried BLOB detection but unfortunat

Marshmallow How to Enforce a Required Field when Dumping?

>>> class Foo(Schema): ... id = fields.Int(dump_only=True, required=True) ... name = fields.Str(required=True) ... >>> >>> Fo

How to search via Enums Django

I'm trying to a write a search function for table reserving from a restaurant, I have a restaurant model: class Restaurant(models.Model): """ Table Rest

Spotipy - 401 token error "no token proviced" with .search function

I have a list of dictionaries that contain album information which I'm trying to use to search within Spotify and then add to users' saved albums. I tried follo

multiprocessing vs multithreading vs asyncio in Python 3

I found that in Python 3.4 there are few different libraries for multiprocessing/threading: multiprocessing vs threading vs asyncio. But I don't know which one

How to create multiple CLI options identified my package name in a python?

I want to build a cli interface for my application which has nested functionality. Example: ├── ... ├── setup.py └^

NameError within moviepy subclip function

Traceback (most recent call last): File "C:\Users\Evan\Desktop\Gamble\main.py", line 159, in <module> main() File "C:\Users\Evan\Desktop\Gamble\ma

how do i fix "ERR_SSL_PROTOCOL_ERROR"?

i made a server with twisted python like below options = ssl.CertificateOptions(privateKey=cert.privateKey.original, certificate=cert.origin

Fix wait time for Selenium Form using Python

I'm new to Python and am trying to automate a form fill up. I have done all the work but when trying to "Submit" it's not reading the XPATH and hence not clicki

How to get TF-IDF value of a word from all set of documents?

I need a TF-IDF value for a word that is found in number of documents and not only a single document or a specific document. For example, Consider this corpus c

Convert date format from a 'yfinance' download

I have a yfinance download that is working fine, but I want the Date column to be in YYYY/MM/DD format when I write to disk. The Date column is the Index, so I

CSV adding values to an existing column and calling from a dictionary (no pandas)

I need to add some additional values to an existing column for my CSV file. So this is what I have so far: Sample input CSV file: Alfa,Beta,Charlie,Delta,Echo,F

Training loss much lower than test loss even though it's using the same data

I'm using the same data for training and testing (which isn't best practice), and in theory the loss should be exactly the same. However, when training, my loss

Retrieveing floor price for specific filtered assets Opensea

I know how to get normal collection floor price. However I'm trying to find out how to retrieve floor price for specific filtered assets. such as, grabbing floo

How to maintain Audit Logs

I am storing user data in MongoDB and want to maintain activity logs for each user. eg: Who logged in and when? Which user perform certain and when they did Al

strip all strings in list of specific character

I have been looking for an answer to this for a while but keep finding answers about stripping a specific string from a list. Let's say this is my list of strin

Add missing dates to pandas dataframe

My data can have multiple events on a given date or NO events on a date. I take these events, get a count by date and plot them. However, when I plot them, my

How to write an unit test in Python in tictactoe code

--------- Global Variables ----------- # Will hold our game board data board = ["-", "-", "-", "-", "-", "-", "-", "-", "-"] # Lets us know

3D head mesh morphing from one mesh into another using scripts (C, C++, python etc) [closed]

I have 2 3D head images and want to morph one into the other (animation) without using blender, three.js etc. I want to do it using coding pre