This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Amal G Jose' | |
import time | |
import logging | |
from boto.emr.connection import EmrConnection | |
from boto.emr.bootstrap_action import BootstrapAction | |
from boto.emr.step import InstallHiveStep | |
from boto.emr.step import InstallPigStep | |
from boto.regioninfo import RegionInfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Amal G Jose' | |
import sys | |
import boto | |
class GetAllInstances(object): | |
def __init__(self): | |
self.aws_access_key = 'XXXXXXXXXXXXXXX' | |
self.aws_secret_key = 'XXXXXXXXXXXXXXX' | |
if self.aws_access_key == '' or self.aws_secret_key == '': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
count=1 | |
limit=10 | |
while [ $count -le $limit ] | |
do | |
cat A.txt >> B.txt | |
cat B.txt >> A.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.snappy.codec; | |
/* | |
* @author : Amal G Jose | |
* | |
*/ | |
import java.io.BufferedInputStream; | |
import java.io.BufferedOutputStream; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hadoop.skipper; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.HashSet; | |
import java.util.Set; | |
import java.util.StringTokenizer; | |
import org.apache.hadoop.fs.Path; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Amal G Jose' | |
import time | |
import serial | |
import string | |
from pynmea import nmea | |
ser = serial.Serial() | |
# Reading serial data from COM5 port. Change this port according to your settings. | |
ser.port = "COM5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Amal G Jose' | |
from datetime import datetime | |
from dateutil import relativedelta | |
##Aug 7 1989 8:10 pm | |
date_1 = datetime(1989, 8, 7, 20, 10) | |
##Dec 5 1990 5:20 am | |
date_2 = datetime(1990, 12, 5, 5, 20) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Amal G Jose' | |
import tornado.httpserver | |
import tornado.ioloop | |
import tornado.options | |
import tornado.web | |
from tornado.options import define, options | |
define("port", default=8888, help="run on the user defined port", type=int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Amal G Jose' | |
from collections import Counter | |
data_list = ['apple', 'apple', 'orange', 'mango', 'apple', 'grapes', 'banana', 'banana'] | |
count = Counter(data_list) | |
print count.items() | |
print "Count of apple : ", count['apple'] | |
print "Count of orange : ", count['orange'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Amal G Jose' | |
count = {} | |
data_list = ['apple', 'apple', 'orange', 'mango', 'apple', 'grapes', 'banana', 'banana'] | |
for value in data_list: | |
if value in count.keys(): | |
count[value] += 1 | |
else: | |
count[value] = 1 |
OlderNewer