Skip to main content

My Quarantine "Efforts"

A true relationship is two imperfect people refusing to give up on each other.
– Them
This blog is on relationships and of course a bit of coding, otherwise it would be stupid to put it here anyways. My girlfriend and I have been having some issues lately regarding the term "Efforts". Now when I put it in front of any of my friends, They have the same reply "Efforts" and when asked what efforts are? … Nothing. I get a supposedly deep answer - Efforts come from within. What does that even mean?. So I tried some stuff to get a response from her. Well for some context we came in relationship on 28 february,2020 and guess when the lockdown started in India. Don't guess, you may as well google it. It was not even a month before the lockdown began and we flew back home. She lives more than 1500km from my state. But you know sometime you just meet the right person and you just know. We knew we had to fight this as we had so much left to say to each other. This was our first test although it came very fast. We made a time table to spend more time together.
11:00AM - 2:00PMFreshen up, Have breakfast and study angular
2:00PM - 3:00PMStudy Reinforcement Learning
3:00PM - 5:00PMWatch Episodes
5:00PM - 7.30PMWalk and spend time with friends
7.30PM - around 10 PMPlay War Commander(Game i used to love)
10.00PM - around 11.30PMStudy or start watching something
12.00AM - around 2AMTalk about stuff or watch a movie
Timetable used to change a lot, we weren't following it that strictly. Everything was fine, it was October and we didn't even realize. I think that's when things started getting off track. We started with our jobs and stopped spending that much amount of time together.
So I was talking about efforts, whenever we fought I didn't show efforts ,I just used to say sorry but apparently sorry isn't enough for every mistake, which makes sense. But something that doesn't makes sense is what else can I do sitting so far away. Cant even send her gifts because someone else might receive and we are still not at a stage to introduce each other to our families.
So recently, I started writing poems for her which were pathetic but she loved them. So there I thought at last I decoded the definition of "Efforts". So whenever she used to get angry I used to write her a poem. But then I think she thought I am taking some help from some of the poets I got in my family and my trick started to fail and here I was at square one. So the next time she got angry I came around with an idea. The problem with my poems was I used to send them in quiet a small amount of time and by looking at them one can tell that they weren't that thoughtful and deep. All I wanted was a system that could send her an email at some time-interval with each line of my poem which would make it look like I put in a lot of efforts. Please be supportive I am coming forward to help and may be I die single after this!!! With that I will share what I made:

Effort Maker

You need to have the following before setting up:
  1. Python 3.x.x
  2. pip
Now, If you have the prerequisite, we do the following before writing in the code:
  • pip install smtplib
This is the code :
  
import time
import smtplib
fo = open("song.txt", "r")
class send_email(object):
    def __init__(self, email, password):
        self.email = email
        self.password = password
        self.server = 'smtp.gmail.com'
        self.port = 587
        session = smtplib.SMTP(self.server, self.port)        
        session.ehlo()
        session.starttls()
        session.ehlo
        session.login(self.email, self.password)
        self.session = session

    def send_message(self, subject, body):
        
        headers = [
            "From: " + self.email,
            "Subject: " + subject,
            "To: " + 'your lover's email',
            "MIME-Version: 1.0",
           "Content-Type: text/html"]
        headers = "\r\n".join(headers)
        self.session.sendmail(
            self.email,
            "Your lover's email",
            
            headers + "\r\n\r\n" + body)


effort = send_email('Your gmail Id here', 'Password here')

while True:
    line = fo.readline().strip()
    if line=='':
        break
    effort.send_message('I miss you', line) # you may change the I miss you part to whatever you would like as subject.
    print(line+" ---was sent")
    time.sleep(60) # This is an interval of 1 minute you may change it to whatever you like.
print("whole message was sent")
  
  
Save the file with an extension of .py at the end instead of .txt inside a folder. In the same folder make a text file (with .txt extension) and its name should be - song.txt.
In this file, you can add a poem or a song.
You will also need to go here : Activate Gmail for API Access 
You can run this program by opening your command prompt and typing cd "The folder address where the code is present". Hit enter. then type python your_code_filename.py And you will see her receiving the emails with single line going every 3 minutes. I would suggest write a poem and send it line by line. If you get caught you will have something to defend yourself.
PS: If she observes too much, remember to keep changing intervals after each song.

Comments

Post a Comment

Popular posts from this blog

Developing an app with react native and firebase - firestore - Part 1

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. –John F. Woods Let's face it, we are two years into work from home, quarantined from the outside and this makes me wonder that how lucky I am as an engineer to be able to have so many domains open for me to work on, with which I could eventually make money, help others. In other words, it gives me the power to bring a change. I just can't think of a problem where technology cannot help. As soon as I find a problem in minutes my mind starts to work on how it can be solved technically. I think this development is what our college provides us with, to open our technical aspects. Today, I will be talking about react-native and firestore, making app development a little painless and fast. If we are looking to solve a simple everyday problem and want an app to do it for us, an app that is not very complex - react native is the way to go. So,...

What The Hell Is gRPC?

Time is the longest distance between two places. ― Tennessee Williams  If you are a software engineer and you work on websites or any other software which is in high demand by your consumer, but you see that some parts of your application say the products page gets higher demand than any other services you provide at some point of time or let's say you want to loosely couple your application for your application to be developed more easily and flexibly.  These are a few use cases, there are many more. We are seeing a trend in the industry getting more aligned toward following microservices patterns while building the application. The When, Why, Where, and How parts of microservices can be easily found on the internet.  Here I want to talk more about some new technologies which have become an integral part when we talk about microservices. So this blog would be more fruitful for people who know the  When, Why, Where, and How  parts. Today, I will talk a...