Wednesday, July 23, 2014

Broke the Cage...


Once I look forward 
I saw that I was inside two cages 
With a blank wall and dirty bricks...

But few month later...
Took da decision to move
to move toda other side...
Oh...
there is green
I can see the green... 
I can feel da green...
Wind is blowing...

Hey..
Why did I was so late...
Look... look above ...
Look beyond the eye
Yes... yes I broke a cage...
Now there is only one...
I can see da blue sky clearly...
Birds are flying...
Clouds are moving...
Trees are waving in the rhythm of wind...

Suddenly I turn my head...
It was all silence and empty
Change  da vision...
Look beyond...
Think difference...
is the THING
Create da life vision more melodious...


the VIEW of my window




Tuesday, July 1, 2014

Collecting Tweeter Data using Python: Getting Started


NPL, Natural Language Processing, Test Mining are some of the hot topics for research for these day. With this article I'm going to introduce how to collect tweeter data using simple code in Python.

As the first step you  can install Python to your machine

  1. Install Python [Click Here] personally commanded 2.7 or upper
  2. Get Api Key [Sign in twitter]
  3. Install tweepy [Download tweepy from here ]

After all those steps you can download data from Tweeter. Here is the code for

import tweepy
from tweepy import Stream
from tweepy.streaming import StreamListener

ckey = '** your consumer_key **'
csecret = '** consumer secret **'
atoken = '** access token **'
asecret = '** access secret **'

class listner(StreamListener):

def on_data(self,data):
print data
return True

def on_error(self, status):
print status

auth = tweepy.OAuthHandler(ckey,csecret)
auth.set_access_token(atoken,asecret)

twitterStream = Stream(auth,listner())
twitterStream.filter(track=['car'])

when you run this code in the python shell twitter data about "car" will display on your shell

දෙහි

  දෙනකොට දෙහි මදි නොකියන්නම ඇබුලටම... මිරිකලා හොදටම හදනවා බීම පැණි බේරෙන්නම මදි නොකියන්න Photo by Yethu Mtshali on Unsplash