I've built a function that tries to extract some information from a string. Before: function (string) Now, I want to refactor that function by receiving two ext
This code snippet works: py -c "import numpy; print(numpy.array([[1,2,3],[4,5,6]]).sum(axis=0) % 2)" [1 1 1] But mypy gives an error: py -m mypy -c "import num
I have some questions about labels of axs. Firstly,I have 2 subplots which can be seen below. As you can see, labels of first ax are overlapping with the second
I have a keyboard and a USB bar scanner and two separate monitors at different locations all connected to the same computer. I want the keyboard to enter data o
I am trying to optimize an objective function using scipy. I simplified what I would like to do to focus on the problem more. There is an array called operating
For example in the code below: >>> from PyQt5.QtWidgets import * >>> import sys >>> app = QApplication(sys.argv) >>> widget
Now I have a numpy array: In [1]: import numpy as np In [2]: a = np.ones(10) * (1 << 64) In [3]: a Out[3]: array([1.8446744073709552e+19, 1.84467440737
I'm trying to make a password system with kivy, and tried coding how many tries the users have until the code does somthing but every time i input a text it goe
I am trying to debug my Python Pytest tests in VS Code, using the Testing Activity on the left bar. I am able to run my tests as expected, with some passing and
I am getting an error of urllib.error.HTTPError: HTTP Error 404: Not Found. I feel like f-string should work for the url but it is not how would I fix this? imp
I have installed Python 3.10 and installed the pywin32 package. I tried to open an application using Python, however I am facing an error: "invalid class string
I am looking for a solution to compare filenames inside sqlite database with filenames in a windows directory (app.config['UPLOAD_FOLDER']). I have a sqlite da
If i have a dataset: import numpy as np import matplotlib.pyplot as plt y = np.array([np.random.randn(10) for k in range(100)]) plt.plot(y) And a correspondin
From the documentation and tutorials for pycaret, I expect the classification.compare_models() function to return a grid such as... Model Accuracy AUC Recall
my manager asked me to create script to download images for our client. These are images for goods on a market place. Every image exist on a separate page about
Python automatically changes a variable from list to str inside a for loop so I got an error when I append to the list. Why does this happen?
Given below is a program to make and solve ( by the user ) a sudoku puzzle . import random from tabulate import tabulate base = 3 side = base**2 level = 1 de
Im trying to make a simple helper overlay that display info over a window but doesn't interfere with interactions on said window(click through overlay). I prefe
I'm trying to make a quick OCR for specific use, I know should've just write a preprocessor for normal OCR and that would been faster but this idea came up to m
For example when i give 5 to the code, i want to turn on the led in our rpi pico (rpi pico connected to pc with cable) #This code will run in my computer (test.