Aug 1, 2017

The most powerful visualization of data from history showing horrors of war

Image source: https://www.edwardtufte.com/tufte/posters

Probably the best statistical graphic ever drawn, this map by Charles Joseph Minard (in 1868) portrays the losses suffered by Napoleon's army in the Russian campaign of 1812.  The map he draw to remind France of horrors of war when they felt very proud of Napoleon. The thick band shows the size of the army at each position (as army moves towards Moscow, its width decreases) and after reaching Moscow they return. The path of Napoleon's retreat from Moscow in the bitterly cold winter is depicted by the dark lower band, which is tied to temperature and time scales. It is expected 98% of soldiers died in this return journey.

Share:

Jul 30, 2017

Watching first Arsenal Match in Emirates Stadium

Landed in London Euston and now I will catch the Victoria Line till Finsbury. The train had people wearing Arsenal T-shirts, shawls, scarfs, jackets, and so on.  We made mistake of not wearing anything with Arsenal logo, its a shame.
From Finsbury station (or nearby station) just follow the crowd.  Arsenal station can be rush.  Match days are rush, so, if for the first time then reach early.  Target reaching (probably 2 hrs early).  Lot of British food stalls around so eat burger, drink beer on the way to stadium or near stadium.
We spend around 30 mins in the Arsenal store and trust me its rush.  You choose T-shirt and get name and number printed on it - its takes time.  Visit Arsenal Museum (Only match days only museum tour) is allowed. 30 mins for museum tour. And click lot of photographs before entering the stadium. Do not go empty stomach since inside food options are less (pizza and chicken nuggets).  During breaks or at match times long queue at the stall inside stadium for beer.
While watching get ready to shout Aaaarrrsenal....sing Arsenal song... excited so stand.. clap... ... and enjoy.  
(Image Source: Arsenal.com)

I suggest one can arrive 2-3 hrs early to nearest station.  Drink beer, smoke, and eat outside in 30 mins., Shop in Arsenal store for 30 mins, Visit museum for 30 mins, and assume 30 mins to enter, and 30 mins for photography.
Share:

Jul 22, 2017

How WhatsApp is source big data

No doubt its collective effort that makes Facebook boring and similar happens with WhatsApp.  I receive so many photos and videos from many groups I joined.
I received a video of 8 MB.  I ask the person "How many groups have you send this video".  If answer is 10 groups.  Now each group has 20 people, the now video is stored on 10*20 (=200) people's phone i.e. consumes 200*8MB = 1600 MB space.
I have 4 machines connected to same iCloud account; therefore Video is now consuming 32 MB space on my machines (all machines in sync).  And if happens same with other 200 people then video is now consuming 1600*4 = 6400 MB = 6.4 GB space.
And video will be forwarded and forwarded and creating Big Data.

We can save lot of space if we can little description while sharing video so that other person can decide if they want to download or now.

Share:

Jul 21, 2017

Installing pygraphviz on Windows


Install pygraphviz:

1. Install Graphviz (pip install graphviz) (Probably optional)
2. Download pygraphviz or clone using git

pip install pygraphviz

Error - unable to find vcvarsall.bat
1. Install Visual Studio because package has C code that needs Visual C++ compiler. (Probably Optional)
2. Only installing Visual Studio might not work.
Install Visual C++ Build Tools 2015 (http://blog.notfaqs.com/2016/07/python-35-pip-install-error-unable-to.html)

pip install pygraphviz

Error - cannot open include file: 'graphviz/cgraph.h': No such file or directory
Solution -
Set correct path and command line options
pip install --global-option=build_ext --global-option="-IC:\Users\abhishek\pythonPath\pygraphviz-2.38\release\include" --global-option="-LC:\Users\abhishek\pythonPath\pygraphviz-2.38\release\lib" pygraphviz


Error - LINK : fatal error LNK1181: cannot open input file cgraph.lib
Solution - Download win64 binaries for graphviz here: https://github.com/mahkoCosmo/GraphViz_x64/
pip install --global-option=build_ext --global-option="-IC:\Users\abhishek\pythonPath\graphviz-2.38_x64\include" --global-option="-LC:\Users\abhishek\pythonPath\graphviz-2.38_x64\lib" pygraphviz

Error - graphviz_wrap.obj : error LNK2001: unresolved external symbol PyIOBase_Type
Solution - Apply patch
https://stackoverflow.com/questions/42059395/newbie-here-how-do-i-apply-a-patch-to-the-source-of-a-python-package-in-windows
Patch path - https://github.com/Kagami/pygraphviz/commit/fe442dc16accb629c3feaf157af75f67ccabbd6e
Learn how to apply patch - https://www.youtube.com/watch?v=MwbiFAsoACA

(Ref - https://github.com/pygraphviz/pygraphviz/issues/58)
Share:

Jan 4, 2017

BlockChain

Blockchain is the biggest thing happening right now; it dominated 2016 and it will rise and shine in 2017.  In this post I want to discuss the useful technology that is changing the financial industry and has wide application for other industries too.  It is where software engineers should focus on making careers and entrepreneurs should focus for startups. Millions of pages on web are filled with blockchain and it is not easy to completely grasp it because technology's application is so huge. But to understand it we go step by step and one should have heard of Bitcoins - A crypto currency that uses a public distributed ledger - Blockchain. No central private repository (database) instead public and distributed.  Note distributed has some key benefit - No single ownership that means whole database can't be hacked (hacker needs to hack each one individually) and also if single user gets hacked no one is responsible (Bank is not responsible for your loss).  Banks see both Blockchain as threat and opportunity because on one hand blockchain might eliminate their need and on other hand blockchain might create new opportunities if they become integral part of the chain.

Layman Terms

Someone asked this on Quora and answers were good. Inspired by that I would like to mention that we all do transactions such as online payment using credit card and bank charges for the transaction and also records the transaction in its repository for tracking ( and to rollback or refund) and both buyer and seller trust bank.  But what is seller and buyer don't need this trusted intermediate then they wish to perform transaction directly - this is where Bitcoin comes in.  Few underlying ideas are important:
Distributed Ledger - The ledger (assume database) of who owns how many coins and which coins is public.
Hash - Individual's identity is a hash function, which means encrypted.  So ledger is public distributed but no-one's identity is known.
Join - Anyone can join the ledger (write only database) by generating his or her hash code.  Download the ledger on your computer and ledger will keep on syncing itself and updated all the time.
Safe - No one can tamper the ledger because its not private and central.

Revolution

In the old days we had Bitcoins like system - the times when we didn't had databases and repositories - we used distributed ledger. Then came times when trade information was kept in books hidden from public but now the technology exists where people can freely trade with each other and can keep the information without need of trusted third parties - Government, Bank, Notary, etc. Not one person/organisation controls the book (ledger) instead it is digital public distributed ledger and every transaction (trade or exchange) is logged with time, date, amount, and participants.  Every computer (node) holds the full copy of ledger (Blockchain).

Technology
Distributed Ledger - Download the bitcoin on your computer.  One you download the full node (all transactions - size more than 100 GB), you can become Bitcoin miner -
"Almost all full nodes also help the network by accepting transactions and blocks from other full nodes, validating those transactions and blocks, and then relaying them to further full nodes." - https://bitcoin.org/en/full-node
Not everyone needs to be miner instead one can posses a bitcoin wallet and start getting and spending bitcoins - Go ahead https://bitcoin.org/
A network with miners and users will be like below -
Source - https://www.youtube.com/watch?v=YIVAluSL9SU

Anyone trying to alter a transaction then it will be refused because it will make ledger inconsistent with others (hosted on other computers in network). Bitcoins can only work if more and more people join the network either by using wallet or being a miner.

One can purchase bitcoin using any currency and perform a transaction (buy or sell).  A miner will verify the transaction and once transaction is verified it will be added in the ledger.


Image Source - https://bitcoin.org/

The idea of Blockchain and bitcoin is so combined that no discussion of blockchain starts without bitcoins. The best explanation is available online on - https://www.weusecoins.com/

The key point now to note is people trust blockchain and a unit in chain can be bitcoin or anyother thing such as property - users participating in transaction decide that means one can exchange car or oil using blockchain technology.
IBM has nice explanation that it is transfer of assets (car, bonds, license, music, etc.) within network with full visibility (you have whole ledger). Organisations now need to re-engineer their business rules to work using blockchain.  
Share:
© Shift, ShEkUP, Shape, and Surprise | All rights reserved.
Blogger Template Crafted by pipdig