Quantcast
Browsing all 14097 articles
Browse latest View live

GUI isn't showing up after running python code

I'm building an Image to PDF converter app using python. When I run the code in the terminal the UI doesn't appear. Here is the code:`import tkinter as tk from tkinter import filedialog, messagebox...

View Article


Accessing a generator created Using AsyncIO

I am trying to follow this [tutorial][1], but use asyncio instead. I am stuck on the one part in the main function where I put the tasks in the list and then gather them in the results variable. I...

View Article


Why is QtCore.Signal in pyside6 called at different memory addresses in...

this is my code.from PySide6 import QtCoreclass MyClass(QtCore.QObject): my_signal = QtCore.Signal(int) def __init__(self): super().__init__()class Myclass2(): def __init__(self): self.c1 = MyClass()...

View Article

Image may be NSFW.
Clik here to view.

Is there any way to disable Alert Boxes on Visual Studio Comunity Edition 2022

Visual Studio doesn't support Python 3.12 yet, but to let you know this, VS shows an alert box like this:I was wondering if there is any way to disable this pop up?

View Article

Getting error 13: permission denied while trying to save my jupyter notebook

I installed jupyter notebook via conda on my ubuntu. Now, whenever I try to save my Jupiter notebook it gives me error 13: permission denied.Saving file at...

View Article


Selenium unable to send keys to a combobox element

I have been trying to create an automated way of adding stocks to google finance, using selenium. I am able to login and get to the adding of the new investment, but that's where I get stuck.Steps to...

View Article

Issues while using related names

This is the Course and LearnerCourse model:class Course(BaseModel, Timestamps, SoftDelete): name = models.TextField(_("Course Name"), max_length=100, blank=True, null=True, unique=False) description =...

View Article

ModuleNotFoundError for all my python pip imports on Terminal only

All my pip installed modules work fine using vscode, e.g. numpy, opencv-python, requests but when I run a program using terminal with windows powershell, I get ModuleNotFoundError for all my...

View Article


Is there a way to read the values property of a PySimpleGUI combobox?

I have created a PySimpleGUI combo box with code which simplifies down to:combo_list = ['Choice 1', 'Choice 2'] layout = [[sg.Combo(combo_list, default_value=combo_list[0], key='-COMBO-',...

View Article


Unable to send CAN signal through vector canoe application using py_canoe

Here, we are trying to send a CAN signal through vector canoe application using py_canoe library, but we are unable to send the CAN signal through the bus but at the same time we are able to read the...

View Article

Gaussian Addition - Python Challenge

I am currently working on some beginner python challenges, I just finished a gaussian addition challenge. I was able to get the output that the challenge was looking for, but it seems like I over...

View Article

Python-Programming Language

Optimizing Python code for speed: Profiling techniques to identify bottlenecks and applying optimization techniques like vectorization or just-in-time compilation?Provide a performance benchmark and...

View Article

SHAP KernelExplainer using PipeLine

I have a problem where I want to use pipeline (with OHE as preprocess and simple Linear Regression as model) with SHAP tools.As for the data, here are my data (I'm using my modified version of bike...

View Article


How to obfuscate Python code for a Dask web app

I have a simple Dash application as show in image1. I wanted to obfuscate the project files before deployment to client machine. I am using Pyarmor v 8.4.6. The issue i face is when i run the entry...

View Article

cache or reuse cartopy features

I'm using Cartopy to display the GSHHSFeature coastlines in multiple Matplotlib subplots and overlay different data on them.import matplotlib.pyplot as pltimport cartopy.crs as ccrsimport...

View Article


Getting error when trying to load data using keras.utils.get_file()

I am getting an error when trying to load a dataset using TensorFlow Keras. Here is the code:dataset_url = "https://storage.googleapis.com/sample_org/sample_file.zip"data_dir =...

View Article

I'm trying to run a Python code that sends a file to a Telegram bot [closed]

:11: RuntimeWarning: coroutine 'Bot.send_document' was never awaitedRuntimeWarning: Enable tracemalloc to get the object allocation traceback[Program finished]"python"from telegram import Botbot_token...

View Article


why my pandas groupby ffill will(may?) fill between different groupbys?

df = df.query('Time >= @start_time and Time < @end_time')df.loc[:, 'date'] = pd.to_datetime(df['date'])df['ret'] = (df.groupby(['date', 'sym'])['Close'] .ffill() .pct_change())when I used this to...

View Article

django.server logs are not shown in CloudWatch - Using Zappa

My django application is running on AWS Lambda with zappa. I recently added the following to configure logs.LOGGING = {"version": 1,"disable_existing_loggers": False,"filters": {"require_debug_false":...

View Article

how to run the .sql file in sqlalchemy in python

I created a postgres function and saved in a file called get_data.sql create or replace function getalldata(entryDate TIMESTAMP, exitDate TIMESTAMP) RETURNS SETOF employee AS $$ BEGIN begin -- try...

View Article
Browsing all 14097 articles
Browse latest View live