2,207,686 questions
-3
votes
0
answers
13
views
I need to disperse data per day [closed]
I have 80 millions of rows per week and I need to disperse per day. Which tool is the most recommended? SQL Server is not good, it takes a long time to calculate and insert data. I thought about using ...
0
votes
0
answers
11
views
Python modules from .pth files overwrites editable install
I have a „central“ Python 3.12 venv that is shared by several users.
I wanted to set up a local clone of this environment for developing. To be clever about it, I only set up an empty environment and ...
2
votes
1
answer
30
views
Display problem using UnevaluatedExpr in Sympy with python
When I add another expression to Unevaluated(), then try to print it, the unevaluated output is surrounded by ().
The problem comes when the first coefficient in the resulting expression to be ...
2
votes
1
answer
43
views
How I can display a menu with spellcheck suggestions?
I am making a self spellckeck tkEntry:
import tkinter as tk
import language_tool_python
from lib.widgets.text.pastable_entry import PasteableEntry
class SpellCheckEntry(PasteableEntry):
def ...
1
vote
1
answer
34
views
python argparse bug? 'nargs' and 'action' crashes with unexpected keyword 'nargs'
Sanity check, please.
This code:
import argparse
def parse_cmd_line():
parser = argparse.ArgumentParser( )
parser.add_argument('-c', '--create', nargs='*', action="store_true")
...
Best practices
0
votes
7
replies
55
views
global variables between modules/files and functions
I understand that best practice for global variables between modules is as mentionned doc python, but I don't understand how to make those variables modifyable from within a function.
Here I declare ...
Best practices
3
votes
5
replies
60
views
Optimizing a Gaussian penalty function for HSL color compatibility in PyTorch/NumPy
I am currently developing an AI-driven fashion recommendation system, specifically focusing on a "Multi-modal Context-Aware Decision Model." A critical component of my recommendation engine ...
0
votes
1
answer
44
views
How to pre-read I2c message length/header - Python
I have a tool to interface with an I2C slave that I have implemented with Python. Currently, I am force reading an arbitrary number of bytes to read per I2C message. I need to be able to read up to ...
Advice
0
votes
0
replies
40
views
How to improve FPS when using MediaPipe hand tracking with OpenCV in Python?
I am building a simple AI hand tracking application using MediaPipe and OpenCV in Python.
The program reads frames from a webcam, processes them with MediaPipe Hands, and draws the hand landmarks on ...
2
votes
1
answer
65
views
Request text rotation in Google Sheets API [duplicate]
I want to replicate a sheet from Google Sheets to a Markdown type. I'm using the API to request it:
from google.oauth2.service_account import Credentials
from googleapiclient.discovery import build
...
1
vote
1
answer
58
views
Input 'y' of 'Sub' Op has type float16 that does not match type float32 of argument 'x' when using mixed precision with custom loss
I am experimenting with mixed precision training in TensorFlow to speed up training on a GPU. I enabled the global mixed precision policy and implemented a custom loss function. However, when training ...
0
votes
0
answers
85
views
Warning: You are sending unauthenticated requests to the HF Hub cannot be suppressed even after setting environment variables
Problem:
I am using sentence-transformers with the BAAI/bge-small-en-v1.5 model in Python. Even after setting all the recommended environment variables and logging suppressors before the import, I ...
Advice
0
votes
1
replies
221
views
Do you support The Imagine project?
The Imagine project is looking for partners to promote The Second World Digital Strike on Feb 24 2027
We need 51% of humanity to join 2nd strike then wars stop
We need 51% of humanity to join 2nd ...
Best practices
0
votes
3
replies
53
views
mtgjson.com usage recommendations
https://mtgjson.com/
I am currently building program for MTG, Magic the Gathering that is used for Cube Building. I have been using API calls to Scryfall ( scryfall.com ). This has been working so far ...
-4
votes
0
answers
58
views
Connection supplier method to use in other methods
I'm writing a telegram bot, that fetches data from database and sends it as an image to chat. I have several methods, that need to open connection to database, fetch data/execute procedure and then ...