Category "python"

Choosing number of dimensions in LLE

Is there a way to choose the number of reduced dimensions d where d<D and D is the number of original dimensions in the original dataset? I'm trying to use t

What is the method used by Pandas profiling tool to identify duplicates rows?

I'm looking for the rationale about the method used by pandas profiling tool to identify duplicates rows (in a dataframe with multiple columns)? I couldn't find

Celery, uvicorn and FastAPI

I have a FastAPI api code that is executed using uvicorn. Now I want to add a queu system, and I think Celery and Flower can be great tools for me since my api

Separate FastApi documentation into sections

Currently the OpenAPI documentation looks like this: Is it possible to separate it into multiple sections? For example, 2 sections, one being the "books" secti

Why pyav package in python can not recognize h264_cuvid codec while ffmpeg can do?

I have a python script as below to read byte_stream from video. I want to use h264_cuvid code to do GPU hardware accelerating instead of CPU encoding or decodin

How can I speed up my calculations with loops? Python

I wrote this code. But it works very slowly. I'm figuring out how many times I have to run the case generator to find numbers less than or equal to inv, in this

Jupyter Notebook Won't Open Erno122

I'm trying to open Jupyter Notebook for some fairly heavy data analysis (pulling in datasets from hdf5 files and looking at certain aspects of them). I've done

how to use selenium on web apps built with gradio?

I am trying to click a button on selenium on a web app built using selenium. But ending up with error "element not found". I want to click the submit button usi

Running codes from a list once python

Here I have a code, but I want all of this code to run at same time without each waiting for other to finish before the other run. from telegram import * from t

determine returned object is copy or deepcopy

I was thinking , what if, i has function which returns of copy or deepcopy of object depend on some logic. for random now. from copy import copy,deepcopy from r

How to make a new pyspark df column that's the average of the last n values by day of week?

What I'm trying to do is make a pyspark dataframe with item and date and another column "3_avg" that's the average of the last three same day-of-week from the g

How do I speed up the running of terraform deployments using threading?

When creating terraform deployments, I have to wait until the command completes before running the next command. If I have multiple deployments in parallel - (t

How to extract texts and tables pdfplumber

With the pdfplumber library, you can extract the text of a PDF page, or you can extract the tables from a pdf page. The issue is that I can't seem to find a way

How to retrieve LabelIds and Labels using Google Ads API in Ad Peformance Reporting?

I am trying to create a report for Extended Text Ads using Google Ads API. I was able to do this for my reporting using Adwords API whereby I selected labels an

write each result of the loop to a python list

I have the txt file as follows: 0 1 2 0 // 7697 909 1 // 3536 4921 2 // 1421 6919 3 * 9805 -8620 4 + -862 -5869 ... ...

Aiflow 2 Xcom in Task Groups

I have two tasks inside a TaskGroup that need to pull xcom values to supply the job_flow_id and step_id. Here's the code: with TaskGroup('execute_my_steps') a

No such file or directory when using DataLoader.from_pascal_voc

I'm having trouble using DataLoader.from_pascal_voc from TFLite Model Maker. I've successfully mounted Google Drive into Google Colab and when I printed the len

PYAUTOGUI.HOTKEY

I know that the most usefull tool to create and manipulate workbook/paste are Pandas or Openpyxl. My problem is with TOTVS: I find a table in its program and I

How to install modules on the shell automatically on repl.it using python

I am making a discord bot, for this I needed to make buttons for an embed, and to do that I needed to import a library. Once I imported it in the code replit wo

The 'uvloop>=0.14.0' distribution was not found and is required by uvicorn

I'm new at learning FastAPI, and I'm getting stuck at the very beginning. I keep getting the following error: (venv) root@Xue:/home/proyectos/FastAPI# uvicorn m