<commit_before>require 'gmail'
require 'rubygems'
require 'twilio-ruby'
require 'newrelic_rpm'
class GmailClient
	# Get client instance var setup
	def initialize
		@client = Gmail.new "<EMAIL>", "adminr95"
		account_sid = 'AC4fd5e16d1ac2a6a03ebe0ee1011e60fd'
		auth_token = '183<PASSWORD>6fb87b7d75062e4cb01ee4fa1'
		@twilio = Twilio::REST::Client.new account_sid, auth_token
		@previous = 0
		@email = '<EMAIL>'
		puts "Client setup complete"
	end

	def ping after="2016-01-07"
		@unread = @client.inbox.count(:unread, :from => @email, :after => Date.parse(after))
	end

	def schedule
		if ping > 0 and @unread > @previous
			puts "You have #{@unread} unread mails"
			@previous = @unread
			makecall
		end
	end

	def makecall
		@call = @twilio.calls.create(
		  from: '+918008840099',
		  to: '+918008840099',
		  url: 'https://demo.twilio.com/welcome/voice/'
		)
		puts "Called the number, Have a look!"
		@twilio.messages.create(
		  from: '+14014000674',
		  to: '+918008840099',
		  body: "Hey, You have a new mail from #{@email}"
		)
		puts "Message sent to user, Have a look!"
	end
end

gObj = GmailClient.new
NewRelic::Agent.manual_start
while 1
	gObj.schedule
	sleep 30
	puts "Retrying"
end<commit_msg>change timecount<commit_after>require 'gmail'
require 'rubygems'
require 'twilio-ruby'
require 'newrelic_rpm'
class GmailClient
	# Get client instance var setup
	def initialize
		@client = Gmail.new "<EMAIL>", "adminr95"
		account_sid = 'AC4fd5e16d1ac2a6a03ebe0ee1011e60fd'
		auth_token = '1<PASSWORD>'
		@twilio = Twilio::REST::Client.new account_sid, auth_token
		@previous = 0
		@email = '<EMAIL>'
		puts "Client setup complete"
	end

	def ping after="2016-01-07"
		@unread = @client.inbox.count(:unread, :from => @email, :after => Date.parse(after))
	end

	def schedule
		if ping > 0 and @unread > @previous
			puts "You have #{@unread} unread mails"
			@previous = @unread
			makecall
		end
	end

	def makecall
		@call = @twilio.calls.create(
		  from: '+918008840099',
		  to: '+918008840099',
		  url: 'https://demo.twilio.com/welcome/voice/'
		)
		puts "Called the number, Have a look!"
		@twilio.messages.create(
		  from: '+14014000674',
		  to: '+918008840099',
		  body: "Hey, You have a new mail from #{@email}"
		)
		puts "Message sent to user, Have a look!"
	end
end

gObj = GmailClient.new
NewRelic::Agent.manual_start
while 1
	gObj.schedule
	sleep 5.minutes
	puts "Retrying"
end
{'fraction_non_alphanumeric': 0.12837557125051932, 'fraction_numerical': 0.07187370170336518, 'mean_word_length': 4.0271398747390394, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1126692', 'n_tokens_mistral': 1109, 'n_tokens_neox': 925, 'n_words': 238}