Quantcast
Channel: Active questions tagged python - Stack Overflow
Browsing all 13921 articles
Browse latest View live
↧

Differentiate between feature detectors and descriptors

I was solving my Image Processing - Features descriptors when I came across this problem. I could not understand the difference between image detectors and descriotorsI tried googling but could not get...

View Article


Image Prediction Failed in Flask Backend

I have created a Flask backend that can upload an image through an endpoint and it will predict that image through an image model.@automatic.route('/upload_file', methods=['POST'])def upload_file():...

View Article


raise ValueError("RSA key format is not supported") Convert a string into RSA...

I am trying to create a RSA publickey with a text that is entered by user. I use Cryptodomex library. Although I have used PEM to create a string in PEM format, it did not work and there was an error...

View Article

How to create my own ex command in AstroNvim, nvim, macOS

I want to add ex command to AstroNvim so that when i type:rnit does::!python3 path_to_current_fileso that i could save some typing, if rn command already does something then rename it to :rnf or :rncfI...

View Article

Pandas KeyError: value not in index

I have the following code, df = pd.read_csv(CsvFileName)p = df.pivot_table(index=['Hour'], columns='DOW', values='Changes', aggfunc=np.mean).round(0)p.fillna(0, inplace=True)p[["1Sun", "2Mon", "3Tue",...

View Article


no module named

I am having error importing modules in my jupyter notebook when running it on a mac machine after successfully installing them using:!pip install <library name>.I try it on several modules and...

View Article

Image may be NSFW.
Clik here to view.

Aligning/syncing one audio file to another using Python

I have 2 audio files recorded using laptop mic and one with external mic. Laptop mic recording starts after external mic. The time difference could be 2-60 seconds.So I wrote this code which is pretty...

View Article

Determining if an array contains a contiguous sequence of elements of length N

I'm trying to find a way to check if an array has a sequence of numbers like:[1,2,3,4,4,4,4,5,6,7]Unlike here, I don't mind where they are, just that there is a repeat (of any number) of length N. I...

View Article


The results of math.fsum is different from a simple loop sum in python

I'd like to understand why the two methods of summing a list of floating point numbers differs by exactly 32.0?import mathnums =...

View Article


Player does not move

My player won't move and I don't understand why. I followed a tutorial on how to make it move. I did what the person did but it doesn't move for me.Here is my code:import pygamepygame.init()screen =...

View Article

Create unique id column for each pair of (col_x, col_y) in polars Python

I have a polars dataframe with subject_id, timestamp, event, col1, and col2 columns.I want to split this dataframe into two polars dataframe (one with subject_id, timestamp, event and one with...

View Article

Extracting questions from MCQ PDF

So what im trying to do is extract MCQ questions from a pdf. These are saved as screenshots because some questions contain formatting elements such as images and tables. So basically I need to store...

View Article

Value_counts printing wrong value

While working a pandas value_counts exercise, the return is never what is expected and what I need to getThe code I used is:import pandas as pddf = pd.DataFrame({'a':[1, 1, 2, 2, 2]})value_counts =...

View Article


Django no reloading

I am working on django project, and I need a page switching without reloading, it should be switched between pages smoothly like react. Can I achieve this?I asked ChatGPT, and tried bunch of examples,...

View Article

How to create python script on namecheap shared hosting

I want to create a python script on namecheap shared hosting ..Guide me how to do thisI want to create a python script on namecheap shared hosting ..Guide me how to do this . Guide me proper how to...

View Article


Spark doesn't see Hive tables depending on how you run it

The problem is that depending on how you run Spark you can see or not Hive databases. I do three next actions:Using Hivehive> show databases;OKdefaultmydbsparkdbTime taken: 0.041 seconds, Fetched: 3...

View Article

Image may be NSFW.
Clik here to view.

How to create a combined heatmap in Python using matplotlib with normalized...

I have a DataFrame containing multiple features along with their associated t-test results and p-values. I aim to generate a combined heatmap in Python using Seaborn. In this heatmap, one section...

View Article


Why is bytearray() making 16 bit numbers

Im writing some code to make .8xp files for a TI-84 and the end of the file is supposed to have a two byte checksum but the first part is being written as a 16 bit number that has no correlation with...

View Article

ModuleNotFoundError: No module named 'llama_index.graph_stores'

I am trying to use the NebulaGraphStore class from llama_index via from llama_index.graph_stores.nebula import NebulaGraphStore as suggested by the llama_index documentation, but the following error...

View Article

anyone knows whether there are algorithms that find all directed acyclic...

I use an algorithm to infer a directed graph (containing cycles) that reflects interactions and feedbacks between variables from a floating-point dataset. I want to examine all DAGs (each contains all...

View Article
Browsing all 13921 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>