Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
100 views

I’m on Ubuntu using a conda environment (ML(Python 3.12.9)), and I get a SSL certificate verification error when trying to load a dataset from OpenML with sklearn.datasets.fetch_openml. I already ...
Alireza Khalaji's user avatar
Advice
0 votes
7 replies
125 views

#!/usr/bin/python import sys,os,math,random,time, json # import everything badly GlobalVar = 0 globalList = [1,2,3,4,5,6,7,8,9,0] class myclass(object): def __init__(Self,Name="bob",age=...
Lee Hoyland's user avatar
0 votes
1 answer
56 views

I have tables which are already in Postgres and partitioned. How can I write a query with partioned birth_year stmt = select(UserOrm) session.execute(stmt)`
Long Nguyen's user avatar
2 votes
1 answer
80 views

I have a Python function that consumes a large amount of memory. When the function finishes, I want to release the memory and return the freed pages to the operating system by calling malloc_trim(0). ...
pixeldrift's user avatar
-1 votes
1 answer
59 views

I want to use this app. As it is mentioned in the README.md it needs the future module of python. I have debian sid and python3-future is removed from the repos of apt. When I install it via its setup....
Reza Hosseinzadeh's user avatar
Advice
1 vote
0 replies
43 views

Service details Scaling: Auto (Min: 0, Max: 1) Billing: Request-based the chrome browser was able to run during the idle time of the instance app = Flask(__name__) driver = None @app.route("/&...
Ibrahim Ali's user avatar
  • 2,561
2 votes
2 answers
75 views

Let's say I have 2 simple BaseSettings classes that, each, load values from their individual environment files. Let's also say that there is a combined settings class that is based on the first 2 ...
HanSooloo's user avatar
  • 805
2 votes
1 answer
76 views

I have a machine with up to 58 indipendent input variables and one response variable. If I create 2D-histogram plots of all combinations of 2 input variables and the response variable, I get plots ...
WolfiG's user avatar
  • 1,213
-2 votes
0 answers
55 views

Ever since I wrote this line of code there has been a todo list checkmark next to it and I have no idea why or how to get rid of it. I have tried clicking it, right clicking it, going to Source -> ...
Jenna Domek's user avatar
1 vote
0 answers
56 views

I seem to be always getting 120 for both height and width, I don't know why it refuses to give me the real value for the width so I can make the maintain the height in a 16:9 ratio # Monitor frame ...
epi's user avatar
  • 11
0 votes
0 answers
47 views

I've built a command-line app using the Python multiprocessing module, specifically a small suite of long-lived processes explicitly created via Process (with the spawn context, on Linux) ...
jbosch's user avatar
  • 991
Advice
1 vote
4 replies
69 views

With abstract subclasses on can use register to add other classes as a "virtual" subclass, what would be a way to do that for a single instance based on it fullfilling some criteria? The &...
Minimo's user avatar
  • 9
2 votes
1 answer
60 views

p = subprocess.Popen([ "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", f"--remote-debugging-port={SOME_PORT_NUM}", "--no-...
Philip Adler's user avatar
  • 2,228
0 votes
0 answers
36 views

Error appearing at pcd_las_o3d.points unable to assign extracted points to variable points points= np.vstack([las.x,las.y,las.z]).T colorsd= np.vstack([las.x,las.y,las.z]).T/65535 pcd_las_o3d.points = ...
Mukta 's user avatar
  • 11
1 vote
0 answers
55 views

I am trying to define endpoints in a Litestar application in which authentication is optional, but am failing to understand how this can be accomplished with the JWTAuth security backend. With an ...
isgotkowitz's user avatar
1 vote
0 answers
38 views

I am currently working on creating a time series of feature vectors from video input with consistent capture at 30 fps, ignoring the fps of the input video. I have decided to use PyAV to split the ...
rashad's user avatar
  • 11
3 votes
1 answer
97 views

I am processing a set of PDF files using Python. From each PDF I need to extract several monetary amounts and then write them to an Excel file. The problem is that in the PDF the decimals are written ...
Larisa Palimaru's user avatar
Best practices
0 votes
3 replies
63 views

I'm working with a large, existing Python codebase. Recently someone noticed that one of the files in the testsuite wasn't being type checked by mypy and so suggested to run python -m mypy . rather ...
Newbyte's user avatar
  • 3,957
0 votes
0 answers
27 views

Need to build a Python script for getting test_run_id, test_result_id, test_case_id, test_suite_id and test_plan_id from Azure DevOps. Only get NULL values for suite and plan. Any recommendations?
Pablo Pamies Pérez's user avatar
Best practices
1 vote
4 replies
124 views

I want to write a script which ends by calling my text editor (vim) on a specific file path. The file doesn't yet exist, and I want the editor window to already have some contents in it. In particular,...
Ted's user avatar
  • 1,092
1 vote
1 answer
40 views

parse.delete_lines('mls qos trust dscp') global in all objects doesn't work: 'CiscoConfParse' object has no attribute 'delete_lines'
user2473664's user avatar
1 vote
0 answers
51 views

Question: Why do I get the error I get, although to me it seems that the webdriver is in PATH? Problem description and context: I am trying to do some coding that requires using the webdriver manager ...
Decoder's user avatar
  • 45
Advice
0 votes
1 replies
34 views

Can I communicate PLC FX1N with Python. I have follow tutorial on youtube for FX3U using RS-485 and RS-422 but when i transmit data from Python to PLC , it's always fail, is it because this method ...
Noob student's user avatar
0 votes
1 answer
54 views

I am trying to pipe multiple Linux commands and abort if there is an error. With Popen the communicate() method waits for all commands to finish. This is why I am trying asyncio now. I have the ...
Manuel Schmidt's user avatar
2 votes
0 answers
46 views

Here is my code which is throwing me an error I am trying to open a Group Policy Editor and select setting under Personalization. I have obtained the sample code from this question GUI Automation of ...
Sandepku's user avatar
  • 889
-1 votes
1 answer
54 views

I am working with a DocuSign sandbox (developer) environment to integrate embedded signing and webhook functionality into a Django REST Framework application. Initially, I was able to send envelopes ...
K Vinay's user avatar
-3 votes
0 answers
70 views

I am making a To-do app and the priority,status,time left to finish and the name is saved in a CSV file.When the status is updated the the CSV file status should also be updated this is the code when ...
aadidev g's user avatar
Best practices
0 votes
3 replies
51 views

I'm building a Pydantic model where a field's requirement depends on the value of another field. Specifically, I want the cpf field to be required only if the country field is set to "BR". ...
Comic Hell's user avatar
1 vote
3 answers
73 views

Python Textual does not center the input fields. I centered the input fields, but they are displayed left justified. How do I center the input fields? from textual.app import App, ComposeResult from ...
Alex Cornford's user avatar
3 votes
1 answer
66 views

i'm currently learning Flask templates, but i can't undestand how to pass a variable to it. Example of my Python code: from flask import Flask app = Flask(__name__) @app.route('/') def home(): ...
Comic Hell's user avatar
1 vote
1 answer
86 views

I am very new in Spark (specifically, have just started with learning), and I have encountered a recursion error in a very simple code. Background: Spark Version 3.5.7 Java Version 11.0.29 (Eclipse ...
GINzzZ100's user avatar
5 votes
2 answers
106 views

Consider the following pandas Series with a DatatimeIndex of daily values (using day-of-year as an example): import pandas as pd dti = pd.date_range("2017-11-02", "2019-05-21", ...
Mike T's user avatar
  • 44.4k
Advice
0 votes
2 replies
114 views

On Window function - Wikipedia tapering functions are plotted using two different styles. One shows curve (samples) and the other Fourier transform (bins). I've prepared two tapering functions based ...
Juha P's user avatar
  • 337
1 vote
0 answers
71 views

I'm trying to create a short form in tkinter python but am new to the language. Whenever I click off of the text box the text underneath moves down vertically and the error message displayed has a ...
Stuff's user avatar
  • 8
1 vote
1 answer
51 views

I have a test that has code that executes a workflow which PyCharm marks as incorrect (pyright doesn't complain) result = await workflow_client.execute_workflow( SayHelloWorkflow.run, req, id=&...
Archimedes Trajano's user avatar
Best practices
0 votes
1 replies
55 views

I am looking for advice on how to best pass around the fit results from a (Python) script to another script. Currently, I am exporting the best-fit parameters and function names into a YAML file. I ...
Lost_Soul's user avatar
0 votes
0 answers
26 views

I am having problems with the Metashape Python API: I am drawing a polygon with Google Maps API and give these coordinates to Metashape. Metashape takes the polygon without problem, but the center in ...
Kevin K's user avatar
0 votes
0 answers
20 views

The tnmaccess api is not working for me. No matter what bounding box I use it always returns 0 results. Is it broken, or am I doing something wrong? import requests API = "https://tnmaccess....
Noah P's user avatar
  • 1
0 votes
0 answers
25 views

I am wondering if there is the possibility of using a stream for Marino notebooks in the ui.chat, something along the lines of: from ollama import chat model = 'llama3.2' def simple_stream(mess, ...
acortis's user avatar
  • 462
Advice
0 votes
2 replies
47 views

I have a project with tox configuration for testing, with different versions of Python and Django. With the move from tox 3 to tox 4, I included the configuration as a legacy ini in my pyproject.toml ,...
Shai Berger's user avatar
  • 3,113
0 votes
1 answer
46 views

import tkinter as tk from tkinter import ttk root = tk.Tk() def change(): img2 = tk.PhotoImage(file = "img2.png") label.configure(image = img2) img1 = tk.PhotoImage(file = "...
Ingrid Ledingham's user avatar
0 votes
3 answers
152 views

I'm playing around with an old project that uses Scons for its build system. Unfortunately that was written with Python 2, which I'm trying to avoid having to install. The script 2to3 has been removed ...
Eric's user avatar
  • 87
Advice
0 votes
4 replies
52 views

from PIL import Image img = Image.open('some/file.png') img = img.convert(mode='1') imgbytes = img.tobytes() with open('filepath', 'w') as file_out: file_out.write(imgbytes) I would like to write the ...
Cutter's user avatar
  • 1,862
-1 votes
0 answers
76 views

i get the data from the server with fetch API it contains html, when i click on load more posts button it should load the html at the bottom of the page we got from the server, but it also loads the ...
Samyar's user avatar
  • 25
0 votes
0 answers
87 views

I am using Python 3.8.10 and trying to import mariadb (pip install mariadb==1.0.11). I tried installing Ubuntu packages (Ubuntu 20.04.6 LTS), but it does seem to contain the following so.
marstensid's user avatar
0 votes
0 answers
77 views

I have a bit of code I am trying to build to take a specific tumblr page and then iteratively scan by post # sequentially and check to see if a page exists. If it does it will print that full URL to ...
Kyle Campbell's user avatar
2 votes
2 answers
127 views

I'm trying to solve this Project Euler task which is to find the point at which the proportion of primes in a list drops below a certain percentage (the diagonals in this spiral of numbers below). I ...
Dominic 's user avatar
Advice
0 votes
0 replies
44 views

when running a flask app just have to prepend ddtrace-run to python app.py Just by doing this datadog can collect informtion like api paths, latency, response status, etc. I searched online about it ...
Curious Learner's user avatar
0 votes
1 answer
58 views

I am receiving my ".wav" file in a django view as an "InMemoryUploadedFile" then converting it to bytes: views.py import functions.bytes_to_wav_wave if voice_value: ...
Mohammed Baashar's user avatar
0 votes
1 answer
68 views

test.bat: @echo off for /L %%i in (40, -1, 10) do ( echo working %%i test1 ping localhost -n 2 > nul ) echo Done! main.py: import subprocess startupinfo = subprocess.STARTUPINFO() startupinfo....
Rhys's user avatar
  • 5,408