Tag: Python
-
Matplotlib and Bokeh Cheat Sheet, Python Programming language
The matplotlib cheat sheet was created to help visualize data. Datacamp provides a cheat sheet describing the basics of seaborn. Seaborn is also a widely used library for data visualization with python. It allows getting a very clean chart with less code. Matplotlib is a plotting library for the Python programming language. The most used module of…
-
Create a GitHub bot for automatic contributions
Have you ever wondered how non-tech guys have such impressive contribution stats on their Github profiles? Yes, they have set up a GitHub bot that uploads the same file over and over again to the GitHub repo. This piece of content is a part of my “automation” manifesto, which I declare here: I would automate everything…
-
Properly run FastAPI uvicorn+gunicorn with HTTPS
To run the FastAPI on HTTPS: edit systemctl service file of your app service. On Ubuntu, those files located at (/etc/systemd/system/) If you don’t remember where you put the service file of your app – just run the systemctl status command: systemctl status appname systemctl status appname Add two arguments related to the SSL certificate…
-
Properly Run Python Django under a local network
First, you need to find your local IP address with this command in cmd: ipconfig/all Open settings.py and add your IP address to the ALLOWED_HOSTS list: ALLOWED_HOSTS = [‘192.168.xxx.xxx’] Finally run command in the terminal: python manage.py runserver 192.168.xxx.xxx:8000 Voila, now you can visit your Django app by accessing this address(192.168.xxx.xxx:8000) from any device in…
-
Properly schedule a crontab command for a Python script on any Linux system
There are a lot of articles over the internet that exist about the Python Cron schedule. Most of them are the working solutions and I’ve been setting up cron jobs for decades now, but unsuspectedly I’ve got a bug with my beloved sudo chrontab -e command and this is the reason I’ve written this article.…