Skip to main content
Filter by
Sorted by
Tagged with
Best practices
0 votes
2 replies
33 views

With ChainedAssignmentErrors being enforced in Pandas 3.0 I was wondering what the best way to modify values in a slice of a column where the slicing is done with .iloc[] is. For example this causes a ...
cknott's user avatar
  • 33
Advice
0 votes
0 replies
35 views

I am looking to find a book on PyTorch that is suitable for beginners, Ive used sklearn in the past for ML its a simple workflow for me prepare the X and Y data, fit/train a model, and make ...
Kev's user avatar
  • 1
-1 votes
2 answers
101 views

I'm using flask to run a website, working across my personal imac (running macos 26) at home, and a windows PC (running win11) at college to code, storing all the code in github. I run app.py from the ...
PassionateFruit678's user avatar
Advice
0 votes
4 replies
92 views

I'm new. I started learning with YouTube, then with W3Schools, and lately I've been doing Exercism exercises. I also started uploading what I learn on GitHub, everything I learn. I'd like to know any ...
Carolina's user avatar
Advice
0 votes
3 replies
38 views

I'm building a Dash dashboard that loads data from a remote database (Redshift) on startup. The loading takes ~2 minutes. When I use use_reloader=True, every time I save any .py file in the project (...
Francisco Augusto Varela Aguir's user avatar
-2 votes
0 answers
35 views

I have all the accounts set up, and I am trying to debug my code as I keep encountering errors when I try to use the scraper. scrape.py The problem is I run the the program, but the original code is ...
KLJOM's user avatar
  • 1
Advice
0 votes
1 replies
54 views

I'm trying to create a simple code editor for an old custom programming language used by a single Company's product, as part of an effort to make some custom tools to avoid using the Company's ...
InfiniteNopes's user avatar
Best practices
0 votes
1 replies
36 views

Building a python pipeline ingesting ~50k WebSocket messages/sec. Each message needs to hit PostgreSQL and a live frontend. Two options: Option A — write both in the handler at the same time WS ...
cactus's user avatar
  • 91
0 votes
0 answers
42 views

I am using Matplotlib in Spyder and I am trying to change the figure size with figsize, but it does not seem to make any visible difference no matter what values I use. For example, even if I change: ...
Hamza Hussian's user avatar
-1 votes
0 answers
77 views

I need to enable debugging in VS Code to debug a Python file but, due to the specific nature of my .py file, I need to do this not from the project directory, but from a directory one level above my ...
Lerck's user avatar
  • 23
3 votes
1 answer
75 views

I'm using celery with django to run some task that runs multiple threads querying the database. The example below is a simplified version of the original one in a larger project, but the logic and ...
user31749517's user avatar
0 votes
1 answer
39 views

I'm processing a large pandas DataFrame (500k rows) where each row requires an HTTP request. I switched from requests to aiohttp + asyncio expecting a significant speedup, but the async version runs ...
Джон Сноу's user avatar
Advice
0 votes
9 replies
98 views

I wanted to start learn how to code from scratch without using the help from AI. What should I know about coding, like which programming language I should start with, how to test the code if it works ...
Programming Language Learning's user avatar
0 votes
1 answer
118 views

Mathutils is a Python library maintained by ideasman42. I have been using it on older versions of Python and want to update an old project to a more recent version of Python. When I try to install ...
Jules's user avatar
  • 731
-2 votes
0 answers
62 views

I am building a Google Keep-style notes app in Python using tkinter. Notes appear on screen while the app is running, but when I close and reopen it they are gone. The JSON file is either not being ...
keanisidore deguzman's user avatar
0 votes
1 answer
70 views

I am a novice Programmer learning GUI and Tkinter for the first time, attempting to make a productivity app for myself. I am trying not to use AI as much as possible. I have created a Frame within the ...
green_bloodshed's user avatar
0 votes
0 answers
47 views

I am using the Jupyter notebook to run the Facebook Prophet model using Python code. Below are the steps I followed: 1. Import Libraries import pandas as pd import numpy as np import matplotlib....
Hassan Osseiran's user avatar
-1 votes
1 answer
63 views

I am trying to render markdown by using .markdown method for the following markdown: **Stellar Bank** requested a finance vertical campaign focused on **in‑view rate** with a budget of **$80,000**. We ...
Volatil3's user avatar
  • 15.1k
Advice
0 votes
4 replies
61 views

I am trying to write my first project using python which is a recipe administrator, which contains a programm that fetches url given a keyword, and fetches them back and add them dynamically to a ...
Ruixuan G's user avatar
-1 votes
1 answer
79 views

I was trying to connect Google Colab to my VS Code and I successfully did that but when connected to Colab kernel, I can't read files that are in my local machine. But in local Python environment the ...
Mahir Tanzim's user avatar
Best practices
0 votes
1 replies
72 views

I'm fairly new to programming and just finished my first backend project. I'm using FastAPI with PostgreSQL and JWT authentication. I know the functionality is basic, but I'd really appreciate ...
Petr_dr's user avatar
Advice
1 vote
3 replies
82 views

I want to create two Gems (custom LLMs in Gemini that respond based on specific instructions) for two different tasks. Please suggest the most suitable prompts, based on your experience in both ...
Harsh Deshpande's user avatar
Advice
0 votes
3 replies
90 views

I want to create two Gems (custom LLMs in Gemini that respond based on specific instructions) for two different tasks. Please suggest the most suitable prompts, based on your experience in both ...
Harsh Deshpande's user avatar
2 votes
1 answer
114 views

I am unable to use opencv cap.read() on .avi files since it crashes there. There seems to be some problem with fourcc since it returns 0.0 and cap.IsOpened returns true. The fps, width, height are ...
RajaKrishnappa's user avatar
Best practices
0 votes
4 replies
158 views

After working on several Rust projects with AI assistance, I want to share a division of responsibility that has worked well in practice, and ask whether others have found the same — or a better ...
杨尚山's user avatar
2 votes
0 answers
81 views

How do I persuade SymPy to evaluate an infinite sum which converges and I know SymPy should be able to do? For example, the following just gives back the unevaluated infinite sum: a = Symbol('a',real=...
David B's user avatar
  • 21
-4 votes
2 answers
105 views

Basically the dictionary I am using has a bunch of floats as the values to each key, I have everything down just my issue is that my variable is only saving the most recent value I pulled. I am sure ...
Freaku's user avatar
  • 1
-3 votes
2 answers
87 views

I'm trying to learn basic programing in khan academy. But I get this unexpected result when I run the program: Do you have a pet (yes/no)? yes Does your pet food contain meat (yes/no)?yes How many ...
nathan's user avatar
  • 1
-1 votes
0 answers
75 views

I use Python. I've tried to import matplotlib and numpy into my Jupyter notebook, but I have received this error message. How can I rectify this issue, preferably the exact lines of code I should type?...
pranav_b27's user avatar
0 votes
2 answers
72 views

I need to convert the query output into dictionary, currently the output type is tuple. There is 3 Table output, how to convert into a single Dictionary output with the Column name respectively. I ...
Prem's user avatar
  • 37
Advice
0 votes
2 replies
100 views

I'm looking for a sample of an IEC 61131 PLC source program that explicitly contains routines in a 'foreign' textual language. 'Foreign' here means a language whose definition is not part of 61131. ...
Kirk Hansen's user avatar
Advice
3 votes
17 replies
189 views

I've started work on my first text based game and would like advice on how to streamline it. I'm programming it entirely in python 3.12. This is only my second personal project and I've never done ...
No Sleep's user avatar
1 vote
2 answers
47 views

I am creating a an mdf file from a pandas dataframe with time series data. I have string channels that I am not sure how to add, I get an error using the code below. data = { "GLOBAL_TIME&...
jB777's user avatar
  • 127
-3 votes
0 answers
67 views

I'm trying out the spot text pipeline from mapreader. I have an Anaconda environment and use a Jupyter notebook (ipykernel, mr_py does not recognize the installed packages) to go through the steps. I ...
Soof's user avatar
  • 1
-3 votes
0 answers
65 views

When I'm trying to run playbook it seems like the Python version in use is one the latest one (>3.11). I have set interpreter_python = /usr/bin/python3.9 in ansible.cfg. Is there another priority ...
Tamiz Vure's user avatar
-1 votes
0 answers
47 views

The right way to change Jedi status in a Jupyter notebook seems to be %config Completer.use_jedi=False However the right way to check whether Jedi is enabled seems to be %config IPCompleter.use_jedi ...
robertspierre's user avatar
-2 votes
0 answers
40 views

Code from hypothesis import given, strategies as st @given(st.integers()) def test_integers(n): print(f"called with {n}") assert isinstance(n, int) test_integers() Exception Stack ...
Hangman83032's user avatar
0 votes
0 answers
56 views

I have been working to integrate a PyQt5 GUI with a third-party software from HighFinesse (makes wavemeters). I am using the minimal Python library here on Python 3.9 on a Windows 11 computer. In ...
Shaha Bhugra's user avatar
3 votes
2 answers
74 views

I have a sensor time series with these properties: ~250,000 data points at high sampling rate over ~12 hours ~11 continuous segments separated by 30-40 minute gaps (sensor goes offline periodically) ...
requiemman's user avatar
Advice
1 vote
4 replies
80 views

I want to train my own AI model that can extract text from PDF files, specifically supporting both Arabic and French languages. Does anyone have suggestions on how I can start this project or which ...
Marwa's user avatar
  • 1
-4 votes
0 answers
81 views

import speech_recognition as sr import webbrowser import pyttsx3 import musicLabrary recognizer = sr.Recognizer() engine = pyttsx3.init('sapi5') def speak(text): engine.say(text) engine....
Vaibhav Singh's user avatar
Advice
0 votes
4 replies
67 views

Goal: I want to become a highly skilled AI Agentic Engineer and build real-world, impactful systems. Current Situation: I am actively learning and building projects I am consistent and genuinely ...
Amar Gurung's user avatar
-1 votes
1 answer
41 views

I'm working on a script to create an MR (merge-request) from the command-line. I already came across this issue, which led me to these docs. I'm running this in python via subprocess, scince this is ...
py_coffee's user avatar
  • 103
Tooling
0 votes
8 replies
64 views

I'm working with complex nested JSON responses from an API and want to convert them into strongly-typed Python dataclasses for better code completion and type safety. Currently, I'm manually creating ...
preethi divi's user avatar
1 vote
2 answers
72 views

I have the following plot, using a symmetric log scale: from matplotlib import pyplot as plt from matplotlib import ticker (_, ax) = plt.subplots() ax.plot([-100, -1, -0.5, 0, 0.5, 1, 100], marker='o')...
Ilya's user avatar
  • 657
-1 votes
1 answer
73 views

I am trying to make a splash screen with 2 buttons that either Load an old project or Start a new one. I am having trouble adding command functions to the "New" and "Load" buttons ...
JohnnyLaw's user avatar
0 votes
0 answers
35 views

I'm exporting a 3D model to GLB format using pythonOCC. During export, I store custom metadata on each face using TDataStd_NamedData: ... user_data = TDataStd_NamedData.Set(some_shape_label) user_data....
Sankalp Dhupar's user avatar
2 votes
3 answers
125 views

I'm working on a Python program that calculates images by some function frame by frame to create a video. Sometimes images need to be rotated (without cropping them). First, I rotated images as ...
rare's user avatar
  • 39
Advice
0 votes
0 replies
53 views

I have a list of sets which I need to group into pairwise disjoint families. I know this is a set packing problem akin to the maximum independent set and thus NP-hard. One way to solve it is to ...
Stop US and Israel's user avatar
Best practices
0 votes
2 replies
48 views

I have an on-prem OCR pipeline that returns extracted text inside a JSON blob. I parse the LLM response and call a local normalizer before returning the text to callers. Example call site: result = ...
agaonsindhe's user avatar

1
2 3 4 5
44142