Category "python"

Apply negative lookbehind to the entire group before it

I want to capture the model of a phone but not the storage in the title. So I don't want the regex to match xxxGB. I am expecting to match: iphone 13 from: "iph

Apply negative lookbehind to the entire group before it

I want to capture the model of a phone but not the storage in the title. So I don't want the regex to match xxxGB. I am expecting to match: iphone 13 from: "iph

Why scipy.integrate.quad returning odd values for integration of a normalised sinc function instead of 1 in python?

While I was trying to approximate a normalised sinc function as a delta function and integrate it using quad from -infinity to infinity , it is returning me som

how to reduce a list of tuples, return a concrete number

I was wondering what is wrong with my code, it now has a typeError: 'float' object is not subscriptable # this function is to calculate Weighted Average Maturit

Get user id by forwarded message (telebot)

I can't solve the problem: I can't get the id of the user whose message I forwarded to the bot. When i forward a message i get my id. I'll be glad to help!!!! M

How can I print more links from the HTML DOM using Python Selenium?

Html: <div class="xxxx"> <a href="ooooo.pdf"></a> </div> Python selenium code trials: from selenium.webdriver.support.ui import WebD

How to scrape weight of player which is a hidden content using Selenium

I have been trying to get the weight of this player, but it is only visible on the inspect element and not on the website, when I print the below, I get a blank

SHAP not working with LightGBM categorical features

My model uses LGBMClassifier. I'd like to use Shap (Shapley) to interpret features. However, Shap gave me errors on categorical features. For example, I have a

How to scrape weight of player which is a hidden content using Selenium

I have been trying to get the weight of this player, but it is only visible on the inspect element and not on the website, when I print the below, I get a blank

How can i use slenium in Python to click the button?

I try to find how can I click on button for accept cookies with a python in selenium, I used a lot of convinations but nothing works :( This is the element: &l

add_page() not accepting the parameters for width and height of the page in FPDF

I was converting a number of images to pdf using FPDF in python, however doing: pdf.add_page('P',x,y) (x and y are well defined and have values, pdf = FPDF())

Tornado error about attributes when deploying a server

I'm trying to run a program that works with Tornado (https://github.com/oduwsdl/CarbonDate), however, when I try to deploy a server with it, I get multiple erro

Tornado error about attributes when deploying a server

I'm trying to run a program that works with Tornado (https://github.com/oduwsdl/CarbonDate), however, when I try to deploy a server with it, I get multiple erro

How can i use slenium in Python to click the button?

I try to find how can I click on button for accept cookies with a python in selenium, I used a lot of convinations but nothing works :( This is the element: &l

What can be a faster way to iterate through the pixels of an image?

I'm trying to loop through all the pixels of an image using Pillow then append the pixels with their corresponding RGBA color into a dictionary What I have at p

How to deploy an exclusive conda package in heroku?

I´m using heroku to deploy a FastApi running in a conda virtual enviroment. I'm have installed all the packages using pip, but there is a package that is

ImportError: Imageio Pillow requires Pillow, not PIL! on M1 Mac

This question might have been asked several times but I am not able to resolve the error. I have pillow, imageio and other libraries installed on my M1 Mac. But

ImportError: Imageio Pillow requires Pillow, not PIL! on M1 Mac

This question might have been asked several times but I am not able to resolve the error. I have pillow, imageio and other libraries installed on my M1 Mac. But

NameError: name 'inslider' is not defined

Now I got a better looking new Overview of the Code: class innentemp: import ipywidgets as widgets from ipywidgets import interact import matplotlib.pyplot as p

How do I find where Python's libpython is located?

I'm using Conda on macOS, and I'm getting an error while building a Rust package that it can't find the libpython3.7m.dylib library. How can I find this? After