Category "python-3.x"

Dynamically adding a row in data table Kivy/KivyMD

For example I have an empty data table (with only column data) and a button. I want to dynamically add row data when button is pressed. Is it even possible?

Python arrow get list of years between date range

I have this function: def function(start_date_arrow=None,end_date_arrow=None, date_concept=None): list=[getattr(date, date_concept) for date in arrow.Arrow.

Encountering divide by zero after a conditional preventing this

I am writing a simple piece of code for a physics assignment where we are supposed to model a water molecule as a collection of charged particles. I am supposed

How to apply a pandas geocode function to Pyspark column

Table is like this id ADDRESS 0 6101 SUMMITVIEW AVE STE 200 YAKIMA 1 527 CEDAR WAY SUITE 105 OAKMONT 2 1700 N ROSE AVE SUITE 460 OXNARD 3 1275 YORK AVE NEW YOR

discord one script run multiple times

Friends, I am making a discord script using python I have to run this script multiple times with different parameters, I am trying that with os, threading, mult

pytest can't find module for tests

I have a structure like (not exact names) - my_project - app - repo - __init__.py - my_repo.py - services - __init__.py

Trying to read __version__ with setuptools (setup.py) results in FileNotFoundError during build

EDIT: See answer below for explanation of my mistake, and the solution. I was trying to follow the instructions in @dnozay's answer on how to read __version__ i

'Access is denied' to Python 3.8 for PyCharm on Windows 10

Attempting to create a new project in PyCharm Community on Windows 10. Here are the settings for new project in PyCharm: I'm greeted with the error msg: Cannot

problems with """input().split() in loop""" in python

n, m, k, r = tuple([int(i) for i in input().split()]) roads = [] for road in range(m): t = tuple(list(map(int, input().split()))) roads.append(t) pri

FastText 0.9.2 - why is recall 'nan'?

I trained a supervised model in FastText using the Python interface and I'm getting weird results for precision and recall. First, I trained a model: model = fa

How to analyze/retrieve link details?

I'm trying to retrieve the URL details after I enter it. When I go to this URL https://entropystream.live/PLAIDARMY it is going to be reversed into this https:/

How keep tracking the external program opened in python?

I want open a program (ex: calculator) and keep tracking his process as the pid, name, etc. But, after calling the subprocess.Popen(), the process id is killed

Variable not being assigned and called correctly

I am trying to get a picture from my files to print after the user input a number for PokeID in the interactive manual. But when the number is entered it does n

`pyusb` fails to find `libusb` when using `pyinstaller`

Problem My application works well when in python-only and on my machine. I am attempting to deploy to a machine which has lesser privileges. The basic script t

Django model default value in response

I want to have a default value in my django model response value Sample model query myModel.objects.filter().values("username", "user_gender") I want to have a

How to get the values of dictionary python?

I have the below python dictionary stored as dictPython { "paging": {"count": 10, "start": 0, "links": []}, "elements": [ { "organiz

The contour detected using opencv to dxf

I used opencv to detect contours in Python. I wrote the code for saving this contour as a dxf file as below through a search. cap = EasyPySpin.VideoCapture(0)

Move files to a network folder

Could you tell me please, how to correctly specify the path to the network folder from the Linux operating system in the code? The network folder is accessible

How do I update value in a nested dictionary given a path

I have a nested dictionary nested_dictionary = { "a": { "1": 1, "2": 2, "3": 3 }, "b": { "4": 4, "5": 5, "6": {"x": 10, "xi": 11, "xii": 13}} } I a

Chrome Devtools Network Selenium python

I am making a code with Selenium in Python and collecting data on a website, and I have noticed that in Chrome's Devtools specifically in the "Network" section