Skip to content

Drawing cartesian axes

I’m working on an image I made myself. I have filtered the image (B2W) to properly detect the contour of a water jet that is visible in the image. What I want to do now is to draw an XY axis (x axis going to left and y axis going upwards, with origin starting at the most right (lowest) point

Cannot unpack non-iterable int object

I need to use __getitem__ for all 7 arguments in my class but __getitem__ won’t let me so I tried to use a tuple but I keep getting this error: What should I do? Answer To make a getitem that returns the contents of each of the member variables given a key that is the same as the name of

Querying the database in a Django unit test

I am creating a web application which has a POST endpoint, that does two things: Saves the POSTed data (a university review) in the database. Redirects the user to an overview page. Here is the code for it: I haven’t yet implemented passing the user data to the endpoint, and that’s why I’m s…

How to load environment variables in a config.ini file?

I have a config.ini file which contains some properties but I want to read the environment variables inside the config file. Is this possible or do I have to write a method to take care of that? Answer I know this is late to the party, but someone might find this handy. What you are asking after is value inte…