2,205,189 questions
Score of 1
1
vote
0 answers
0
answers
6 views
6
views
Is X_test really unseen data if I split it from the original dataset before training?
I'm learning Machine Learning with scikit-learn and I'm confused about the meaning of "unseen data."
I split my dataset like this:
from sklearn.model_selection import train_test_split
...
Score of -3
-3
votes
1 answer
1
answer
55 views
55
views
Lambda in max returns weird value
Why does the code
L = [1, 2, 10, 4, 3, 191, 14, 1]
print(max(L, key=lambda x: x % 2 == 0))
print 2 and not 14? The way I see it it should return the largest even number. But Python doesn't think so ...
Score of -3
-3
votes
2 answers
2
answers
76 views
76
views
How to use a list in a pattern in re.match
I'm making a program to automate a task, and at some point in it I need to use a list comprehension [f for f in ...] to make a list, and I want to use re.match() or re.search() to compare the files in ...
Score of 0
0
votes
1 answer
1
answer
34 views
34
views
Playwright python script function waiting at book 161
I was extracting detailed data from every book on books to scrape the script has two functions the first function works fine but the second one has problem that it keeps on waiting at book 161. If ...
Score of 0
0
votes
0 answers
0
answers
27 views
27
views
Long living asyncio.TaskGroup in python for Redis PUB/SUB
I need to handle redis pub/sub and I have one listener task for all channels:
def start_listen_channels(self):
# create listener task
if self._listen_channels_task is None:
self....
Score of 0
0
votes
2 answers
2
answers
65 views
65
views
How to find the position of a path of coordinate points where the average difference between it and another path of a similar shape is the lowest?
I'm developing a follow-the-leader type game using a motion sensor, and I'm currently trying to match up the movement paths. The game is supposed to give score for how similar a movement done by the ...
Score of -7
-7
votes
0 answers
0
answers
102 views
102
views
Please help me with the design of an Agentic Chatbot System [closed]
so here is the situation:
- in my company i have assigned to build a chatbot/bot (will be internal, for ops and devs to identify and manage issues)
- what i have already build is, integrated it with ...
Score of 0
0
votes
0 answers
0
answers
53 views
53
views
How to perform an inner join in psycopg using a variable to join on [duplicate]
was working on joining two tables for a query based on a matching column and if one table's value in another column matches a variable server ID. I have two examples, and the former returns the error ...
Score of 0
0
votes
1 answer
1
answer
62 views
62
views
How to access QML managed QSlider from PySide?
I'm trying to handle events from Slider, but ApplicationWindow.children() reports it as QQuickItem and the Python object has no value property. What am I doing wrong?
import QtQuick 2.0
import ...
Score of 1
1
vote
0 answers
0
answers
55 views
55
views
Embedding models fail possibly on scientific characters no matter how the pdf is parsed
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, which is I think is possibly ...
Score of 0
0
votes
1 answer
1
answer
46 views
46
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
-3
votes
0 answers
0
answers
56 views
56
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
votes
0 answers
0
answers
39 views
39
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
-2
votes
0 answers
0
answers
33 views
33
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
-4
votes
1 answer
1
answer
149 views
149
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"...