Category "python"

Constructor __init__ is written to take two position arguments, but when used, reports the error that only 1 is allowed

I have a class and constructor I'm working on, and I added an extra parameter to __init__, and now I get the error, TypeError: FeatureDataset() takes 1 position

Failed building wheel for scikit-learn. Encountered error while trying to install package

I am trying to run a project from github. While installing its requirements, I get the following error: note: This error originates from a subprocess, and is li

Python - Find fewest number of rectangles that enclose a list of rectanges (while avoiding others)

I have lists of coordinates for "good" rectangles and "bad" rectangles. Rectangles may or may not be adjacent to others from either list, but will never overlap

My x-axis is messed up for huge datasets?

I am trying to plot a countplot using Seaborn library. The data-set is a huge dataset with lots of data of more than 100,000 entries and 67 columns. I have trie

i want to make urls

1.Link is "https://www.xyz.{country}/dp/{asin}" 2.I have to pick two things from csv file which country and asin. CSV file contains : Asin Country 0

Error installing pyQt5: error: metadata-generation-failed

I was tring to install PyQt5 and a get this error: note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generati

Threading and Tkinter - How to use the threading module with my simple example?

I don't understand how to use the threading module properly. In this example I have two tkinter widgets, a button and a progress bar. The progress bar (configur

object segmentation using mean shift

i have this image: I am interested to do segmentation only in the objects that appear in the image so i did something like this import numpy as np import cv2 fr

conda package on Nexus Repository

My company uses Nexus repository as npm proxy for package management. Does anyone have experience using Nexus to hold Conda packages (Python) and for proxy? In

Python: extracting specific values out an numpy array of indices

I have a numpy array of indices. For example: indices = np.array([0, 1, 2, 6, 7, 9, 12, 13, 14]) I would like to make an array signals = np.zeros(np.amax(indi

Gettingerror: legacy-install-failure, while installing basemap

I am trying to install Basemap using pip, however at some point it reaches the error: note: This error originates from a subprocess, and is likely not a problem

What is the time complexity of suggested solution?

This is the solution for the following problem: Given two strings s and t of length N, find the maximum number of possible matching pairs in strings s and t aft

SERVER/CLIENT cannot send and recieve data on the same socket, server close server after first attempt

Hi im trying to create a backup function for my program, the idea is to copy and send all the files from one especific folder from my client to the server, the

Most efficient way to transform this data using Pandas?

I currently have several hundred .csv files in the format shown on the left below, and I need to transform them all into the format shown on the right. I tried

how to reshape 3D to 2D with a big number?

hello i'm trying to reshape an array with shape (70,65536,18) to an array in 2D with shape (4587520,18) but i the result its a 3D array whit the same shape here

Why is my Nextcord Discord Music bot not looping or queueing?

I am Making a Music discord bot and I have been trying to make it loop and queue songs. But when I try to queue a song it just starts playing it instead of queu

view limit minimum 0.0 is less than 1 with matplotlib

I know there are similar questions to mine below, but mine is minimal and does not have anything to do with pandas and also solution pd.to_datetime did not work

Error when open Jupyter Notebook from putty

I'am trying to open Jupyter Notebook from Putty. I have a server where is installed Python and Jupyter. I followed all the steps from this post Remote access Ju

How to detect checkboxes by removing noise using Python OpenCV?

I am trying to identify the checkboxes in the image The top 4 are identified but the bottom 2 are not. At the same time I would like to be able to get rid of th

Python multiplication table school exercise

I have a school exercise, but im struggling to understand how to do the multiplication table. Could someone please help me? So depending on the number and colu