Skip to content

Sort a list by value of a dict python

I need some help, how to use the algorithm selection sort to sort a list by the values of a dict. I wrote some code but I don’t know how continue, that the code work. e.g. sort the list by the values of the dict Answer New Answer Create class selection_sort which has get_sorted() method that will sort t…

How to install packages in Airflow (docker-compose)?

The question is very similar to the one already available. The only difference is that I ran Airflow in docker Step by step: Put docker-compose.yaml to PyCharm project Put requirements.txt to PyCharm project Run docker-compose up Run DAG and receive a ModuleNotFoundError I want to start Airflow using docker-c…

Python Flask cookie consent

I want to set a banner that asks for permission to store cookies on my website(because GDPR). I’ve tried like this: HTML: and jinja2 The prints are for debugging. The problem is that the list is always empty and the banner is never showing. What should I do to make this work? Does that mean that the sit…

wondering what this makefile means

So I was browsing repl.it and saw that someone made it possible to run firefox in the repl window. There was a file called Makefile and it had this code in it. I’m wondering what it means and where they are getting Firefox from. Then there is a python file called launch.py I’m genuinely curious wh…