Skip to content
Advertisement

Tag: python

Callback from sunburst chart. DASH PLOTLY

i’m writing a code with a sunburst chart that will present all classes from some type of data, and when the user click on what class he wanna see my dropdown menu should present values only from that classe. So, my difficult where how to do this callback, cause all the ways that i tried failed. my df used look

How to make sprite move to point along a curve in pygame

I’m doing a pygame project for practice and I need a sprite to move to some point on screen and I did it, but it moves in a straight line and I would like to learn how to make it move to the same point in a curve. This movement looks like and I would like it to be like

How to increase the size of only one plot in subplots?

If you have two subplots, how do you change the length of only the second plot? Adding figsize=(7,5) to plt.subplots changes the size of both plots, but hoping to change only the size of the 2nd one. source code: https://www.w3schools.com/python/matplotlib_subplot.asp There are no errors, but how do you adjust the size of only the 2nd plot but keeping the placement

duplication of messages in stderr and stdout python logging

I would like to log info and warning level to stdout and error level and above to stderr how can I do it ? code: logging.conf and output after python3 -m tests 1> output.log 2> err.log: err.log output.log Consequently, the output on the console is: My question is how to make the message not repeat itself ? I want ERROR

Merge using threads not working in python

I have to merge two lists and every time a full the lists in order to merge them , but what is happening that I did it like this : but what is happening that filling_buffer_thread and create_inverted_index_thread just called one time, and not working again, when I debugged the code I see that filling_buffer_thread stopped I don’t know if

error: (-215:Assertion failed) !empty() in function CV2 Error

I am making a program in python that just draws a rectangle around a car. I am currently stuck on getting the coordinates of the car, here is the code: I am running in on an error with the function “cv2.detectMultiScale”. error: I have tried googling, it says to use cv2.CascadeClassifier(cv2.data.haarcascades + “cars.xml”) instead of cv2.CascadeClassifier(“cars.xml”). It didn’t work :(,

ezdxf issue when creating drawing with layers

I have encountered an issue when creating a new drawing using the ezdxf library. I need to create a new dxf drawing, AutoCAD release R2000, so I use the following commands: New entities, e.g. a simple line, are added on separate layers. For example: And then at the end: for saving the document. This works fine: I can create a

Advertisement