2,205,288 questions
Score of 0
0 answers
31 views
Embedding models fail possibly on scientific characters no matter how the pdf is parsed
Edit: Added parsing code
I'm trying to create a RAG pipeline using Llamaindex. Anytime I try to use an embedding model on these papers for semantic chunking or anything, it doesn't follow through, ...
Score of 0
0 answers
19 views
Using the Pynput Listener and Key Pressing for the Numpad on Linux?
I'm using Pynput to listen to hotkeys and also press buttons on my keyboard. However it doesnt register my numpad correctly. I am using Linux Mint 22.3 on kernel 6.17.
For example I could replicate ...
Score of -3
0 answers
32 views
ID switching and changing while tracking people in a cctv retail store footage [closed]
I'm working on a project : detecting and tracking clients from a cctv footage in a retail store, and I face the problem of ID switching and changing, and I can't solve it. is there any solution? (i ...
Score of 0
0 answers
23 views
nRF24L01 Python (Luckfox Pico / Linux SPI) throwing MAX_RT / failing to communicate with ESP32 receiver nRF24L01
I am interfacing an nRF24L01 module with a Luckfox Pico (running a Rockchip Linux Buildroot environment) using Python via spidev and python-periphery for the CE pin.
I am trying to transmit simple ...
Score of -2
0 answers
24 views
Sending android Notifications in python flet [closed]
We want from flet to create an official library used to send android/ios notifications and every time i use unofficial libray it fails so any one have a sultions for now
Score of -4
1 answer
131 views
How to normalize complex JSON using pandas? [closed]
I try to work out the workflow of flattening it.
Here is the JSON:
inventory = [
{
"id": 1,
"fields": 5,
"laws": [
{ "id"...
Score of 0
0 answers
34 views
How do I get Python GEKKO chemical splitter unit operation to propagate mole fractions from input to output streams?
I am exploring various GEKKO Chemical flowsheet units operations and is currently stuck with the the configuration of splitter object. APOPT solves fine. I expected the mole fractions from the inlet ...
Score of -2
2 answers
57 views
Selenium Wire: POST request returns 403 Forbidden although cookies, CSRF token, and payload match browser request
I'm debugging a Python automation project using Selenium Wire.
The workflow is:
Open landing page
Click Subscribe
Extract CSRF token (gltk19682)
Extract uniqid
Update form action
Submit the form
...
Score of -3
2 answers
131 views
What is best practice for preventing a class attribute from becoming stale data?
How do we lazily re-compute data for read-only getters, or read-only accessors?
Let's say we have a string:
Imaginary Hotel Frisco | ACME llc - 1202 Summit Boulevard, Frisco, Colorado
Now, we ...
Score of -4
2 answers
114 views
Returning the value of the last expression calculated
I have written a Python function that iteratively prompts the user, takes the resulting input and evaluates it using eval, and prints the result. It should continue until the user enters 'done', and ...
Score of -2
1 answer
91 views
How do I store calculated values for later use from a multiprocessing process in Python?
I am trying to perform calculations that scale as (n_obj choose 2 (or 3) )*N_events over a large data set where n_obj is on the order of 1000, and N_events is on the order of 10^6. Thus, it makes ...
Score of 2
3 answers
129 views
How do I prevent redaction rectangles from removing surrounding text?
I am using page.search_for() to find instances of a phrase and replacing those instances with a black rectangle using page.add_redact_annot() and page.apply_redactions(). This works perfectly in most ...
Score of -6
0 answers
149 views
How can I directly declare Unicode rather than finding a string to encode? [closed]
If we want to declare a unicode, for example we use:
string_encoder = string.encode("utf-8")
But I want to declare unicode that cannot be converted into string.
For example, 0xC0 0x00. How ...
Score of -3
0 answers
108 views
Best Way to Specify Linux Distribution Repo Version of Python Dependencies?
I have a Python project that needs to be installed at the customer site without PyPI, using only Linux distribution repositories for security reasons. I still want to include the PyPI versions of my ...
Score of -4
0 answers
108 views
Google Drive and Google Docs API authentication exception: invalid scope, bad request
Learning the ropes of Python's Google Drive and Google docs APIs, I've run into issues here and there, and solved them easily enough.
I tried looking at some other threads but couldn't find a solution ...