Friday, September 25, 2015

Python Hunt Series - Scripts, Modules and Packages

Python Hunt Series - Scripts, Modules and Packages

prev post in the series - Isolated Environment

In this post, let's discuss about scripts, modules and packages in python.

Before getting into packages, lets discuss on modules and scripts. A file with .py extension when ran from the terminal is called as script where as when imported called as module. 

A script can solve any purpose. Lets assume we have a need to start a server instance. we can write a script that starts the server instance. similarly we can also write a script to stop the server instance. In-fact we can write a single script that takes input as either start or stop and does it accordingly

Thursday, September 24, 2015

Python Hunt Series - Isolated Environment


Python Hunt Series - Isolated Environment 

Prev post in the series - Scaffolding


In this post, we will discuss about the virtual environment option available in Python. Virtual environment creates isolated environment which will provide us the opportunity to install python packages to our convenience without affecting the global python environment

let me give you an use case where virtual environment is must. Consider I am working on 2 projects simultaneously, for my first project I need to use django (web application framework ) version 1.6 and for my second project I need django version 1.8 or greater. In this case I cannot have django 1.6 and >1.8 co existing in the same environment.

Wednesday, September 23, 2015

Python Hunt Series - Scaffolding


Python Hunt Series - Scaffolding

Hi, this is first post in the series " Python Hunt " . To start with, I will talk about setting up environment to work on Python.

At first place we need to install Python. Python comes in 2 major versions, python 2.x and 3.x. If you are starting fresh, I would suggest to go for python 3.

You can read about the difference between python 2 and python 3 from below link


Friday, February 6, 2015

Python - Basic Template

In my first post about python, I was talking about parsing huge text files with python regular expression. I thought I should share the basic template kind of set up that I have for myself to save some time while scripting. I use this basic template in writing some quick script for immediate needs. It really saves my time.

I have commented then and there in the script to increase the readability of the script. As said in every programming books, commenting your code is a must do activity and it will help anyone to understand the script in better way.

Thursday, February 5, 2015

Python - Text Crawler

I find Python extremely useful at many scenario's. Certain kind of work I do involves lot of manual efforts and consumes lot of time. I started slowly experimenting with python then and there to automate few things with which I work.

One such case where python is very useful for me is, parsing large text files. It often happens that we need to parse huge file to pull data or parse log file to create reports. In all these cases python comes in very handy. I will share a small snippet below to show how powerful is python with regular expression module.

Wednesday, February 4, 2015

Is Phonebloks a reality ?

Phonebloks, which started as an idea in YouTube is now reality. Dave Hakkens who posted this video in YouTube explains how we can build a phone through bolks and their by reduce the largest growing waste - e waste. 

He wanted to grab millions of people's attention and wanted to take this idea a step ahead. He achieved it through social media and managed to win the attention of Motorola. Motorola started to do the R&D on this and soon it got merged with Google.

They named it as "Project Ara".  It all started as an idea back in 2013 and now it's an active project in Google labs.

Saturday, January 31, 2015

Sleep Of Death (SOD) problem in Android



Android, the very famous mobile OS which runs in millions of devices has seen a tremendous growth in recent years. Every 7 out of 10 people I know use smart phone which is powered by android.

Android is so easy to use that people easily adapt to it. With the latest version lollipop, android has seen a huge growth. Companies like Samsung, HTC and many more depend hugely on android for their market growth.

I should say there is not much need for providing a skin over android to sell a device. I am not a great fan of Samsung touchwiz or HTC Sense. Stock android is cool and has the benefit of faster update to latest version.

That being said, let me share few pointers where people get upset with android. Android being a huge project and we see lot of developmental changes, bugs are common and with regular software updates it can be resolved too. I am talking about certain bugs which android didn't provide any fix as such and the people who got affected by it are still furious with Google for ignoring such cases