import multiprocessingdef sleep_5_seconds():
logging.info(' Will sleep 5 seconds')
logging.info(' Done sleeping 5 seconds')def sleep_10_seconds():
logging.info(' Will sleep 10 seconds')
logging.info(' Done sleeping 10 seconds')def main():
logging.basicConfig(level = logging.INFO)
PROCESS1 = multiprocessing.Process(target = sleep_5_seconds)
PROCESS2 = multiprocessing.Process(target = sleep_10_seconds)
INFO:root: Will sleep 5 seconds
INFO:root: Will sleep 10 seconds
After 5 seconds
INFO:root: Done sleeping 5 seconds
After another 5 seconds
INFO:root: Done sleeping 10 seconds
Sometimes, we might be in a situation where we have to send emails to multiple people in a personalised manner (like mailing each student their grades, mailing bank statements to customers, etc.). Although these emails follow the same format, the information inside it varies from receiver to receiver. When done…
Almost every interview for coding and software development roles is incomplete without a programming interview. There are thousands of questions in coding sites like LeetCode and it is impossible to cover all the topics within a short period.
In this series, I will provide solutions to frequently asked interview questions…
“When was the last time you tried a coding challenge?”
“I tried it just yesterday and it’s way out of my league. I’m just a beginner.” said the apprentice.
“About a year ago, when I began learning about stacks, trees and heaps. Now, I’m all caught building websites.” …
Netflix began its journey to becoming the world’s biggest streaming service in 1997.
Initially, Netflix offered DVD sales and rental by mail. In 2007, Netflix began its streaming media services as the world’s first online DVD rental store with 925 titles. …