Skip to main content

Posts

The first half of 2017 in review

Hi people, Half the year is over and i think its good to list out things, so that i have an idea as to how i am doing with my studies ( and pretty much everything else ). It's been a wonderful and fulfilling half year, to be honest. I did a lot of things I always wanted to do.  I started experimenting with hydroponics - haven't really progressed much, but I am sure I will do something substantial in the other half of the year. Benefits are a lot over traditional way, and the joy of watching your plants grow are invaluable, at the least. I read a few books on history. I have always wanted to do this , but I always had an excuse or 2 to avoid it. I finally started, and it's brought me a sense of childlike wonder, something I sorely missed. I cleaned my home! That's 20 years of procrastination right there! It was insane but I got it done. Whew! And wow!  At the beginning of the year, i finished my re-study of the CS subjects. Post February, i opened th
Recent posts

Markov chain in JavaScript

I made a small Markov Chain joke generator during my coffee break sometime last week. This is in continuation to the last post, where we did a similar thing. I did this specifically to see how well it could be extended in a language which I have typically not used before for ML/NLP. Let me run you guys through it. First of all, the Markhov Chains need a bunch of data to tell it how exactly you want your sentences constructed. str_arr=[sentence1, sentence2,...] Next, we create a dictionary of all trigrams present across the sentences. To do this, we use all bigrams as keys, and the succeeding word as the corresponding values. The key-value pairs thus form a trigram. As an example, consider the sentence : “The man had a dog.” The dictionary for this sentence will have : [ {[The, man] : [had]}, {[man, had] : [a]}, {[had, a] : [dog]} ] Next up, using the dictionary that we just made to create sentences. Here we provide the first two words, and let the function work

Yo mama so geeky : generating jokes using Markov Chains

A few days back, I saw this article “ How to fake a sophisticated knowledge of Wine with Markov Chains ” on the programming subreddit. To my utter delight, the article referenced the code, along with a very detailed explanation, so I spent an hour getting it all to work. The hour taken was no fault of the original authors, it was taken because I wanted to get a good hang of XPath, which will be the topic of a later post. The program auto-generates wine reviews, by using Markov Chains to come up with a sequence of most probable trigrams. It was great fun spouting my expert-level sommelier reviews, especially considering that I can count on one hand the number of times I have actually tasted wine! The reviews were just the right amount of ambiguous with a hint of snobbishness (which, according to me, just made the whole thing perfectly more believable). While I was showing off my new-found expertise in wines, my partner in crime,  Rupsa , told me it could probably be used for other

Year 2016 in review and goals for 2017

Hello people, It's my 34th birthday today and I wanted to put the past year in review and where I wanted my life to go in the next year. Achievements of this year: Machine learning course by Andrew Ng ( completed ) Calculus I by Robert Ghrist ( completed ) Calculus II by Robert Ghrist ( completed ) Probability and Statistics ( 2 weeks left ) Data science - pandas ( 1 week done )  My first linear regression program Built a neural network from scratch  My first Regex. From scratch. No references. With tests. Algorithms I by Robert Sedgwick ( only audit ) Algorithms II by Robert Sedgwick ( only audit ) Also did the BE subjects for CS, all the stuff I had learned over the years. I am super happy to know that MOOCS help a lot in career advancement . Self-help books that really helped: How to win friends and influence people - Dale Carnegie   A mind for Numbers - Barbara Oakley   Altogether, a pretty good year, where learning is concerned. Thin

When you say........

......you don't believe in god, you admit there is a god to believe in This is the meme post that started this train of thought in my mind.   I have heard one of my classmates say a long time ago, if women truly believed that they were equal to men, then they would not fight for it. While I never accepted it, i didn't know how to speak against it either. but it was there, somewhere in my mind. I think i made some sense out of it, at last. This is stupidity. This is like saying 'If we Indians seriously believed that freedom was ours, we would never have had to fight for it'. The fight for independance was a fight to make the other party understand and/or accept your viewpoint. The first resonable method might be to consider the other person's viewpoint. And using that as a base point,then work, with suitable proof and arguments, raise, alter, or reconstruct their viewpoint to match ours. This method follows the logic that people can and will be fair in an

Scared of looking in the mirror.

I just got back from lunch with a friend. she had got a post remove from a board. she stood up for someone. I, deep down, mocked her for it. what's wrong with me? why can i not applaud someone who is obviously better than me. when did i become thus, to mock greatness? she is my friend. i should applaud her, and i mock. Is this what i have become? worse than a common person, spineless, spiteful? definitely not what i want to be. I hated such people, and i have become, at last, one myself. I have begun hating greatness. I hate myself for being this way. I would not have stood up for anyone in this scenario, but loath someone who has. whatever happened to having an open mind? what happened to looking at things from other's perspective? I have taken a long time to learn that lesson, that people are right about whatever they do, from their perspective. What happened to that, understanding people's perspectives without being told explicitly? I'm in sorro

Letting Go

Today as i was going through Hacker News , i came by a very, very interesting article. Friends Without Benefits . Somehow, i was touched by this article.  Its written by a woman about her relationship with a man she loved since she was 22, and how, finally, she could let go of it. All of us have relationships that we need to 'let go' of. Let me talk about mine. I had a friend. My best friend. I loved him like my brother. I cared about him. It hurt me when he was hurt, physically or otherwise. He was a little peculiar, but, then again, so was I. Things went great till the end of that common phase of our life. After that, we went our separate ways. We lost touch for a brief interval. We did get back in touch again. But I was always the one reaching out. Maybe i just realised it now? Maybe it just started now? Maybe it was always that way? But maybe I was seeing something that was not there? I decided to keep an account of my interactions with him. Just so that