Category "python"

Option for dataframe-image module (convert a styled DataFrame to image) that the creator stopped updating and supporting

Always the best answers here from the community and that the image is perfectly formatted, that perfectly fits the columns according to the data, without loss o

Problems with Django URL routing

I'm building a website, to be used in dental practices, however I'm having trouble with the URL routing. I'm wanting af URL pattern like: Denthelp/kartotek/#nam

Checking for Duplicates twice over in a File - Python

config.yml example, DBtables: CurrentMinuteLoad: CSV_File: trend.csv Table_Name: currentminuteload GUI image, This may not be the cleanest route to

Pytorch get "reduced" tensor by indices

I have a tensor a = torch.arange(6).reshape(2,3), and another tensor b=(torch.rand(a.size())> 0.5).int().nonzero(). I want to create a new tensor that contai

Pythonic way to control an attribute over another attribute

There is a pythonic way to control attributes? I wan't that the init method is clear, trying to avoid to use a function like: self.a = check_a_greater_than_b(a)

how to train yolov3 on custom dataset

i want to train yolov3 on this dataset https://www.kaggle.com/datasets/mangosata/exclusivelydarkimagedataset-from-cschan i have a text file for each image conta

ERROR: Failed building wheel for pystan in Anaconda distribution. How to fix this error?

When trying to install Darts library its dependencies Pystan and Prophet were throwing errors: ERROR: Failed building wheel for pystan Building wheel for prophe

HTTP retrieval failure when creating drop-in audio chat using Twilio

I am leveraging the Twilio Programmable Voice API to create a drop in audio chat room when a user completes a signup form. I am using ngrok to listen to both my

How to get progress of file upload using requests.post() if the file was just uploaded via form-data? (Not sure whether this is a streaming process)

Suppose I'm running some kind of web service with python & flask aiming to provide file upload. It should be noted that my service is only a kind of transfe

use python interface to do interpretable ai why always restarting kernel?

https://docs.interpretable.ai/stable/IAI-Python/quickstart/ot_classification/ I use python interface to do interpretable ai, but it is always restarting the ker

How move files based on file names in R?

I know the question was asked many times but still i'm copying empty file. let's assume i have 50000k files and i have around 3000 file names as a vector so i w

Is there parameter to limit no of tweet replies retrieved based on given conversation_id?

In below code I am trying to retrieve recent tweet replies based on given conversation id but the problem is due to randomly fetching all the recent tweet it is

How can I count dictionary items with specific values inside list in Python?

I want to print and count the users who are 'male' and are born on 1973, 1980. Is there a way to search '1973' and '1980' in 'birthday' values so I can count th

Tasks sequence in Prefect Flow Python

I'm currently working with the Python framework - Prefect (prefect.io) I wrote the code below from prefect import Flow, task @task def say_hello(): print('H

POST HTML FORM verificaton doesn't work with Django

I am currently learning Django,I connected my register FORM with my views.py, and wrote a little backend code, the problem, is that it links successfully with m

What is the fastest way to get all documents of a collection?

I have a problem. I want to get all documents of a collection with ~ 1 mio documents inside. I asked myself what is the fastest way to get all documents inside

How to convert the following R code to Python code

The code drops the columns that are not required from the table: inputData <- inputData[,!(colnames(inputData) %in% c('col1','col2',''))] Need help converti

Formating a frequency dataframe to a table and a histogram

If I have a frequency table like below: ret < -1(%) -1 < ret < -0.5(%) -0.5 < ret < 0(%) 0 < ret < 0.5(%) 0.5 < ret <

How to covert labels array into one vector of letters

I have the labels as the following: array([[1., 0., 0., 0.], [1., 0., 0., 0.], [1., 0., 0., 0.], ..., [1., 0., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]], dty

Is it possible to interact with PDF-VIEWER (Selenium or other tools)?

This issue has been driving me crazy lately, I've been looking all over the internet for days and just found unaswered questions. Is it possible in any way to i