-
Making sense of generators, coroutines, and “yield from” in Python?
Consider the following (ridiculous) Python function: def myfunc(): return 1 return 2 return 3 I can define the function, and then run it. What do I get back? >>> myfunc() 1 Not surprisingly, I get 1 back. That’s because Python reaches that first “return” statement and returns 1. There’s no...
-
Keycloak - Should you do your own authentication?
Authentication is a major part of any web application where there can be multiple mechanisms put to be implemented, protocol to follow, and even then there can be gaps that lead to data breaches. Last month, we ended up having a work problem where we wanted a robust and reliable...
-
Setup Web Server on the Cloud (EC2)
Setting up a web server is easier than you may think and I’ll show you how! On an AWS instance, I’ll show you how to configure apache (httpd) on a CentOS machine. This involves: installing a firewall and opening the HTTP port to accept traffic installing httpd and setting it...
-
Running Cron Jobs in Django
If you are our UNIX or Linux user, you must have heard of cron. It’s one of the most useful tools in Unix systems although usually used in sysadmin jobs but still, you might need one too !? According to Wikipedia: The software utility cron is also known as cron...
-
How Google's PageRank Algorithm Actually works?
When you perform a basic google search, how does google determine in what order to show you your results? Google did try to explain us here One of the most important algorithms Google uses to do this is called PageRank and it’s an algorithm that attempts to estimate the importance...