2,205,431 questions
Advice
0
votes
2
replies
19
views
How to improve the SAS to python converter agent instructions
# OBJECTIVE
You are a specialized SAS-to-Python code conversion engine. Convert any SAS program the user provides into clean, correct, optimized, production-ready Python. Read and fully understand the ...
Advice
0
votes
3
replies
56
views
How to add redirect to Button's onclick function in Python Bottle HTML Web Server?
So, I have a simple web server written in Python using Bottle.py
# Useful functions
from bottle import *
import random
# define what features of a quote we care about
class Quote:
def __init__(...
Score of -4
0 answers
54 views
What file is actual mypy executable [closed]
Trying to install mypy in PyCharm. However mypy install doesn't appear to complete and shows error "mypy configuration is incomplete". I suspect this is because PyCharm cannot find the ...
Advice
1
vote
1
replies
80
views
how to refer to class methods in a class variable being a call table list
I am trying to set up a call table referring to class methods but I cannot find the appropriate languade solution.
# class instruction table for assembler
# class variable instrList contains ...
Score of 0
2 answers
56 views
No module named 'pkg_resources' error while i run ydata_profiling code in jupyter notebook
I want to perform ydata_profiling on a dataset, but whenever i run the code of ydata_profiling then it shows me this error:
---------------------------------------------------------------------------
...
Score of -3
2 answers
110 views
Python Tkinter button for loop address each one
I have a for loop that creates buttons but I cannot access each one individually. What I tried was using a list but one cannot assign an Object to a String Object that's the error I got. Another try ...
Advice
1
vote
4
replies
89
views
How to transition from learning fundamentals to professional development in Python?
I have built a solid foundation in Python fundamentals and intermediate concepts. However, I am facing a common hurdle: transitioning from theoretical knowledge to real-world application.
I observe ...
Score of 3
2 answers
137 views
How do I solve this type hint error in PyCharm?
I am getting this type hint error in PyCharm (Python 3.14):
Unexpected type(s):
(str | None)
Possible type(s):
(LiteralString)
(str)
but can't see what is wrong with my code.
filename: str | None = ...
Best practices
0
votes
1
replies
64
views
Ortho photo generation and Ortho mosaic
Title: How can I implement orthophoto generation and orthomosaic creation in a GIS web application?
I'm developing a GIS web application and would like to add an Orthophoto / Orthomosaic generation ...
Best practices
4
votes
4
replies
184
views
How can I create my own programming language in Python HTML, CSS and JavaScript
I would like to create my own programming language for educational and novelty purposes. I am comfortable with Python 3xx, HTML 5, CSS and half of JavaScript. I had a go in python but I was basically ...
Best practices
0
votes
9
replies
123
views
Where does python handle modular calculations differently?
On paper, I can reduce 977 down to 30 but the below code gets wrong values.
random
import sys
n=63799
pt = n//2
db=[]
d= 977
We are expecting:
977
488
244
122
61
30
db.append(d)
for i in range(5):
...
Score of 1
0 answers
62 views
Stock Market RL Model Trouble
I am currently working on a bot that uses reinforcement learning to trade stocks, There are 2 types of models, one for the individual companies, like tsla or msft, and that model is trained only on ...
Score of -6
0 answers
74 views
How can I detect and handle CAPTCHA pages during Python web scraping? [closed]
I'm developing a Python web scraper using Camoufox, Playwright, cloudscraper, requests, and BeautifulSoup. The target website occasionally serves a CAPTCHA page instead of the expected HTML, even when ...
Score of 0
0 answers
60 views
Erroneous highlighting in VS Code using __subclasshook__
I have a MySized protocol and a mylen function expecting a MySized argument:
# coding: utf-8
from abc import ABC, abstractmethod
class MySized(ABC):
__slots__ = ()
@abstractmethod
def ...
Advice
3
votes
11
replies
218
views
How do you learn coding today?
If you don't have a fair amount of experience in the world of coding, do you think copy and pasting codes back and forth from Claude should be avoided? Take my case for example, I have a couple of ...