Skip to main content

Question list filters

Filter by
Sorted by
Tagged with
Score of 1
1 answer
84 views

TL;DR: what am I doing wrong with the commented out 'sock.connect'? I can manage to connect via ssh with the code below (sock.connect and the ssh.connect sock=sock param being commented out) but ...
Score of -8
0 answers
142 views

I just made this peice of code that filters for bad words # Saves forbidden words forbidden_words = ("shit", "fuck", "ass", "bitch") query = input() query = ...
Score of -6
0 answers
77 views

I am implementing a simple RAG pipeline using Hugging Face Transformers. After retrieving the top-K documents using vector similarity search, I concatenate the retrieved chunks into a prompt and pass ...
Score of -5
0 answers
67 views

I am implementing a RAG system in Python and currently use a SentenceTransformer model to generate embeddings and FAISS to perform vector similarity search. My current implementation is essentially: ...
Score of -5
0 answers
71 views

I am currently learning how to implement Retrieval-Augmented Generation (RAG) systems, and I am trying to understand what a more practical/production-oriented RAG architecture looks like. I started ...
Score of -2
1 answer
123 views

I’ve always assumed df.notnull().sum() and df.notnull().count() would return the same value. Here is a snippet of a code for illustration: import pandas as pd data = { 'Name': ['Alice', 'Bob', None,...
Score of 2
1 answer
109 views

I have a uv project with a long list of constraints, meaning packages that aren't required, but if something does require it I need to use a specific version or range. uv allows constraints in a ...
Score of -4
3 answers
271 views

I work with Python in a Jupyter notebook environment. I want to divide a longer setup script in a shorter setup script and a module. Then I want to use the dictionary in the setups script and function ...
Score of -2
2 answers
232 views

Is there a hidden method or some other way that can be used to run some code when a class is defined before it is instantiated? At the moment the best I can come up with is the example below but it ...
Score of -4
0 answers
167 views

I want to send crypto private keys to the server but am afraid of how hackers can intercept this data. I was wondering if there is a benefit of using Flask with Jinja templates so that maybe it is ...
Score of -3
1 answer
149 views

So, I was trying to create a class called Word, wherein the user would enter commands to narrow down the list of words, via functions outside of Word, in order to obtain an unknown word. One of the ...
Score of -4
0 answers
142 views

In a web scrapping process with selenium Python, I am attempting to select a specific date from a “Date Picker” which includes year and month and day..(see the attached picture named “. But it dose ...
Score of -6
2 answers
224 views

I am using item variable to access index of a dataframe row with certain cell value but is seems item variable is string, my dataframe address column is a string too. I need to access index of certain ...
Score of -8
2 answers
247 views

I am trying solve this problem on CSES and am getting a Time Limit Exceeded verdict. May I know how I could make this program faster and more efficient? https://cses.fi/problemset/task/1083/ n=int(...
Score of 2
1 answer
179 views

I want make the while loop and Flask program run simultaneously: import serial import sqlite3 from flask import Flask from pynput.keyboard import Key, Listener import threading sql_conn = sqlite3....

15 30 50 per page
1
2 3 4 5
147001