Category "python"

What to do when pip dependency resolver wants to use conflicting django plotly dash versions of a application?

So I'm trying to integrate plotly with my django app however I'm having an issue rendering a chart. I was using VSCode which did not pick up the dependency conf

How to Show a Picture in Qt python

How Can I Show A Picture in PyQT6? My Code: from PyQt6 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.

how to run a kivy app on ASUS tinker board?

I am trying to run a kivy app (basic to print hello world) on asus tinker board and i am facing this error. I am new to the kivy app development as well as new

Issues with word2vec

I'm wondering why this program only creates a py plot of letters rather than words. Am I giving it the wrong kind of data for word2vec? The program runs just fi

How do I use pandas to compare a list of numbers to a column in an excel document?

I have this simple script that creates a list by taking the values out of the column of excel_1 and compares it to the values of a column in excel_2. I want it

remove decorator from stack trace

I want to write a function decorator that removes itself from the stack trace when an exception occurs (outside the logic specific to the decorator itself), for

TF-Agents _action_spec: how to define the correct shape for discrete action space?

Scenario 1 My custom environment has the following _action_spec: self._action_spec = array_spec.BoundedArraySpec( shape=(highestIndex+1,), dtype=np.

how to render a json from a dataframe in fastAPI

I have a csv file that i want to render in a fastAPI app. I only managed to render te csv in json format like following: def transform_question_format(csv_file_

How to utilize Yolo on high resolution images 8k

I have recently started working in this field. And currently the requirement is to train Yolov3 on a custom dataset where images are of 8k resolution. Is there

Permission of the API Twitter

I'm making a twitter bot to like tweets and at first the script is right. The problem is with the twitter API permission. It says "Read only" and there is no op

CSRF Exempt Django Auth Password Reset View for Cross Domain request

I have a separate front end and backend site and I am trying to enable users on the front end to reset their password. I have created an endpoint for them to d

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

Send SVG image content to email as HTML using boto3

I want to send SVG content (without saved file) as HTML to Outlook email address. This SVG content works fine in browser showing a circle image, however sending

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

AttributeError: 'MapDataset' object has no attribute 'client_ids' in tensorflow_federated TFF

I'm trying to test a compression technique in federated learning with non-IID using this API tff.simulation.datasets.build_single_label_dataset(), following the

Robot Framework having trouble evaluating expression with a colon in it

I currently have a conditional statement with two variables in Robot Framework that have a colon(:) in the string. The evaluation fails every time. Both variabl

Disable the output of matplotlib pyplot

I have an array A of shape (1000, 2000). I use matplotlib.pyplot to plot the array, which means 1000 curves, using import matplotlib.pyplot as plt plt(A) Th

How to mark the maximum value and location of 4 equations in one plot (shear diagram - portal frame)?

I´m an mechanical engineering student and I'm trying to make a shear diagram of a portal frame. In the code below I want to identify for each equation (4

Unresolved reference in Manim Community with pycharm

I installed Manim community version 0.14.0 using pip install manim on Windows 10. I used the code example given on installation page and it works fine in pyChar

Plotting nested lists seperately, which are inside nested dictionaries

I have a list consisting of multiple nested dictionaries and nested lists MyList = [{dict0}, {dict1}, {dict2} ... {dict2422}] dict0 = {'type': 'Feature', 'geom