Category "python-3.x"

How to save a seaborn plot as svg or png

Hi all I have been trying to save my output chart with plt.savefig("coeff.png") as svg or png but what I get is only a blank picture. Is there anyway I could ge

Connect to undetected-chromedriver docker image

I have been using https://hub.docker.com/r/selenium/standalone-chrome on my Synology NAS to use Selenium Webdriver to perform automated requests. I don't rememb

Playwright Python Click in element inside iframe document

How can I click on this element that is inside an iframe with an html document? IMAGE .click() does not work

Why is there no 'settings'icon in con definitions

Such a popular icon as a gear wheel. Why isn't it in KivyMD? That is for example: MDIconButton: icon: 'settings' Instead of an icon, it's just a white squa

loop over airflow variables issue question

I am having hard time looping over an airflow variable in my script so I have a requirement to list all files prefixed by string in a bucket. next loop throug

what is the procedure of registering the webhook for twitter?

I am trying to register url as webhook on twitter through the curl command given in the twitter documentation. I think twitter documentation is a bit outdated o

How to update data in pyarrow table?

I have a python script that reads in a parquet file using pyarrow. I'm trying to loop through the table to update values in it. If I try this: for col_name in t

Python 3.9.8 fails using Black and importing `typed_ast.ast3`

Since updating to Python 3.9.8, we get an error while using Black in our CI pipeline. black................................................................

Get all members discord.py

I've got a question, I need to get a list from all members from all servers where the bot is online(I'm using discord.py rewrite), Right now I have this code-sn

how to download youtube video in the highest quality available

This code works perfectly, but I don't want the lowest quality. I want the highest one. When I tried changing the video = youtube. streams.first() to video = yo

convert float64 (from excel import) to str using pandas

although the same question has been asked multiple times. I dont seem to make it work. I use python 3.8 and I rean an excel file like this df = pd.read_excel(r"

python equivalent code for matlab histogram

I am manually trying to convert a matlab code to Python for my application. The Matlab code is this: % BUILD HISTOGRAM % Specify bin centers of the histogram b

convert float64 (from excel import) to str using pandas

although the same question has been asked multiple times. I dont seem to make it work. I use python 3.8 and I rean an excel file like this df = pd.read_excel(r"

MessageMediaUnsupported() instead of MessageMediaPoll() type when using Telethon

When I receive a message, my client waits until he receives a message that has media type = MessageMediaPoll(), it worked, but the bot has been updated and now

MessageMediaUnsupported() instead of MessageMediaPoll() type when using Telethon

When I receive a message, my client waits until he receives a message that has media type = MessageMediaPoll(), it worked, but the bot has been updated and now

Code in Python that count repeated elements and return the item repeated most times and how many times

I have a list with integers, I need to find which item repeat the most, then the function should return two variables (value, number) value is the repeated elem

How to create python 2.7 virtual environment using python 3.7

I have Python 3.7 && I would like to create a python 2.7 virtual environment to run some code that only works on python 2.7 How do I create this python

The problem when working with requests using a proxy in Python

Sorry if some of the suggestions are going to be weird. I used a translator, because this question was not answered on my language's stackoverflow. import threa

How do I dynamically import a python module containing imports to sibling packages?

I'm developing a command line tool in python which takes a source directory and build directory as parameters. The tool should walk through all directories in t

pip install dlib, Cmake error compiler is not found

when i want to install pip install dlib it gives me this error i have both installed MSVC v142-vs 2019 c++ x64 build tools and c++ Cmake tools for windows and y