Category "python-3.x"

CPU Percentage Scan

I need to scan through all running processes and filter the ones with high usage. I currently have the code bellow but is taking too long to scan through them.

Dependencies issue while installing model card toolkit

Model Card --> Model Card toolkit I want to install a model card toolkit in my python virtual environment through this command: pip install model-card-toolk

Serverless deploy from M1 MacBook Pro causes invalid ELF header error

I have a serverless REST api connecting to MongoDB atlas. When making changes and running sls deploy everything deploys as normal. But when I query the DB from

Compare 2 csv files and remove the common lines from 1st file | python

I want to compare 2 csv files master.csv and exclude.csv and remove all the matching lines based on column1 and write the final output in mater.csv file. master

How to run Django admin site on Android

This is what am facing with with Django on my Android I'm using Pydroid on my phone. Python and Django are fully functional. But when I try to run Django admin

ValueError: Compute method failed to assign custom.module(11,).historial_ids in Odoo 14

I've only been learning odoo-14 for 2 weeks. There are three compute functions in my code. But I got the error: Odoo Server Error Traceback (most recent call

how to use keygen.sh API for python

really sorry I am a noob coder trying to make it so users need to have entered a license key that gets stored on the local computer & checks the policy from

Django can't save userprofile instance during saving forms

I am getting this error Cannot assign "<QuerySet [<UserProfile: UserProfile object (131)>]>": "BlogComment.userprofile" must be a "UserProfile" ins

How to go through all Pydantic validators even if one fails, and then raise multiple ValueErrors in a FastAPI response?

Is it possible to call all validators to get back a full list of errors? @validator('password', always=True) def validate_password1(cls, value): password =

In openpyxl, is there a way to see what conditional formatting rule(s) are applied to a cell?

I'm using openpyxl 2.5.6 and py 3.7.0. My goal is to read an Excel workbook and print both the contents and the formatting of each cell into a CSV. For instance

Not able to use rasa x with current version of rasa

Rasa forum says that rasa x 1.1 supports rasa 3.x, but when i try running rasa x on a model trained with rasa 3.1 it gives me error. UserWarning: Your version o

Handwriting detection with keras : using a `tf.Tensor` as a Python `bool` is not allowed in Graph execution

I've tried to run a code example (hosted on keras.io) regarding the handwriting recognition task. While playing with the code, I faced a TensorFlow-related issu

Bruteforce python shuffle function

Hello I was wondering how to revert a string that was shuffled with the random.shuffle() function from python. I know that the original string was shuffled with

How to implement snap grid with cross cursor in pyqt?

I want to draw a snap grid like the picture as bellow,I can draw the background point, but I don't know how to snap the grid point while mouse moving,Could her

Wrong result of sympy integration with symbol limits

from sympy import * s = Symbol("s") y = Symbol("y") raw_function = 1/(150.0-0.5*y) result = integrate(raw_function, (y, 0, s) The above snippet gets a wrong re

How can i do many things to configure data with keras

I am a beginner learning deep learning by Keras. The ImageDataGenerator class in Keras and the flow_from_directory function made it easy to label images. But al

If statement issue with basic python program [python]

I a new in programming , was trying some concepts with if else in python The if else statement is not working as it should. I'm using nested if-else , however o

Entire Pandas Column Read in as NAN from read_csv()

I'm having trouble reading in my CSV file with Pandas. It's reading in a stock dataset which contains the Date and OHLCV columns, but for some reason, it's read

How to change the default Pydantic error message using FastAPI?

Is there any way to change the default response from Pydantic so that "msg" is "message"? { "detail": [ { "loc": [ "body

Python-TensorFlow app FileNotFoundError: [Errno 2] No such file or directory

I am trying to test a simple Flask-TensorFlow Image Classifier app from docker container. The Docker containers were successfully deployed in an Ubuntu 22.10 EC