Category "python"

How to smooth the curve?

I am using the following code to draw a curve from my two column Raw data ( x=time , y=|float data|).The graph it is plotting is a rough edge graph. Is it possi

Jupyter notebook not opening in VS Code

While setting up my new system, I am trying to run my notebook file on VS Code but as soon as I open VS Code it give me this error Failed to detect Jupyter Note

how to make custom form without database - DJANGO

So i want to upload file but only sent to locals storage NOT DATABASE too. But i don't know how to make custom forms. suddenly, here's my models.py : from djang

joining dotted line by interpolation in an image

I have this image as shown below. It is a binary mask I created this image using the below code. Basically I got the x_idx, y_idx for just those white pixels,

How do I Display Two Continous Data Stream into OpenCV.imshow()?

I have this project that combines two data from two different sensors, a TFLuna LiDAR and a Raspberry Pi Camera Module V2, for an Object Detection self driving

How do I get rid of abnormalities from Pandas?

If I want to remove values that do not exist between -2σ and 2σ, how do I remove outliers using iqr? I implemented this equation as follows. iqr = d

How to append to a file using PyCharm [closed]

Below is the code I'm using to input data into a file using pycharm, however, after the code executes the file has not changed and I know it w

ValueError: Ran into a $end where it wasn't expected - RPLY Parsing

I'm trying to create a parser for a basic interpreted language. When I run my program I get the following error: ValueError: Ran into a $end where it wasn't exp

How to convert an array of numpy.float64 into an array of float64?

I have a np.array containing several other np.arrays, themselves containing objects of type numpy.float64, which cause the following issue with one of my method

How to get up and running with spaCy for Vietnamese?

I success with English python -m spacy download en_core_web_lg python -m spacy download en_core_web_sm python -m spacy download en I read https://spacy.io/mod

How to use validator in Django depending on the database data?

I'm making a web app that keeps tracks of a small business. For that purpose I have two models designed in my app. One of which is all the storage information a

How to iterate over multiple datasets in TensorFlow 2

I use TensorFlow 2.2.0. In my data pipeline, I use multiple datasets to train a neural net. Something like: # these are all tf.data.Dataset objects: paired_data

How to add multiple Notebook tabs (tkinter) without crossing main window border?

Got non-resizable window, Notebook object and 3 tabs. Notebook object go out of window frame with third tab title (I don't want that). Tab titles should become

How to allow extraction of all files even the ones with same name?

I'm struggling with unzip process with this code: I have two separated .zip files and each has the same file name and file type, but when I execute this code on

Messenger bot send a message every 5th message

I am making a simple bot for messenger on python using fbmq, that handles quick questions. I made bot to send a message when users text to my Facebook page ou

How to perform PCA and UMAP dimensionality reduction with multiple images together

I have implemented PCA and UMAP dimensionality reduction for a single hyperspectral image. I didn't any problem. But now I have multiple hyperspectral images(mo

How to create a Slanted wall with Revit API?

Im trying to develop script for myself in dynamo(Revit 2021), but I don't understand how can I create the slanted wall? According to this blog of changes in rev

When I use the Genius API, it doesn't give me the full lyrics

When i run this code (discord.py), i do not get the full lyrics: @commands.command() async def lyrics(self, ctx, arg1, arg2): song = genius.search_song(arg2

TypeError: __array__() takes 1 positional argument but 2 were given?

I am working on transfer learning for an image classification task. The training generator is as follows: train_generator = train_datagen.flow_from_directory(

Labelling connected components of an image with scipy

Hello I am following this example for labelling connected components of an image. I understand how to measure and label the blobs seen in this link. However how