text: Title: Restructure the code for some examples according to PEP8 guidelines?
  Body: Hey there! A really neat repository! 
  
  I was browsing through the code and noticed in some examples that you've written entire blocks of code within `if __name__ == __main__` block. I am willing to restructure it, it's possible to import the functions you've put within the `if __main__ == __name__:`  blocks if they were outside it.
  
  Let me know what you think 😁 