Wednesday, April 1, 2015

Reliance mobile Stuff

There is a lot of useful reliance mobile codes that are obviously useful but not documented for AP circle of India pre-paid GSM


    • Check talk time balance - *367#
    • Check 2G/3G balance - SMS "MBAL" to 55333(Tollfree) or dial(only for GSM) *111*1*3#
    • Recharge 3G pack -
      • Rs.225,get 1GB 3G data,local & STD calls@1p/sec, Free FB, TW &WA for 30 days. To activate dial *777*225# OR SMS,ACT 3G225 to 53739.
      • Rs.144,get 500MB 3G data,All local & STD calls @1p/sec, valid for 30 days. To activate, dial *777*144# OR SMS ACT 3G144 to 53739.R
      • Rs.95, get 350MB 3G data, All local & STD calls @1p/sec, valid for 15 days. To activate, dial *777*95# OR SMS ACT 3G95 to 53739.

      Saturday, March 28, 2015

      Installing Cyanogenmod 12 (Nightly) in Nexus 4

      Today I decided to void my Nexus 4's warranty ! Probably it was out of warranty anyway. I had used Cyanogenmod earlier phones of mine and its simply awesome. For a long time I waited for a stable release of Cyanogenmod with Android Lollipop but none of the Cyanogenmod 12 build is stable till now (as I type) for Nexus 4 (Mako). I lost my patience today and went for the recent nightly build.

      Following were the steps
      1. Download Cyanogenmod ROM zip file
      2. Download the clockwork recovery.
      3. Download the sdk tools for android.
      4. Download gaaps
      5. Make sure the sdk tools is in your PATH so that its accessible from command line.
      6. Start your phone in recovery mode
        1. Turn off the phone
        2. Hold the power and volume down button till some text appears on the screen
        3. Install clockwork recovery
          $ fastboot flash recovery recovery-clockwork-touch-6.0.4.7-mako.img
        4. Select recovery option
      7. Factory reset and wipe cache from the menu.
      8. Choose "install from zip" option 
      9. Copy ROM file to the phone's SD card (or emulated directory)
        adb push cm-12-20150327-NIGHTLY-mako.zip  /data/media/
        If you get "read only file system" error try using the following commands before copying
        sudo adb devices (to make sure device is connected)

        sudo adb root (to make sure device is running on root access )
      10. Install the ROM zip file. In case this does not work, you can side load it.
        adb sideload cm-12-20150327-NIGHTLY-mako.zip
      11. Install gapps to get the Google Play Store and all you favorite apps there after.
        adb sideload gapps-lp-20150222-signed.zip
      12. Reboot from recovery mode to boot into your fresh new Cyanogenmod.

      As usual its my duty to warn you that you must know what you are doing before rooting your phone and installing custom ROM. I or the ROM company will not be responsible for whatever sh** you do with your phone.



      So far the following stuff works for me which I was mostly worried about custom ROM
      • Bluetooth (Playing music)
      • Audio 
      • GPS
      Also the screenshot at the top is of lock screen while playing music. Notice the visualizer at the bottom. This is cool.

      Saturday, February 14, 2015

      Downloading hi-resolution images from Google Photos using picasa web API in python

      Out of 15 GB quota given by Google for combined usage of Gmail, Picasaweb (now Google Plus Photos) and Google drive I had used up almost 98% of them.

      After cleaning up old and big emails which were not required  (searched "size:10m" in gmail) I figured out there still a lot of space taken by Google Photos. I have moved on to Flickr recently for my high resolution photos because Google counts any photos which is more than 2048 pixels (either height or width) towards their storage quota. The only photo being stored in Google photos now a days are the ones which are automatically backed up from my phone. Earlier I had set it up to back up the full resolutions photos hence I ended up running out of storage quota very quickly.

      There is no straight forward way to filter Google Plus Photos by size and delete them. Also I wanted to download them before I permanently delete. I decided to do this programmatically as I did not find any tool online.

      The below script basically scans a album (in my case the "Auto Backup" album ) for photos whose dimensions are more than 2048 and downloads them on the disk.

      There are few points to be noted before you use this script.
      • Install Google Data python APIs from this site.
      • Keep increasing the "offset" variable if you think you have more than 1000 photos. This is because of the API limitation of being able to query only 1000 entries at a time. 

      Wednesday, February 4, 2015

      Sunsign or Moon sign

      For those who know me must be thinking already that I have changed my opinion about astrology. No I haven't, from the outset I want to be clear that this post is about the amount of reality actually astrology has.

      Last week I was randomly looking at sky and noticed that there is a bright star next to moon. It must have been one of the brightest star because it looked bright even in moon's glare. After I paid attention to the nearby stars I quickly realized that its actually Aldebaran (Rohini in Indian terms) in the constellation of Taurus (Vrushabhaa Rashi ). This is not an unusual sight because the whole reason, the 12 zodiac constellations are relatively famous than other 68 consternations is that the Sun, Moon and other planets appears to pass through them. You never seen Sun, Moon or planets near the north pole.

      Now as per Indian Astrology if you were born at a time when the Moon was around the consternation of Taurus your moon-sign becomes "Taurus(Vrushabhaa Rashi)". I looked up a random Horoscope generator on the web and entered the birth date and time of that moment (not that couple of hours would have made a lot of difference because it takes almost a couple of days for the Moon to jump constellations) and got the following chart.

      Birth Chart or Kundali of a person born on 29th Jan 2015

      If you notice there are 12 sections in this chart numbered in sequence starting from right bottom (adjacent to the right edge ) anti-clock wise. Each section in astrology denotes one zodiac sign (Yeah ! I know basics of Astrology as well because growing up these were the only charts I had for locating planets ). Section 1 is for Aries and section 2 is for Taurus and so on all the way till Pieces which is section 12. The two letter symbols in some of the sections are planets and Sun and the Moon. You can see the section 2 has "Mo" that says the Moon is in Taurus. BINGO ! That's what I just saw in sky. Indian astrology seems to make sense ? Well not really ! Its all "Indian Astronomy". Astrologers just added some predictions on top of it. Probably astrologers haven't even ever seen the sky or can't even recognize which one is what planet or star. They took all the knowledge from ancient astronomers and scared the shit out of people. Can you really believe someone who bets on the planets which he can't even identify but any random person with a little knowledge of astronomy can ?


      The left side of the photo is from a computer simulation software "Stellarium" and the right side is the actual photo that I took. The Moon is clearly in Taurus isn't it ?

      Let's come to the western world. Most of the daily newspaper and online astrology column gives you 12 sun-sign and their date ranges. E.g Aries (21st March to 19th April), Taurus is (20th April to 20th May) , Sagittarius (22nd November to 21st December), Capricorn (22nd December to 19th January) and Aquarius (21st Jan to 18th Feb). Western astrology claims these are your sun-signs if you were born on respective dates because the Sun is in the respective constellation as seen from earth.

      Let's pull the Simulation software again and see where the Sun been these days. Since I can't see the Sun directly and blind my eyes and stars are not visible in the day time, following is the simulated chart of the Sky of 29th January 2015.

      Position of Sun on 29th Jan 2015 is in Capricornus.

      Wait ! What ? The Sun is in Capricornus ? But it was Jan 29 and it should be in the middle of Aquarius as per western Astrology.
      This is clearly wrong. At least the birth chart (Kundali) above shows the Sun (Su) is in 10th section i.e. Capricorn. Aquarius is the 11th section.

      Probably we know the reason why western astrology's positions are off by 1 constellation. Tidal forces from the sun cause the earth’s axis to wobble over a 26,000 year period. So the Sun drifts a very small amount every year and in 2000 years it actually goes and sits in a different constellation (Zodiac). When western astrology borrowed the star charts and calculations from Astronomers 2000 years ago the Sun used be in Aquarius on every Jan 29. This can be validated by the simulation software setting the time to year 0000 Jan 29. None of the astrologers  bothered to look back and validate it after that but kept on saying random predictions about someone life. This is really silly. At least they should have got the facts right for the sun-signs. So remember to subtract one month from your birthday when you see the daily horoscope next time. I am joking, just read any of the 12 horoscope , you will find something believable and true exclusively to you. Those are written in such a generic way.

      So the point is the terms like planets , stars and calculations of their position that the astrologers use are real (well almost :) we have exposed the flaw ) and people start to believe them at that point but it has no correlation with your life's past/present or future. Well enough of astrology bashing. I don't even take it seriously, the only problem I have is when people take decisions based on that, like fixing marriage date and travel plans etc. Rather take such decisions by rolling a dice or local weather or just based on dates when its convenient for others. I am sure you will get more "blessings" in later case.

      Some would argue that there may be hidden science behind astrology that human mind is yet to comprehend. Well I agree there may be a lot of forces and facts to be discovered but its not science if it can not be explained logically and I refuse to believe till there is any evidence.


      Sunday, January 25, 2015

      Comet Lovejoy C/2014 Q2

      Comet Lovejoy C/2014 Q2 is one of the brightest of recent times. It was bright enough to be seen in naked eye in early January 2015. While it was fairly easy to spot with the charts, it looked bit different than traditional naked eye comets which has a prominent tails. This one looked like a greenish ball of cotton from binoculars and small telescope like the ones that I have. A really dark sky was only be found almost an hour drive from the city outskirts.

      In fact this outing of ours was featured in the local news paper Deccan Chronicle  also.




       These kind of stargazing outings keep happening in the city these days. Join AHAA - Amateur Astronomers in Hyderabad for such activities.