Category "python"

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.?

Is there any use for the pg_type type?

Is there any real world use for the type pg_type, i.e type ids 71 and 210. Although it's a bit of a faff, queries can result in this type output, as in the belo

Python list slicing not working correctly [duplicate]

I have recently started learning python. After learning list slicing, I thought of trying it out. But when I am using -1, it's returning an em

Utilizing GPU fails with tensorflow and CUDA with process finished with exit code -1073740791 (0xC0000409)

I try to use my GPU for the first time to run a model with Tensorflow it exits whenever training starts with message: Epoch 1/15 2022-05-07 00:46:23.749793: I t

How to embed a digital signature and a digital certificate (.crt file) to a pdf document with python?

how do I embed/add a digital signature (base64 string) and a digital certificate file .crt to a pdf document with python? Is it possible? What lib/packages allo

How do I call a function for any unhandled exception in my Flask app?

I have a Flask app that I am using to create some API endpoints (using flask-restful) for interacting with an app I am developing. I have built a function error

XPATH issue while looping through tags

I have this piece of code, where I try to download these papers but the loop prints the first element only. import scrapy from urllib.parse import urljoin class

How to append row value to the other column

I have a table that includes two columns: P_SEG SEG_ID 1 [2, 4] 2 [4, 3,5] I want to create a new column that includes the 1st column value in the second colu

Way to change value based on condition with previous validated data?

I cannot manage to implement in an efficient way a method that could change values in dataframes based on difference with previous "validated" data. I have a da

I got an error with websocket and json (Discord Gateway)

when i finished the code there was MULTIPLE ERRORS and i was personally confused. import os import websocket #pip install websocket-client import json import ti

How to preform loc with one condition that include two columns

I have df with two columns A and B both of them are columns with string values. Example: df_1 = pd.DataFrame(data={ "A":['a','b','c'], "B":['a x d','z y

Python- How to Combine 2 pandas.core.frame =.dataframe with the same column name together in python [duplicate]

So i got 2 pandas.core.frame.DataFrame like this: anomalies: Sales outlet Date 2006-07-01 700 2 a

Split Datasets per labels

I want to split some datasets such as CIFAR10 or MNIST in a non-iid way: basically I am doing Federated Learning experiments, in which I want that each client h

Unable to select an item from TreeView using Pywinauto

I am automating a desktop application. I need to select an application from a tree view. Class name is TreeView20WndClass. app = Application().connect(path=r"pa

How to record depth stream from realsense L515

I have a depth camera (Intel Realsense L515) and I do like to record a video of the depth. I have seen this answer which is using FFMPEG, but I didn't know how

Trying to get the minimum date and getting TypeError: '<' not supported between instances of 'datetime.datetime' and 'int'

i'm reading from an excel file GA = pd.read_excel("file.xlsx", sheet_name=0, engine= "openpyxl") The data type is: Email object Date datetime64[ns] Name object