Category "python"

Sip installation fails --plat-name not recognized correctly

I was trying to use pip to install pyqt5 on my windows 10(64-bit) sytem. Before this I upgraded to python 3.10.4. The Installation using pip failes during the i

Why is my function not printing the try-except-else result?

What is wrong with my code? I am not being able to retrieve data about the age range. I am working with a CSV file but having problems with the try-except-else

Drastically results variation when change condition in _gradient_descent tSNE scikit-Learn

I am working with some noisy data to classify the spectrum of light curves using the tSNE instance in scikit-Learn. The problem comes when I try to understand h

How to remove repititve pattern from an image

I have to clean images for my OCR. Some of them have text of quite pale gray color above complex background. After some modifications I've got result like this

get a dictionary of an attribute in all instances

class Players: def __init__(self, username, score): self.username = username self.score = score If I create a class and some instances of it with diffe

Can you connect a controller to Pygame Zero?

I have programming as a subject in school, and this is our last project of the semester. For our last task we are going to use replit.com, which use PygameZero.

numba: underlying object has vanished

I am experiencing the following exception when using Numba. What does it mean, and how can it be avoided? It occurs in the middle of a convoluted function, so u

how to fill a row in a subcolumn inside a multi column dataframe?

I have a multicolumn dataframe called full_week that the first column is the employees names and the other columns are columns with each weekday name starting f

Odd Linearization of Pydrake Body with Bushing Constraint

I'm currently simulating a four-bar linkage with the bottom link bolted to the ground, and I am using a bushing constraint. I need to use the Linearize function

How to tag nodes implicitly in yaml (PyYAML)

Consider this yaml file: !my-type name: My type items: - name: First item number: 42 - name: Second item number: 43 There is one top level object t

How to use ODBC connection for pyspark.pandas

In my following python code I successfully can connect to MS Azure SQL Db using ODBC connection, and can load data into an Azure SQL table using pandas' datafra

combine two rows with negligible threshold on a groupby dataframe

I have a raw dataframe(simplified) as below: ColumnA startime endtime A 2022-02-23 08:22:32.113000+00:00 2022-02-23 10:54:04.163000+00:00 A 2022-02-23 10:54:04

Drawing an arc using pyqtgraph

I need to draw some shapes on the screen using pyqtgraph. I chose pyqtgraph over matplotlib because the former is way faster when a lot of shapes are present. F

calculate day of the year from 15minute timeseries data

I want a column with day of year. How do I calculate day of the year with 15-minute interval data which are resampled to daily entries. The following code produ

Reading Data in Vertex AI Pipelines

This is my first time using Google's Vertex AI Pipelines. I checked this codelab as well as this post and this post, on top of some links derived from the offic

How can I include external modules when compiling Python code with Cython?

I have an extension that I compile with cython into the related *.pyd or *.so files, which are then imported into my very basic main.py: if __name__ == "__main_

Error status after sending 32768 bytes from serial port in Python

I am making uart communication using serial library. I can send and receive data, but when the number of bytes sent reaches 32768 or more, I get the error; Val

How do you implement SVoice?

I'm trying to use Facebook's SVoice to split out different speakers in my audio file using python. I found a library that implemented it here: https://github.co

I was unable to install my packages from requirement.txt. I keep getting "no module named 'torch'". Please how do I resolve this

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [10 lines of output] Traceback (most recent call last):

Convert text file into dataframe with custom multiple delimiter in python

i'am new to python. I have one txt file. it contains some data like 0: 480x640 2 persons, 1 cat, 1 clock, 1: 480x640 2 persons, 1 chair, Done. date (0.635s) Tue