Category "python"

How to Fix MyTile@SmartTile lags and slow fps

Hey Im Creating a delivery app with kivymd but i have been experiencing a lag when running and navigating through the app and slow fps when loading SmartTileWit

MongoEngine raw query not solved

Mongo engine cannot execute a raw query AppDocument.objects(__raw__={ {"_id": ObjectId("1"),"car._id": ObjectId("2")}, {"$pull":

Why is Tensorflow not recognizing my GPU after conda install?

I am new to deep learning and I have been trying to install tensorflow-gpu version in my pc in vain for the last 2 days. I avoided installing CUDA and cuDNN dri

FastAPI - Dataframe updated change lost between route

I'm trying to make a simple FastAPI api. Let's suppose these routes: The POST Route @api.post('/user', name='Get list of users') def get_user(user: User):

How to remove unwanted white space

Using python In my code: print('Menu') menu_items = ['pizza','burger','hotdog','salad'] menu_price = ['10','7','4','8'] print('0)',menu_items[0], '$', menu_pri

Why qt project can throw errors like undefined reference to `__imp_ Py_Initialize' and so on?

I want to add python functions in C++ code. The project is written using qt. In Mask.pro I have: ... INCLUDEPATH += "D:/workplace/Python/include" LIBS += -L"D:/

Trouble computing integral with scipy quad

I'm trying to compute the following definite integral: Integral I want to compute: where rho_ch is and a = 3.66 * 10^(-15) m (in meters) b = 0.54 * 10^(-15) m

How to get multiple combinations of multiple lists in python (Multiple n Choose K or nCr)

I have been looking on google and stack overflow for a few hours and I am sure there is an answer for what this is mathematically or perhaps it is just what the

How to print a nested list like a grid?

l1 = [[" "], [" "], [" "], [" "], [" "], [" "], [" "], [" "], [" "], [" "], [" "], [" "], [" "], [" "], [" "], [" "]] As you can see I want

python list No displacement

I have a list [{'sender': '0', 'recipient': '15839597-107f-4166-aff1-ac32d3794748', 'amount': 50}] and call this list elsewhere for create sha256 but list item

Django automatic file-upload: [WinError 123] The filename, directory name, or volume label syntax is incorrect C:\\path\to\folder\C:

I'm pretty new to Django and I'm working on a project in which I have to automate PDF file uploads from a given folder to a model in Django and these files will

JSON: Trouble editing a JSON file in Python

What I want to do is remove the array containing "Nike" under the "Shoe" variable. Here is the Json file: { "Shoes/Colorways": [ { "

How to write a python computer program that will take any valid arithmetic expression as a string and will output a list(or array of string)? [duplicate]

How to write a python computer program that will take any valid arithmetic expression as a string and will output a list (or array of string)

pyspark recover for an even number the two values ​of a median

Is there a way i pyspark to recover for an even number the two values ​​of a median ? For exemple: I have this dataframe df1 = spark.createDataFrame

How to write if else inside an if...else statement in python?

i am new to python and in this code i want to check if bid_data[8] not equal to '' then the below code runs otherwise only bidno = bid_data[0].split(":")[-1] sh

What is the most precise delay/sleep function in python

I was making an auto-clicker which has a cps of about 1500, to tune the cps to about 100-1200 cps I need a delay of accuracy about 1ms. Through my experimentati

Python Ctypes - loading dll throws OSError: [WinError 193] %1 is not a valid Win32 application

I have tried to run an exemple of a python code that gets a function from a library using ctypes. The exemple can be found here. I followed the instruction and

Python ThreadPoolExecutor is faster than a loop for CPU-bound task. How come?

Recently I've been working on a project, and found behaviour that I don't understand. We have endpoint that fetches documents from mongodb and then applies tran

"pywhatskit" on python not sending message

Using the module pywhatkit you can send messages on WhatsApp, I used the script: import pywhatkit as w w.sendwhatmsg("xxxxxxxx", " this is a generated msg",9,2

How to convert .py to .exe and run as a background function on windows while retaining args?

I'm looking to run a python script that calls commands through subprocess depending on various arguments that are given to it. For ease of use it would be valua