2,211,144 questions
0
votes
0
answers
2
views
Pytesseract numbers image to text
I am trying to use pytesseract to extract numbers from images.
It works for some of them (1, 2, 3, 5, 6, 20...) but I would like to make it work for all of them.
Here is a sample of the data that i'm ...
0
votes
0
answers
3
views
Can LlamaParse return as a pydantic object?
I have been unable to make LlamaParse return the parsed content in a strictly structured format,like Pydantic objects. Otherwise I would have to make a separate api call just to make it the parsed ...
0
votes
0
answers
10
views
Django Rest Framework: validate_username and update methods not called during PUT request
I am working on a Django Rest Framework (DRF) project, where I need to validate a username field and handle custom update logic in a serializer. My model has a username field with unique=True. Here's ...
0
votes
0
answers
7
views
How to pull up Django model data based on ALREADY filled out form fields for other ForeignKeys
I have a form in which there are several fields with foreign keys. For example, the table "Entrance" (3 entries -> 1st entrance, 2nd entrance, 3rd entrance), "Apartment" (30 ...
0
votes
0
answers
32
views
Does colab misunderstand type hints?
The following code produces a colab error marker, but it runs properly.
str1 = 'abcde'
zipped: List[Tuple[int, str]] = [(intgr, ltr) for intgr, ltr in enumerate(str1)]
# This is a clever way to "...
1
vote
1
answer
20
views
Error when running zfit on Ubuntu 22.04 with Python 3.10.12 and TensorFlow 2.18.0
I am trying to run zfit on my Ubuntu 22.04 laptop. I installed it like this:
python -m venv venv
source venv/bin/activate
pip install zfit
I've run this code (taken from https://github.com/zfit/zfit):...
0
votes
0
answers
6
views
FPDF2 render_toc spans multiple pages it writes over page headers
Basically if my table of contents exceeds one-page then it the contents of the 2nd page overlaps with the document header.
I tried adding
self.set_y(15)
at the end of the header function. However ...
-3
votes
1
answer
64
views
What is a fast way to convert a very large string to an integer? [duplicate]
I looking for a very fast way to convert a large string to an integer. The int function is very slow for the string I want to convert - I used sys.set_int_max_str_digits(0) to remove the limit for int ...
-2
votes
1
answer
32
views
Plotting a matplotlib pie chart using 2 columns
I'm using this dataset and I want to plot a pie chart using matplotlib to show the percentage of males and females who have their loans approved i.e, Loan_Status == Y.
plot.pie() only takes x and ...
0
votes
0
answers
16
views
Using Python with CustomTkinter and having problems for labels
I'm trying to change the background of the label that its says "Welcome Back to Our Website!", its only shows me the background of the original windows. I saw before that, that specific ...
1
vote
0
answers
38
views
Fast(est) method to iterate through pairs of indices in Python, using numpy
I'm constructing a graph with ~10000 nodes, each node having metadata that determine which other nodes it will be connected to, using an edge.
Since the number of edge possibilities (~50M) is far ...
0
votes
0
answers
16
views
PermissionError When Importing typing_extensions in Python Script Executed from SSMS
I am encountering a PermissionError when attempting to execute a Python script from SQL Server Management Studio (SSMS). The script works fine in PyCharm and from the command line, but when run as a ...
0
votes
0
answers
8
views
How to improve responsiveness of interactive plotly generated line plots saved as html files?
I have some very long time series data (millions of data points) and generate interactive plotly html plots based on this data. I am using Scattergl from plotly's graphical_obects.
When I attempt to ...
0
votes
0
answers
26
views
pandas "ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject"
I tried importing Pandas version 1.1.4 but got this error: ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
I have tried ...
0
votes
0
answers
18
views
Selenium chrome webdriver deletes unicode characters
i have a twitter bot which some of his tweets require flags. untill recently, i used tweepy so i had no problem whatsoever. however, due to API access changes, i switched to using selenium webdriver ...