Posts

  • 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
  • Magic Cauldron: Harry Potter Themed Gender Reveal Party - #Aurdino

    Earlier this year, we had a very fun filled Harry Potter themed gender reveal party. For the reveal, I built a Magic Cauldron which would reveal the gender. Check it out for yourself! For this I needed: A Cauldron. WS2812B LED array. Aurdino UNO. Bread board and jumper wires. Dry ice. Kasa Smart bulbs I will go over in the following sections The Mist.

  • Kakashi: The Copycat Robot - #Aurdino #image processing

    In this post, I want to share about "Kakashi: The Copycat Robot"—a fun side project I built a few years ago. The name is inspired by the famous character from Naruto, Kakashi Hatake, also known as the Copycat Ninja.The goal of this robot was to mimic Kakashi's ability to copy movements—though, of course, in a more limited way. Check it out for yourself!Here are the things I used to build this:

  • Neural network inference pipeline for videos in Tensorflow - #Deeplearning #Tensorflow

    Just as we saw a huge influx of images in the past decade or so, we are now seeing a lot of videos being produced on social media. The need to understand and moderate videos using machine learning has never been greater. In this post, I will show you how to build an efficient pipeline to processes videos in Tensorflow.  For simplicity, let us consider a Resnet50 model pre-trained on

  • Finding Where's Waldo using Mask R-CNN - #Deeplearning #ML

    When I was a kid, I really loved solving Where's Waldo. There were few books (it used to be called Where's Wally) in our school library on which I spent hours finding Waldo. For people who do not know what it is, basically Waldo - a unique character is hidden among hundreds of other characters and you have to find him in all the chaos in the image. Now that I am too old to be solving it and

  • Higher level ops for building neural network layers with deeplearn.js - #Deeplearning #javascript #ML

    I have been meddling with google's deeplearn.js lately for fun. It is surprisingly good given how new the project is and it seems to have a sold roadmap. However it still lacks something like tf.layers and tf.contrib.layers which have many higher level functions that has made using tensorflow so easy. It looks like they will be added to Graphlayers in future but their priorities as of now is to

Tuesday, 8 September 2015

The Infamous battery re-calibration bug in Lenovo Thinkpad

My brand new Lenovo Thinkpad is a beast and is supposed to give up to 8hrs of battery backup. But there was a weird problem. As soon as the battery remaining reached 30%, it used to drop to 6% in a second. When I looked up on google, I found out that I was not the only one facing this problem. Most of them suggested that my battery was shot and that I had to buy a new one. This is highly improbable as it is brand new. I wanted to give fixing it a try before contacting customer care. And I was successful!

Before - See the battery percentage drop from 30% to 6%

For some reason, I suspected that it was somehow TLP's fault. TLP is the best power management utility for Thinkpad in Linux. It allows you to set max charging threshold so that you will be able to connect your laptop to the plug point without worrying about over charging (among many other features it provides). I felt that it is because of this, battery calibration was getting screwed up. So I set the maximum threshold to 100%.

Open /etc/default/tlp and set following variables.


START_CHARGE_THRESH_BAT0=100
STOP_CHARGE_THRESH_BAT0=100


Then I restarted my laptop to bring this to effect. As the calibration was already offset by a great extent, the only way to fix it was to keep it charged for a long time. I kept it charging for almost a day.


After - Fixed!
 Then to test it I kept discharging it. And to my surprise, it didn't drop from 30% to 6% this time!!
So the problem was with calibration and not because the battery is broken. If you face this problem, you can try this solution once before you spend $$$ on buying a new battery.

Now that I have changed the battery threshold back to 85%, if this problem occurs again, all I have to do is follow the above steps.

Sunday, 6 September 2015

Download only part of a repository in github

Sometimes you would want to download only a part of a repository in Github but you don't want to download / clone the entire repository, specially when the repo is huge or has too many other things that you are not interested in. There are many ways to do this. For example you can do a shallow clone, or you can use Github API (there is a limit on number of requests per hour)..etc. However, none of them are simple and straightforward. 

I recently found out that Github supports svn to some extent. So I tried the age old svn export to download a part of the project I was interested in. And it worked.

svn export https://github.com/<username>/<project name>/trunk/<folder path>

For example:


If you want to download only docs from Bootstrap repository,

svn export https://github.com/twbs/bootstrap/trunk/docs

Now, suppose you want to download it with a different name,

svn export https://github.com/twbs/bootstrap/trunk/docs bootstrap-docs