Getting and processing the table
In addition, team names are included in a sub-label or there is more than one data (WWLDD) assigned to separate tags in the performance column, namely the last5 column, but located on a single column....
View ArticleFastAPI runs api-calls in serial instead of parallel fashion
I have the following code:import timefrom fastapi import FastAPI, Requestapp = FastAPI()@app.get("/ping")async def ping(request: Request): print("Hello") time.sleep(5) print("bye") return {"ping":...
View Articlesolve rectangular matrix in python to get solution with arbitrary parameters
I want to solve a rectangular system (with arbitrary parameters in the solution). Failing that I would like to add rows to my matrix until it is square.print matrix_aprint vector_bprint...
View ArticleI was doing data analysis in Jupyter Notebook Online. Here is the error that...
This Error was ShownI want to fix this eeor but i am not able to do that. I need help from the community for fixing this.I have tried fixig it with different arguments but still not resolved. What...
View Articlehow can i correct zsh: segmentation fault code-oss on my kali linux
type hereI'm trying to run code-oss on my kali linux but it opens for 3 seconds and returns me back to my terminal with zsh: segmentation fault code-oss error message.How can I correct...
View ArticleEmbed python code in the HTML download link and have it run automatically
I want to create a single html page i.e. download link. How can I embed an image in the background of that page? When I visit the page, that is, when I enter the link, I want it to be automatically...
View ArticleDetect and highlight straight flushes in players’s hand with a wildcard?...
Here are the specifics of the problem:The game starts with two deck of cards and fours players. Each player draws and starts with a 27-card hand. As they play the game, the number of cards in the hand...
View ArticleDjango FileResponse crashes with large files
...I have a Django application with a lot of data and a MariaDB database running on a Raspberry Pi (OS = Debian 12). The application uses Daphne as Webserver because there are also Django Channels...
View Article"window must be an integer 0 or greater" issue with '30D' style rolling...
I've had a look and can't seem to find a solution to this issue. I'm wanting to calculate the rolling sum of the previous 30 days' worth of data at each date in the dataframe - by subgroup - for a set...
View ArticleChecking if a number is even without built-in functions [closed]
Given an integer value as input, write a Python script that checks if the number is even or not. The script should print 'True' if it's an even number, and 'False' if it's not. Don't use any built-in...
View ArticleHow to break a while loop when users enter nothing [closed]
The if statement should print "good" and break when I hit enter but instead, it keeps asking for input with no error. Does anyone know what is wrong with the code?input_list = []while True: input1 =...
View ArticleWhy is chatgpt api sending an incomplete response and using less tokens than...
I'm working on a Python application that utilizes the OpenAI API to process and generate responses based on the text extracted from PDF documents.def...
View ArticleHow can I import another Python file in the same path? [duplicate]
When I was writing a Python package, I hoped my __init__.py to import another Python file in the current folder. It works fine in the local environment, but when I upload it to PyPI and download it, I...
View ArticleFind rows in a dataframe with more than 1 non-zero value in certain columns
There are 5 columns in my dataframe that have a code value, generally that code value is the same in all those columns or zero. I want to find rows where there is more than 1 distinct value, excluding...
View ArticleA problem about generator built by iteration
I came across a problem in CS61A:Given a sequence of unique elements, a permutation of the sequence is a list containing the elements of the sequence in some arbitrary order. For example, [2, 1, 3],...
View ArticleCan anyone help me reduce the space complexity of this code for finding 4...
Cinema Seat Allocation (https://leetcode.com/problems/cinema-seat-allocation/description/)A cinema has n rows of seats, numbered from 1 to n and there are ten seats in each row, labelled from 1 to 10...
View ArticleHow can I stream an OpenCV video?
I'm trying to make the image/video streaming from here work on socket so I could make it send that stream to a server in the cloud. For testing, I just use Live Server to host the webpage and use...
View ArticleHandling millions of state keys in Beam and Dataflow
I’m building a pipeline where I need to keep track of item changes. I need to implement a stateful streaming pipeline. The use case in general is I will be receiving around 10s of events per seconds....
View Articlei and j equivalent in python
I was wondering what the equivalent of "i" and "j" in C++ is in python. What I am trying to do is add each number in one set to the corresponding one in another (i.e. in the example below: [2+1],...
View ArticleIs there an efficient way to format Decimal?
It is nice, easy and fast to use format-strings in python. So I never considered the performance penalty of this operation. Some time ago I switched my program from float data type to Decimal to...
View Article