matplotlib and cycler dependency.

Anaconda is growing in popularity for managing python packages and versions across different environments. Anaconda version (from different packagers) comes with some prepackaged libraries.

Sometimes, they libraries may have install order dependencies. One such dependency I have noticed is in matplotlib and cycler packages.

I recently installed an anaconda package. Every time I tried to import matplotlib, I would receive an error “ImportError: No module named ‘cycler’ “. I checked the versions of packages installed to look for any dependency based issues. But both had compatible versions. To remediate this, I reinstalled matplotlib package and the issue was still there. Finally I reinstalled cycler and followed by fresh installation matplotlib (with compatible kiwisolver) to fix the issue.


Scala and Spark compatibility issues

One of the major issue I have noticed working around with Spark and Scala is dependency between two packages.

Scala developers are upgrading Scala little faster than folks at Apache Spark can absorb. At the time of writing, Scala 2.12.8 is already out, but Spark’s latest release 2.4.0 is still stuck at Scala 2.11.X. I understand that Spark team is working on upgrading the Spark to framework to be compatible with Scala 2.12. But I think by the time they will release that upgrade, Scala may move to higher version.

So, the lesson for developers is to first get the Spark and then get the compatible version of Scala. Otherwise, you will get errors when trying to run your Scala programs with non compatible Spark (NoSuchMethodError).

Unrelated to the compatibility issue, one other very common issue I noticed when trying to run a spark program on a VM is with failure to bind on ports. It can be fixed by setting SPARK_LOCAL_IP environment variable. If you are running the Spark locally then set it to



Openness of internet

Internet was made popular by the notion of freedom, ease and speed. Ability to share information with anyone, by a click on button with a system located at any point of the world. Everyone knew the power of this new technology, and many feared the challenges that will come with this new technology.

Internet has the power of delivering any information to a connected device across the globe immediately. There is no check on the quality of information. This information can help an individual, communities, etc. But as we have seen in some recent cases in India, a wrong information can sometimes lead to loss of lives. Human beings love to speculate, and have opinions about things (politics, finance, etc.) they sometimes have no idea about. These opinions, that a human love to share, cannot always be considered as the right information. In the absence of internet, these opinions will rarely spread to masses. Internet is an information highway, and these opinions can now reach everywhere. Human will always have opinions and will always want to share them. But we need a check on the platform that can help people understand difference between facts and opinions.

  1. Evidence: In Indian TV dramas there is always a “Bahu”, who wants to spread false information or opinions. Most people around her accept those opinions as facts without asking for evidences. This leads to plots that unravel slowly and these shows run for years (For instance, Kyun Ki Saans Bhi Kabhi Bahu Thi). No one in those tv series was asking for evidences. We need to ask for evidence and reject information that cannot be justified by evidences. More serious or impactful the story is, more concrete should be the evidence. Having evidence alone is not going to solve the issue of authentic information. There are many organizations, which are running targeted programs to spread false information, sometimes with false evidences. Images of destruction from Gaza is at times shown as an image of violence and destruction in Kashmir. For a quick reference, one should rely more on news coming from reliable news sources, rather than coming from your unknown friend on Facebook or WhatsApp.
  2. Authenticity of Evidence: Images, Audios and Videos can be used as evidences on internet. There should be a way to find authenticity of these evidences. Anyone can now take a picture from his camera, edit on his phone and upload to internet as a picture taken elsewhere. A service is required to verify authenticity of this picture. Cutting edge systems are available that can search an image on internet and return results which look similar to the test image. But this solution is not going to be enough in future. Technology companies are working on building smart camera technology and applications which can help one take a picture and then edit any aspect of it. Nowadays one can easily change the background, add more people to picture, replace one object or a person with someone else. Having this technology in everyone’s hand is not solving any big problem for consumer, but will definitely add more problem to find authenticity of a picture. Smart way should be to label any edited image as fake, because when one starts editing an image, he is creating a fake version of the original.

Technology is changing fast and with that, bad actors are adopting newer technologies faster to fool people than companies/people who are working on adding checks and balances. People need to show more restraint when acting on any artifact they see online.

Is Saudi consulate safe?

Recently a well known (at least in Saudi Arabia) Saudi journalist was assassinated and secretly disposed from national consulate of Saudi Arabia in Turkey. Initially the Saudi government denied any knowledge and involvement in this brutality. After two weeks of constant pressure from USA and hard evidences from Turkey, government released statement that it was an interrogation that went wrong. As per the official stand, the journalist had an argument with some folks in the consulate, which led to his death. It just happens to be that the argument he had were officials close to prince Salman. As per Turkey government, these folks landed in Turkey sometime before journalist’s visit to consulate and returned back post his death. If one does accepts the statement of brawl leading to death of the journalist, it is difficult to understand how the entire consulate participated in deposing off the body of Mr. Khashoggi. Saudi government (including the king) lied to US president Trump and the world about having any knowledge of it for about next 6 days. Then they claimed that probably the journalist was murdered, but some third party (or rogue element) did it. Hard to believe if some other country or someone more powerful than the king is running Saudi Arabia’s consulate.

This act raises few strange points:

  • How easy it is to loose your life at Saudi consulate. A brawl can lead to death and your body will be destroyed easily to be never found again. Next time someone visits Saudi’s consulate, make sure to write your will and call friends and family. One may not get a chance to say good bye later.
  • If officials kill someone at Saudi consulate, it can take up to 2 weeks before the king or foreign office will know about it. This is either the king is not the real king and someone else is calling the shots or the king was consulting ways to release the news without harming himself and the young prince.
  • This also highlights the extent of corruption in the country. How many people were fed with gold (probably oil wells) to hold the information and deny out-rightly about it?
  • Can responsibility of prince in this murder be ignored, when he is the direct leader/master of two of the folks involved in this murder? Prince has to do one of the two things: 1) Either take responsibility of this murder or, 2) accept that he is an idiot to hire murderer and don’t know what his folks are doing. He is going to look bad in both the cases, but these are only two options for him now.

But as we have seen earlier, and will continue to see it in future, the Saudi government will deny any knowledge of it. They will offer to buy more arms and raise investment in US and Europe. They will initiate some inquiries, and some low-lings will be blamed for this or these low-lings will own it themselves. World will move on to US vs China (+Russia), until we hear again about some other journalist.


Germany survives the day.

What an amazing world cup we are having so far! People are changing their favorites each day. None of the soccer behemoths are standing up to their reputation. The so-called underdogs are emerging with-in each group. One of the nerve-wracking matches was played today between Germany and Sweden. German fans were expecting an easy win, but Sweden wanted to give a tough fight. Sweden scored first, which put Germany under tremendous pressure. Germans team created ample opportunities for the forward and the striker to score a goal, but Werner and Reus were fumbling near the goal. The second half opened with the same energy from the German side. Reus finally scored in the 48th minute giving much-needed relief to the team. The attack continued and they still missed the goal post left and right. Boateng was single-handedly managing Sweden’s counter-attack. As the clock showed last 10 minutes, the coach and bench started showing a panic. A draw from here may still mean a ticket back home. They wanted to score as many goals as they can. A small challenge from Boateng resulted in a red card for the German player. I think it was too harsh a decision, especially compared to what we are seeing in other matches. It was a fair challenge, but the referee wasn’t impressed and sent him out. But I think it worked in Germany’s favor. It exposed Germany’s center back. Sweden wanted to exploit this opportunity and created a gap in its defense, which so far was proving difficult to crack. 5 minutes were added to the time towards the end and German team was trying all they can to score one last goal. They were trying to fire from each side, but it was just not working for them. Finally, a free kick was given and Toni Kroos was on the left of the goal post, right outside of the penalty area taking the shot. All eyes were on him to score a free kick, instead, he passed the ball to Reus to a little right. Reus stopped the ball and Toni hit it right towards the goal. This time the ball went straight in and Germany jumped to 2-1. A classical German way to finish the game.

Germany is right now tied with Sweden for the second spot. They will play S. Korea next and Sweden will face Mexico. Germany must win next game to keep their world cup campaign open. Argentina is already on the brink of returning home. Portugal and Spain are both still playing strong.

FIFA World Cup 2018

Russia is hosting FIFA world cup this year. The hospitality of the nation may help change its image across the world. It may help increase the tourism as well. No wonder countries are willing to go to any extent to host FIFA world cup. No matter who is the host, the games will be nerve wrecking as always. Going into the cup, I believe no country has the clear edge. Few countries can still be considered as good sides, such as Portugal, Spain, Argentina, Germany and even Brazil. The competition will be fierce. Even the group stage matches so far were not one-sided. Favorites will change as the tournament progresses. I will put my two cents on Portugal or Spain to make it to the grand finale.

Android Studio upgrade and Google authentication

After few months, I downloaded my android application from GitHub to add some new features to that. I upgraded the SDK version and other dependencies. Strangely the google authentication using Firebase stopped working. Initially i thought the error was with version upgrades. One thing was not compatible with another libraries, or so. Fixed  “Google Play Service” upgrade issue on Pixel emulator. Wasted a whole day to identify the real issue was with SHA-1 certificate. When i started development, I was using my old machine and during the project setup, I added the SHA-1 certificate from first machine, to my Firebase project configuration. Now I was trying to work from another development machine. Unfortunately I missed adding the SHA1 key for this machine in the configuration. I found this error, when authentication status was finally showing “DEVELOPER_ERROR” (though i had other status before this).

If you are stuck in similar situation then try this:

  1. Status{statusCode=DEVELOPER_ERROR, resolution=null}
  2. In android studio: open Gradle (usually a panel on right side of the the IDE)
  3. [YourProject]>[YourProject]>Tasks>android>signinReport. Right click and click Run.
  4. Take the SHA-1 certificate and go your Project in Firebase.
  5. Click settings (next to Overview), click “ADD FINGERPRINT” and add your certificate key.