Category "python"

Why is my pydantic model not displaying any values after setting it?

from pydantic import BaseModel class Test(BaseModel): val1 = str val2 = str test = { "val1": "1010101", "val2": "1010101", } test_value= Test(

After wait_variable(), text won't change

I am doing a quiz game and after I want to pass a page and load new question and options and the options won't change. I am using the wait_variable() method and

Why does my tkinter messagebox not show up in my pygame window?

I coded a snake game and whenever you hit your own body, a message box should show up asking u to play again. However, when I do hit the body, my python pygame

Name error with Tkinter get() widget and global variables

enter image description hereWhat I want to do is get user to input 4 values to entry widgets and after and using those input values or function returns in anoth

df.iloc causes error when used to perform second calculation

I am opening a .csv file and pulling it into a pandas dataframe (in this case there are 87 rows, 0-86). I want to perform separate calculations with the content

Change labels on facet plots

I currently have a plot with 6 facets labeled 1 to 6 in pandas, i wish to change these labels to road type if possible (Motorway, A Road, B Road etc) the code i

Unable to call subprocess with command that works from cli [duplicate]

The following command works fine from the CLI: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r /path/coverage.xml When I pas

Django related_name import Objects instead of foreign_keys

When I importing my CSV file in db.sqlite3, I don't know how to import foreign_key instead of "Object". This is what I've tried. # import_csv.py (manage.my cust

Tkinter FileMenu....not working (no error code)

I am using the following code but cant seem to get a help-menu in the actual window. Can you see anything in terms of menu when you run the code ? I have tried

Find address using latitude/ longitude attribute (Python & geopy)

I have been trying to resolve a particular problem - extract location/address out of the predefined list. The list represents e-mail message where address will

Efficiently isolating the coefficients and exponents of an array of polynomials (Python)

In Python, I do some SymPy calculations that yield an array full of polynomials in the variables a, b, c, d, e and f such as: array([b*d*e*f, 0, 0, d**3*e, b*d*

Python How to make function run simultaneously using asyncio

I am currently new to Python and wanted to create a system that takes 10 customers that come in at an interval of 1 - 25 seconds. They are sent to a queue, and

Textual (python) - how to add click event in simple Text object?

I'm trying to get it so I can add links in text rendered by Textual. My text may have multiple links, for example: Hello [@click=hello]World[/] there, how are y

How to Use IF and ELSE in Robot Framework

Create user //Is my test case name ${random_string}= Generate Random String 8 [LOWER] Set Global Variable ${random_string} ${b

How to store attachment file in an email in a database?

I used this code to store attachment xlsx files from a specific address email in Outlook, but now I would like to store these files in a database in SQL Server,

Resolve dependency mismatch of 2 Python libraries

I'm using target-postgres and tap-surveymonkey. I can install tap-surveymonkey directly when I create a Docker container and it works. However, when I want to i

Cosine similarity and SVC using scikit-learn

I am trying to utilize the cosine similarity kernel to text classification with SVM with a raw dataset of 1000 words: # Libraries import numpy as np from sklear

How to get band names in geotiff stack?

From an stack of geotiff (time-series of NDVI) in a file like 'NDVI_TS.tif' I want to get individual band names. For example: 'Band 086: 20190803T004719'. I can

Python - List all the files and blob inside an Azure Storage Container

This is my first post here on StackOverflow, hope it respects the guideline of this community. I'm trying to accomplish a simple task in Python because even tho

Plotly Dash ImportError: cannot import name 'dcc' from 'dash'

I'm just trying to get the Dash tutorial up and running but every time I try to run it, copy and pasted from the documentation into my asdf.py I get the error "