Quantcast
Browsing all 14097 articles
Browse latest View live

Any way to intervention on calling _ctc_loss from Pytorch to Huggingface...

When trying to fine-tune for ASR using M2 Max, I get "The operator 'aten::_ctc_loss' is not currently supported on the MPS backend and will fall back to run on the CPU. This may have performance...

View Article


Using joblib to dump a scikit-learn model on x86 then read on z/OS passes in...

I have made some small tweaks into NumpyArrayWrapper in numpy_pickle.py to allow a decision tree model to be successfully loaded onto scikit-learn running on z/OS. The change boils down to checking if...

View Article


Python custom tkinter and Asyncio with custom function. How to create a...

Basically, I am trying to make an asynchronous GUI.I have made 2 classes that use the pytube package. The Video class represents a video and when it's constructor runs it searches for a video. The...

View Article

Python methods hint is gone after not completed pyannotate

I develop the python module. I store it in "site-packages" folder.Recently I turned on "strict" Pylance type checking and saw the error "Stub file not found" I tried to get rid of it using...

View Article

What worng on this discord music bot code

I just copy this code from youtubeimport discordfrom discord.ext import commandsimport os, asyncio#import all of the cogsfrom help_cog import help_cogfrom music_cog import music_cogintents =...

View Article


How do i solve this fare splitting array problem? [closed]

Suppose, you and your whole group just finished the CSE220 class in BracU at 5PM. All of you are going to the Oppenheimer screening at Bashundhara. You know that now the buses will be the most...

View Article

How to strikethrough substrings without spaces in Sphinx?

I need to strike substrings without spaces in Sphinx .rst file to transform it to HTML in a similar manner as <span style="text-decoration: line-through;">strike</span>substring. The...

View Article

cantools Error: ARXML: "File contains multiple elements with path ..."

How can I suppress/ avoid/ skip the Error:cantools.database.UnsupportedDatabaseFormatError: ARXML: "File contains multiple elements with path X"X stands for actual path.while running this code:import...

View Article


sampling with weight using pyspark

I have an unbalanced dataframe on spark using PySpark. I want to resample it to make it balanced. I only find the sample function in PySpark sample(withReplacement, fraction, seed=None)but I want to...

View Article


Image may be NSFW.
Clik here to view.

Plotly dropdown is not changing the plot as desired

I am trying to plot the line graph using plotly. I need to select the grade and then plot two liones of min and max on the plot for the selected grade.import plotly.express as pximport pandas as...

View Article

How do I do a Django authorization data check?

So, I wrote the code for the reg.html page. If the registration data is filled in correctly, the form is saved and the account is created. I checked everything, the data is entered into the database....

View Article

Creating expanded 1D array from 1D array elements without for loop

I want to create an expanded 1D array from elements of 1D array using some numpy operation and without using a for loop. I would essentially read in the elements of 1D array and count up a few...

View Article

Image may be NSFW.
Clik here to view.

Can't find element text using XPATH with Selenium

I keep getting the following exception because I cannot find an element. I have tried everything from CSS Selectors to XPATH:selenium.common.exceptions.NoSuchElementException: Message: no such element:...

View Article


Discrepancy Between Frame Count Using OpenCV's cv2.VideoCapture and Manual...

I am working on a video processing project using OpenCV in Python, and I've encountered a strange issue related to counting the number of frames in a video. I am using cv2.VideoCapture to read the...

View Article

read images using opencv inside tensorflow data loader

how to use opencv to read images and augument data for a tensoflow data loader, the filepath comming from tensorflow data loader is not stringself.original_image = cv2.imread(input_path)TypeError:...

View Article


Subclassing numpy array for symmetric matrices

I want to create a numpy subclass specialized for symmetric matrices.I want it to be just like any numpy array with only 2 differences:It will have 2 fields for its eigendecomposition: U, D.On...

View Article

Image may be NSFW.
Clik here to view.

fit bimodal skewed gaussian

I have some data that I am trying to fit with a bimodal skewed gaussian. I started with a standadard bimodal gaussian and the data is just too skew. I also want to be able to extract the underlying...

View Article


Splitted PDF Files are being duplicated when Splitted using Text - Python Script

I am trying to split 100 of PDFs with python by specific keyword.If a page in Python contains that keyword, split that page into a new PDF.The Problem i am facing is, the files are being duplicated. I...

View Article

decorator declared and used inside of class [duplicate]

I wrote a manager class to interact with Metabase and I wish to write a decorator inside this class to renew sessions if they're expired.import requestsfrom datetime import datetime, timedeltafrom...

View Article

Python safe string compression without line breaks

I am trying to save a large amount of JSON files, by appending the JSON string as a new line to a large text file. I have limited storage so I don't want to save the JSON string as is for so many...

View Article
Browsing all 14097 articles
Browse latest View live