Category "python-3.x"

Find a pattern in middle of multiple sentences

I have a dataframe as below, data = [ [ 1, 'AR-123456' ], [ 1, '123456' ], [ 2, '345678' ], [ 3,'Application-12345678901'], [ 3, '1234567890

how to code a right sibling left child tree

im super stuck on my assignment i have found a code to make a basic version of this tree but i have no idea how its works. Can someone pls help explain how it w

ImportError: python3.8/site-packages/tensorflow/python/profiler/internal/_pywrap_traceme.so: failed to map segment from shared object

When I import from tensorflow.keras.preprocessing import image in a single python file it works perfectly. Even in python interpreter console it is imported suc

How can I detect an "unClick" in wxPython?

I want to detect the difference of position between when I left-click in a panel and when I finish clicking (when the left button goes up after the click). I de

In python how do i selectively combine/ print output 4 lists

in python v3 how do i get the prices of items based on given conditions l3 -> (color price ) & l4->(articles base price ) & l1=(color name) &am

how to create mongodb composite schema in prisma using python?

File "/Users/akaash/opt/miniconda3/lib/python3.8/site-packages/prisma/generato r/models.py", line 861, in check_supported_scalar_list_type Cannot use b_boxes as

Spot Instance Error while creating a normal instance with Boto lib

I'm facing this Spot instance issue while creating an instance with the boto AWS library even if I'm not asking for a Spot instance. The issue is similar to thi

How To Access Repository Secret

I've made a repository on GitHub and have added a Repository secret. However, I can't seem to grab the secret's value. Any help would be greatly appreciated!

Cannot import name 'get' from partially initialized module 'requests'

I have problem with requests package. In past requests was working, but today for no reason it stopped working. I am just importing requests and it cause error.

Need to remove a particular file of size 0 from a directory

Need to remove a particular file of size 0 from directory, can anyone help me on that? The code i have tried is for f in source_images: file_path = os.pat

Query with Elasticsearch and Return source field only

I have some data on Elasticsearch and retrieve data using Fastapi GET call. i used below code to GET data from Elasticsearch main.py @app.get("/get_all") def ge

Pyscf install error: failed building wheel

I keep getting this error after entering pip install pyscf pi@node0:~ $ pip install pyscf Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/

Python, updating variables manual while code running

I have a code that contains a variable that I want to change manually when I want without stopping the main loop neither pause it (with input()). I can't find a

Django update bootstrap modal not updating untill refresh

Django bootstrap modal form works when i create new data gets populated and pop up closes automatically without refresh but when updating success message appear

Why does ctypes find my dll but not my function?

I am trying to rewrite an 32bit Matlab-script in Python. For this I need to include a dll, which I am trying to do with ctypes. Somehow the Python script does f

How can I plot a model, which is trained with a scaled dataset?

I have a major problem with XAI, Shap, Lime you name it in general. Here is a basic example for shap. My problem is that when I use a real tuned model, which is

How can I plot a model, which is trained with a scaled dataset?

I have a major problem with XAI, Shap, Lime you name it in general. Here is a basic example for shap. My problem is that when I use a real tuned model, which is

How to see results of Slack web API call in Python?

I'm learning about using APIs in Python, so I'm trying to get a list of users from a Slack workspace that I'm the owner of. I don't get any errors or even any w

How do I type hint a method with the type of the enclosing class?

I have the following code in Python 3: class Position: def __init__(self, x: int, y: int): self.x = x self.y = y def __add__(self, oth

Trying to understand this potentially virus encrypted pyw file

Today I realised this .pyw file was added into my startup files. Though I already deleted it, I suspect what it may have initially done to my computer, but it's