Quantcast
Browsing all 13921 articles
Browse latest View live

How to (sub)query for data across two tables and an association table

I'm building a data dashboard for a project where players field a certain position within a game. Players can also field multiple positions in a single game. I want a query that will return:Each player...

View Article


Python - Google Colab - IndexError: index 2 is out of bounds for axis 0 with...

I am trying to solve the sparse matrix equationu_derivative_1 = A * u (A is the sparse matrix)But I'm getting the following error :- IndexError Traceback (most recent call...

View Article


Is there a better way to connect to the DB? This is an example of DAO [closed]

I would like to know if there is a better way to DB in every DAO, and if there is a possibility to create Parametric queries like in "Java" (setParameter)import mysql.connectorclass ClienteDAO: def...

View Article

Image may be NSFW.
Clik here to view.

Trying to fit data to a curve and getting "OptimizeWarning: Covariance of the...

I have some experimental data from a wind tunnel and I'm trying to fit a curve to this data and determine the x-intercept from it but cannot seem to get it to fit properly.Plot of my experimental...

View Article

ezdxf -- transform EPSG 3395 latitude longitude decimal degrees coordinates...

All entities in the tester DXF are either TEXT or LWPOLYLINE.My goal is to transform all LWPOLYLINE and TEXT entities in all layers in the DXF recursively from EPSG 3395 (latitude longitude in decimal...

View Article


pyautogui.pixel() doesn't update when looping

I'm trying to make a simple script to help me automate a task in a game, and the trigger I'm looking to use is when a specific pixel on screen becomes a specific color. I'm using pyautogui.pixwl(), but...

View Article

How to Create a Streamlit Dashboard with State Persistence in JSON?

I'm working on a Streamlit dashboard project where I need to save the state of the application, including various parameters and behaviours, in JSON format. The goal is to ensure that when users...

View Article

Pytorch Lightning Bert Multi Label Classification Error: on_train_epoch_end()...

I am trying to train a multilabel text classifier using BERT and pytorch lightning, following this tutorial1. However, I get the following error when I call trainer.fit(model, data_module)156 with...

View Article


How do I get the amount of bandwidth used during the execution of a Linux...

I need to understand how much bandwidth is used by a program which I execute from a shell on Linux, via subprocess.run in Python.Maybe a solution already exists, something similar to...

View Article


pip install git+http:// with a private git repository

I am running an apache2 server on my local NAS and have the git module enabled. There is little in the way of security, but I did put an .htaccess on the git repository directory. This requires a...

View Article

Is it efficient to loop forever on multiprocessing queue for communication...

I am creating a python program that will start subprocesses that will take long time working and during that time the main process should communicate with the subprocess to pause, stop, resume and get...

View Article

How can I automate data collection from a lux meter using a third-party...

I'm working on a project that involves gathering lux values from a lux meter, processing them using a Python script, and displaying the results. Currently, I'm using a third-party software that...

View Article

No module named 'packaging'

I am on windows 10 and everytime i try to run my code with customtkinter in vscode I get:ModuleNotFoundError: No module named 'packaging'I tried reinstalling Python, I watched some tutorials, but it...

View Article


What exactly returns canvas.coords()?

I've got some problems (again !) : according to this documentation should temporary = cv.create_text(a,b, text = "ip example", anchor = E)x,y = cv.coords(temporary)print(coords)return a tuple...

View Article

How can I redirect users to different pages based on session data in P?

enter image description here , enter image description here , enter image description here , enter image description here , enter image description hereexplain solution of python code humble request. i...

View Article


Accessing void pointer values after passing from python cffi to C

I'm using the cffi package in python to test some C code and running into some issues with passing data to C. For context I'm using ABI mode as I can't modify the C source code to work in API mode...

View Article

How to pass an input argument when creating an instance of a class?

My idea was to implement the following class:class name(object, name): def __init__(self, name): print nameThen the idea was to create two instances of that class:person1 = name("jean")person2 =...

View Article


remove the number from the y axis

I am trying to edit my axis's graphic, but It is not working when I use plt.yticks(\[\]). The program is showing me the values yet. Could you help me to edit, please? Maybe the problem is because I am...

View Article

OSError: [WinError 6] The handle is invalid. [Python]

Hey i am trying to make a application working in windows. It's basically adjusting your monitor brightness. There is a function provides minimize application. So i have issue about minimize.When...

View Article

How to install pip back into a windows PowerShell and Command Prompt list of...

Yesterday I accidentally deleted my pip command on windows 11 and I'm wondering how to reinstall it without having to reinstall python. I find it impossible to install some Python modules, frameworks...

View Article
Browsing all 13921 articles
Browse latest View live