Category "python-3.x"

PyQt5 problems with CMD

i need some help . I tried to install PyQt5 with CMD in window but when i enter pip install pyqt5-tools , i got this error : enter image description here how c

CPython Script Executor does't work on Pentaho Kettle

Hellow Guys First of all, i'm using the windows 10, java_1.8.0_333, and Pentaho 9.3 I'm trying to many ways to run my Python code in Pentaho, but isn't work. I

Functional Programming: How does one create a new column in a multi-index data frame that is a function of another column?

Suppose the below simplified dataframe. (The actual df is much, much bigger.) How does one assign values to a new column f such that f is a function of another

How to change array rows places whithouth numpy

Hello everyone here is my code: n =[[34,2,55,24,22],[31,22,4,7,333],[87,74,44,12,48]] for r in n: for c in r: print(c,end = " ") print() sums=[]

I have plotly dash app, and get this error: Cannot read properties of null (reading 'layout')

I have web app in plotly dash. I have 3 dropdown and graph with selected item. When I change category i have error: Cannot read properties of null (reading 'lay

Run generator when button is clicked

I want to create a Button to generate a password with tkinter but when the script is running, the password is already generated and the button doesn't work. Her

Extracting data from a .txt file without using modules

I am taking a course in python and one of the problem sets is as follows: Read in the contents of the file SP500.txt which has monthly data for 2016 and 2017 a

GPU runs out of memory when training a ml model

I am trying to train a ml model using dask. I am training on my local machine with 1 GPU. My GPU has 24 GiBs of memory. from dask_cuda import LocalCUDACluster f

Add hours from input , Datetime/Timedelta (Python)

I'm trying to make a script to go to a website and enter in a time in a 24 hour format. I'm using the pyautogui module to perform the web tasks, and Datetime/Ti

Heroku chromedriver and google-chrome build packs are crashing upon use

Using scrapy and heroku for some spiders I have setup. It's worked fine for months, didn't change anything that I know would have any affect, and yet when I try

How to create ratios using value counts and separate fields in Python?

Using the data frame shown below I'd like to create manager to assistant and manager to associate percentages/ ratios based/ per location. I'm looking for the

Parsing html path from packet using Scapy

I am making a application that resends the http packets using scapy. When a packet is sniffed by scapy, it will check the source ip and destination path from he

Remove null from a json data (python)

When I use the Rest API to download data from Firebase, it looks like this. { "Dataset1": [ null, { "Key1": 1, "Key2": 2 }, {

how to keep asking user for right type of input if they type invalid input [duplicate]

This program calculates depreciation I want to keep asking user for input until it gives the valid input. def CalculateDep(amount,nofYears,rat

future got attached to different loop

Task <Task pending name='Task-11' coro=<Queue.get() running at C:\Users\Administrator\anaconda3\lib\asyncio\queues.py:166> cb=[_release_waiter(<Futu

How can I record system audio from my speakers using Python?

I looking for script to record system audio, not microphone audio. I mean when I play music with a media player I want record it. I want record the sound output

Capturing runpy.run_module stdout

I'm unable to capture stdout of runpy.run_module into a variable using StringIO. To demonstrate the problem, I created a script called runpy_test.py (code below

EXIT CODE 1 when restore sql file in postgres

I have an SQL file which is manually generated. I use the code below to create it. conn = psycopg2.connect(host=t_host, port=t_port, dbname=t_dbname, user=t_nam

just installed Python, getting WinError 32 for any libraries I try to install

I just installed Python 3.10 on my work machine. I went to pip install pandas and got a Win32 error on a temp file within the AppData Temp Folder.I have tried

Python: 'ModuleNotFoundError' when trying to import file from same directory

Running Python 3.10. I have three files in the same directory named Chess, one of which is a __init __.py to make sure it's considered a module. In one file, Ch