Skip to content

Commit

Permalink
Merge pull request #59 from SensehacK/rescueTime
Browse files Browse the repository at this point in the history
Rescue time.
  • Loading branch information
SensehacK authored Jul 4, 2018
2 parents 7b178e7 + 512f04c commit e1572af
Show file tree
Hide file tree
Showing 2 changed files with 204 additions and 158 deletions.
212 changes: 200 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@
<!-- Custom fonts from fontastic for Trakt TV SVG. -->
<link href="https://file.myfontastic.com/RdqTEHU3NGAZLVYoyxjbQ8/icons.css" rel="stylesheet">
<!-- <link rel="stylesheet" href="https://file.myfontastic.com/RdqTEHU3NGAZLVYoyxjbQ8/icons.css"> -->
<!-- Google Charts -->
<!--Load the AJAX API-->
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<!-- Google Charts end-->

<!-- Script
================================================== -->
<script src="js/modernizr.js"></script>
Expand Down Expand Up @@ -371,28 +376,34 @@ <h1>
<span>Work</span>
</h1>
</div>
<div class="three columns header-col">
<h1>
<span>Infosys Limited</span>
</h1>
</div>

<div class="nine columns main-col">
<div class="eleven columns main-col">

<div class="row item">

<div class="twelve columns">
<div class="twelveC columns">

<h3>Infosys Limited</h3>
<p class="info">iOS App Developer
<span>&bull;</span>
<em class="date">January 2017 - Present</em>
</p>
Dream of working as an iOS App developer gets fulfilled at Infosys.
<br>From getting my
<b>iOS Udacity Nanodegree</b>
to working on production ready apps created in house for clients.
<br>Worked with many teams on different projects related to iOS apps from requirement gathering to deployment
phase.
<br>Witnessed full app life cycle first hand by working for clients on
<b>enterprise applications.</b>
<br>Ascended my programming artistry &amp; problem solving skills over the period of time learning new
methodologies.
<p>
Dream of working as an iOS App developer gets fulfilled at Infosys.
<br>From getting my
<b>iOS Udacity Nanodegree</b>
to working on production ready apps created in house for clients.
<br>Worked with many teams on different projects related to iOS apps from requirement gathering to
deployment phase.
<br>Witnessed full app life cycle first hand by working for clients on
<b>enterprise applications.</b>
<br>Ascended my programming artistry &amp; problem solving skills over the period of time learning
new methodologies.

</p>

Expand Down Expand Up @@ -558,6 +569,45 @@ <h1>
</div>
<!-- End skills -->


<!-- Rescue Time
-->
<div class="row skill" id="developer">

<div class="twelveC columns collapsed">
<h1>Check out Time Usage.</h1>

<div class="six columns header-col">
<h1>
<span>Rescue Time Analysis.</span>
</h1>
<h1> Yesterday Analysis</h1>
<div id="rescueTimeChartPie_div3"></div>
<!-- end skill-bars -->



</div>
<div class="six columns header-col">
<h1>
<span>Rescue Time Analysis2.</span>
</h1>
<h1> Overall Analysis</h1>

<div id="rescueTimeChartBar_div3"></div>
<!-- end skill-bars -->



</div>


</div>
<!-- main-col end -->

</div>
<!-- End Rescue Time -->

</section>
<!-- Resume Section End-->

Expand Down Expand Up @@ -2687,6 +2737,144 @@ <h4 class="widget-title">Latest Tweets</h4>
}
</script>


<!-- RescueTime + Google Charts
================================================== -->

<script type="text/javascript">
// Calling Rescue Time Data
movierescueTime();
var rTvery_productive_percentage;
var rTproductive_percentage;
var rTneutral_percentage;
var rTdistracting_percentage;
var rTvery_distracting_percentage;

function movierescueTime() {
var request = new XMLHttpRequest();
var getRescueTime =
"https://www.rescuetime.com/anapi/daily_summary_feed?key=B63TFb2EXGglprpQqYrz4zIgChijDRfsZaddbjEN"

var getRescueTimeX =
"https://cors.io/?https://www.rescuetime.com/anapi/daily_summary_feed?key=B63TFb2EXGglprpQqYrz4zIgChijDRfsZaddbjEN"

// call url
request.open('GET', getRescueTimeX);
request.onreadystatechange = function () {
if (this.readyState === 4) {
console.log('Status:', this.status);
console.log('Headers:',
this.getAllResponseHeaders());
console.log('Body:', this.responseText);
//Converting responseText String JSON to Javascript Object JSON.
var rescueTimeJSON = this.responseText;
var rescueTimeObj = JSON.parse(rescueTimeJSON)
// Accessing 8 json elements overall

console.log("Printing iteration number")
// Trying to access movie titles & year details
console.log("rescueTimeObj[i].id")
console.log(rescueTimeObj[0].id)
console.log("rescueTimeObj[i].productivity_pulse")
var rescueTimePulse = rescueTimeObj[0].productivity_pulse;
console.log(rescueTimePulse);
console.log(rescueTimeObj[0].productivity_pulse)

// Getting the first time analysis for yesterday.
rTvery_productive_percentage = Math.floor(rescueTimeObj[0].very_productive_percentage);
rTproductive_percentage = Math.floor(rescueTimeObj[0].productive_percentage);
rTneutral_percentage = Math.floor(rescueTimeObj[0].neutral_percentage);
rTdistracting_percentage = Math.floor(rescueTimeObj[0].distracting_percentage);
rTvery_distracting_percentage = Math.floor(rescueTimeObj[0].very_distracting_percentage);
console.log("Printing the Rescue time data");
console.log(rTvery_productive_percentage);
console.log(rTproductive_percentage);
console.log(rTneutral_percentage);
console.log(rTdistracting_percentage);
console.log(rTvery_distracting_percentage);

console.log("end of Rescue Time call");

rescueTimeChart();
rescueTimeChartBar();

}

};

request.send();

}



// Load the Visualization API and the corechart package.
google.charts.load('current', {
'packages': ['corechart']
});

// Set a callback to run when the Google Visualization API is loaded.
google.charts.setOnLoadCallback(rescueTimeChart);

// Callback that creates and populates a data table,
// instantiates the pie chart, passes in the data and


function rescueTimeChart() {

var rescueData2 = new google.visualization.DataTable();
rescueData2.addColumn('string', 'Topping');
rescueData2.addColumn('number', 'Slices');
// rescueData2.addColumn('number', 'Percentage');

rescueData2.addRows([
['Very Productive', rTvery_productive_percentage],
['Productive', rTproductive_percentage],
['Neutral', rTneutral_percentage],
['Distracting', rTdistracting_percentage],
['Very Distracting', rTvery_distracting_percentage]
]);
console.log("In drawChart3 google 23 piechart");
var rescueTimeOptions = {
'title': 'How Much Time I utilize yesterday.',
'width': 600,
'height': 400
};

var rescueTimeChart2 = new google.visualization.PieChart(document.getElementById(
'rescueTimeChartPie_div3'));
rescueTimeChart2.draw(rescueData2, rescueTimeOptions);
}

function rescueTimeChartBar() {

var rescueDataBar2 = new google.visualization.DataTable();
rescueDataBar2.addColumn('string', 'Topping');
rescueDataBar2.addColumn('number', 'Slices');
// rescueData2.addColumn('number', 'Percentage');

rescueDataBar2.addRows([
['Very Productive', rTvery_productive_percentage],
['Productive', rTproductive_percentage],
['Neutral', rTneutral_percentage],
['Distracting', rTdistracting_percentage],
['Very Distracting', rTvery_distracting_percentage]
]);
console.log("In drawChart3 google 23 piechart");
var rescueTimeBarOptions = {
'title': 'How Much Time I utilize yesterday.',
'width': 600,
'height': 400
};

var rescueTimeChartBar2 = new google.visualization.BarChart(document.getElementById(
'rescueTimeChartBar_div3'));
rescueTimeChartBar2.draw(rescueDataBar2, rescueTimeBarOptions);
}
</script>
<!-- RescueTime + Google Charts end
================================================== -->

<!-- footer
================================================== -->
<footer>
Expand Down
Loading

0 comments on commit e1572af

Please sign in to comment.