Category "python"

Apache beam FixedWindow doesn't do anything after GroupByKey transform

I built a pipeline which reads from confluent kafka it processes the records and then use side outputs to split them into rejected and approved pcollections, th

passing function variables to another file python

I need to pass data_connection into my main.py engine because that variable is where the data from mysql string is being stored. In main.py it says parameter da

Scraping the rating of some reviews as pictures

I am trying to scrape the rating of some movie reviews but the rating is not a number, but it is one of 10 different images that range from showing empty stars

Django - Form not saving when submitted

Good afternoon all, One of my form does not seem to save when submitted. I cannot see why, in particular as I have a similar form working just fine using the sa

Сommand tox -r doesn't deploy venv python in project

I have some project, that on my local pc by windows correct work. When I copy this project through gitlab on server, I don't see some folders. So, tox -r comman

pycord says "TypeError: object TextChannel can't be used in 'await' expression"

I use Pycord, and when I use channel = bot.get_channel(975050208264200242) with await channel.send(embed = embed2) to send message it says me TypeError: object

How does a fernet key work and how to store it safely (Python)?

I am experimenting with Fernet from Cryptography module in Python and encountered certain heavy terms I was not able to understand, despite clear and good docum

how to swicth to a metamask pop up in chrome with a python selenium script

i am on rarible.com minting a nft with metamask i go threw the hole process then in the chrome browser a metamask pop up appears to click confirm the transactio

Check all members custom status instead of just my custom status

How could I change this command to check the custom status of all the members in the server instead of just checking the custom status of the person that wrote

Python-pptx, find special text and replace with image

I'm trying to replace text in PowerPoint slides with an image. For example, if I find <graph1> I would like to replace that text with the picture "picture

(Python) Fill the column by webscraping the data on the website. Getting an error: UnicodeError: label empty or too long

I have a dataset that looks like this: ID Link 1 'https://wwwexamplecom/hello/details-5565558html' 2 'https://wwwexamplecom/hello/details-5489292html' 3 'https

Change object data type to float data type

I read the .cvs file, which dataframe is named "df". But because I want to focus in one row I renamed my dataframe to "br". My problem is that I'm trying to con

How to Merge two datasets with different indexes but one common ID factor?

I am working with two distinct datasets: one regarding COVID-19 statistics and one with demographic characteristics of a city. The covid19 one, namely covid.df

Pytorch transfer learning accuracy and lossess not improving. Resnet 50 and Cifar-10

I have been trying everything to fix this issue however my results are still the same, my validation accuracy, train_loss, val_loss are not improving. I have no

Assigning empty list

I don't really know how I stumbled upon this, and I don't know what to think about it, but apparently [] = [] is a legal operation in python, so is [] = '', but

Problem Running Azure Durable Function in parallel

I am trying to run each API call to my Azure Durable Function in parallel. It works fine with executing just a single call, but when I get multiple calls at onc

How to send a message in a newly created discord channel

What im trying to do is make a command that creates a new channel. The problem is that the channel doesnt create and gives an error. newChannel = client.create_

How can I iterate a for loop in Python in the increments of sum of another variable and iterator

I am trying to make a python program for "The Sieve Of Eratosthenes" but I am stuck at one place. The c program I wrote looks something like this : for (i = 2;

StableBaselines-3 DDPG + HER Multiprocessing

I was reading documentation about HER and also about Multiprocessing in stable-baselines3 website However when i try to train it throws a error! Is there any ex

Is there any way to kill a Thread?

Is it possible to terminate a running thread without setting/checking any flags/semaphores/etc.?