2,207,341 questions
Advice
0
votes
0
replies
10
views
How does Cherry Studio upload a pdf file?
The project: https://github.com/CherryHQ/cherry-studio
The unofficial api provider doesn't support pdf file uploading,
but in the application, it can upload pdf files, and works quite well, especially ...
Advice
0
votes
1
replies
22
views
How to accurately model the Total Solar Energy Rejection (TSER) of Sputtered Window Film (NTECH) in a Python heat transfer simulation?
I am developing a Python thermal simulation for a vehicle cabin and I'm struggling with the radiation balance equation when applying a specific window film layer.
I am using the technical ...
0
votes
1
answer
58
views
How big can an integer be? [duplicate]
I understand that some programming languages (like Java or C) have fixed‑size integers such as 32‑bit or 64‑bit.
My question is:
How big can a Python integer actually get?
Is there a maximum value, or ...
0
votes
0
answers
17
views
Run Scalene on multi-processing script
I want to profile a Python script that uses multiprocessing.
How can I do this with Scalene?
Is it enough to run:
scalene run script.py
Advice
1
vote
5
replies
60
views
Using Python on my Mac, how do I combine jpg images in a folder, then subsequently split them into separate jpg image files again?
I have a folder containing hundreds of jpg images. I wish to combine them into a single large image (for some processing work), and then subsequently split them out into separate jpg image files with ...
0
votes
0
answers
42
views
There is something wrong with my werkzeug.security log_in(user) implementation. That returns error 404 page not for the redirect after I log in
When I try to log in my user after identifying it and using the check_password_hash() of werkzeug security. I get 404 my redirection link invalid, or after adding the try and except clause, gets ...
3
votes
0
answers
46
views
How do I get a list of all instance attributes of a Python object? [duplicate]
Given some object o in Python, how do I get a list of all instance (not class) attributes which that object has?
For most objects, this is simple: just check o.__dict__, either directly or via vars(). ...
0
votes
0
answers
43
views
Integrating a complicated package layout into PyDev
I'm working on a project that has a somewhat complicated package layout. Specifically, there's a setup.py file at the top level of the project's directory tree that's as follows:
from setuptools ...
Tooling
0
votes
3
replies
44
views
Email Parser with signature extraction in Python
I am trying to create an email Parser which can split the email thread in .msg format into messages and can extract signatures from those messages and emails from the From: section.
I am able to split,...
Advice
0
votes
4
replies
102
views
Continue running python script in background
What's the best way to have a python script continue running in the background? I'm familiar with nohup and &; I'm more interested in something similar to C's fork(), allowing the application ...
0
votes
0
answers
22
views
Kivy ScrollView and ScreenManager: how to process the overscroll value and trigger an event in the main screen
First, progamming is a hobby for me, not a profession. The sample code below creates some artificial data in a dictionary that I want to access key by key when the ScrollView container is overscrolled....
3
votes
1
answer
55
views
langchain- Putting a 'base64' image in chatPromptTemplate(
I'm using langchain==0.3.24.
I converted an image to base 64 and now I want to put it in a chatPromptTemplate:
...
image_data = ... #converting image to base64 and store it in the variable
...
Advice
0
votes
6
replies
83
views
Unable to understand certain logic in the solution
I was practicing this DSA question and my university provided a solution too, unfortunately I am unable to understand why we are taking the range(M-N+1) instead of just range(P+1).
This the Question:
...
0
votes
0
answers
14
views
How to do composite unique constraints using SQLAlchemy and Alembic? [duplicate]
I'm trying to figure out how to add a composite unique to a table where the combination should be unique, but the individual fields can be the same
How my migration looks: (uses batch ops because the ...
Advice
0
votes
1
replies
25
views
.venv not activating on vsc linux
mansur@mansur:~/Documents/CS$ source /home/mansur/Documents/CS/.venv/bin/activate
bash: /home/mansur/Documents/CS/.venv/bin/activate: No such file or directory
I switched to linux like 1 month ago ...