Wednesday, 21 November 2018

PIP - How to install PIP in Python

PIP and Python

Hi All,

PIP is a recursive Acronym PIP Installs Packages.
This is used to install Python packages.

We can download the pip.py from internet and run to configure the same.
Once installation is done we can install packages in Python using pip.

Eg

pip install packagename

Wednesday, 18 July 2018

PIR Sensor

Hi All,

Using this PIR sensor we can sense the presence of Human beings.

Use these resources for PIR Sensor.

Video : for Connection

https://www.youtube.com/watch?v=YFjEXt5oBYE
[Search for 'How To Connect PIR Motion Detector Sensor [Arduino Tutorial] ']

Code : for execution

http://playground.arduino.cc/Code/PIRsense



Saturday, 21 April 2018

Simple Python Program

Hi All,

See some simple programs in Python.

#Program 1
# To Add 2 numbers

num1 = 1.2
num2 = 3.3
# Add numbers
result= float(num1) + float(num2)
# Display the result
print('The sum of {0} and {1} is {2}'.format(num1, num2, result))

Saturday, 16 December 2017

Advanced Computer Science Projects 2017 -2018

Hi All,

Doing an innovative project using advance technology is no big deal.
You need passion...that's the only requirement.
Anyone can be taught any technology if interested.


1. Windspeed prediction using Artificial Neural Networks (ANN)

2. Weather Reporting using R-Pi, Python and Twitter Interface

3. Student performance Prediction using Artificial Neural Networks (ANN)

4. Weather Forecasting using Artificial Neural Networks (ANN)

5. Twitter Sentiment Analysis using Python

6. Cancer prediction using Artificial Neural Networks (ANN)

7. Protein Interaction Prediction using Support Vector machine(SVM)

8. Car Number Plate detection and recognition using Matlab Image Processing Toolkit.

9. DNA cryptography for Text and Image Encryption using Matlab

Friday, 15 December 2017

Data cleaning using Python


Hi, All
Data cleaning is considered vital. See the code below.



import HTMLParser
html_parser = HTMLParser.HTMLParser()
tweet = html_parser.unescape(original_tweet)
# Actual text
#“I luv my <3 iphone & you’re awsm apple. DisplayIsAwesome, sooo happppppy 🙂 http://www.apple.com”
tweet = original_tweet.decode("utf8").encode(‘ascii’,’ignore’)
APPOSTOPHES = {“'s" : " is", "'re" : " are", ...} ## Need a huge dictionary

words = tweet.split()

reformed = [APPOSTOPHES[word] if word in APPOSTOPHES else word for word in words]

reformed = " ".join(reformed)
cleaned = “ ”.join(re.findall(‘[A-Z][^A-Z]*’, original_tweet))
    tweet = _slang_loopup(tweet)
tweet = ''.join(''.join(s)[:2] for _, s in itertools.groupby(tweet))


https://www.analyticsvidhya.com/blog/2014/11/text-data-cleaning-steps-python/







Advanced data cleaning:

Grammar checking:
Spelling correction:

Wednesday, 13 December 2017

NLTK in Python

Hi All,



Natural Language Toolkit (NLTK)
NLTK is a leading programming platform for building Python programs to work with human language data itms. It provides easy-to-use interfaces along with a suite of text processing libraries for classification, tokenization, stemming, tagging, parsing, and semantic reasoning, wrappers for industrial-strength NLP libraries etc
Some simple things you can do with NLTK
Tokenize and tag some text data:
>>> import nltk
>>> sentence = """At eight o'clock on Thursday morning
... Arthur didn't feel  good."""
>>> tokens = nltk.word_tokenize(sentence)
>>> tokens
['At', 'eight', "o'clock", 'on', 'Thursday', 'morning',
'Arthur', 'did', "n't", 'feel', 'very',  '.']

Range List Program in Python

Hi All,

See the program



rangelistmain  = range(10)
>>> print(rangelistmain )
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
for number in rangelistmain :
    # Check if number is one of
    # the numbers in the tuple.
    if number in (3, 4, 7, 9):
        # "Break" terminates a for without
        # executing the "else" clause.
        break
    else:
        # "Continue" starts the next iteration
        # of the loop. It's rather useless here,
        # as it's the last statement of the loop.
        continue
else:
    # The "else" clause is optional and is
    # executed only if the loop didn't "break".
    pass # Do nothing

if rangelistmain [1] == 2:
    print("The second item (lists are 0-based) is 2")
elif rangelistmain [1] == 3:
    print("The second item (lists are 0-based) is 3")
else:
    print("Dunno")

while rangelistmain [1] == 1:
    pass