Category "python"

Determine butterfly subtopologies in a network topology

I recently got a project where I have to identify all the butterfly subtopologies in a network. The network has to be implemented using a graph. Fortunately, I

RLE ALgorithm in python

like the title suggest I want to do an RLE algorithm and I have few problems with that for example in RLE algorithm if we take aaaabbbccd it should return a4b3c

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

Trying to find a graph in matplotlib

I have data that show the difference of temperatures from 1955 to 2020 from an average. I want to make a graph in matplotlib that looks like this: It shows tem

Python TCP Game Server

So I am making a multiplayer CCG (collectable card game) in Unity (client side). I have chosen Python as the programming language of the server since I feel rea

Python with matplotlib and tkinter is working but I don’t understand how

I’m writing a program to help me solve small puzzles, like Sudoku. I’m a newbie at Python and am just starting to use matplotlib and tkinter. I&rsqu

Stuck on "Installing build dependencies ... \" while installing scikit-lean on jupyter notebook

I get stuck when i use pip install to install scikit-learn on jupyter notebook I tried to find other solution that I found on internet but it is always the sam

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