's that are truncated
95 | $('a').each(function(i, el) {
96 | if (el.offsetWidth >= el.scrollWidth) return;
97 | if (typeof el.title === 'undefined') return;
98 | el.title = el.text;
99 | });
100 |
101 | // restore TOC scroll position
102 | var pos = gs.get('tocScrollTop');
103 | if (typeof pos !== 'undefined') summary.scrollTop(pos);
104 |
105 | // highlight the TOC item that has same text as the heading in view as scrolling
106 | if (toc && toc.scroll_highlight !== false) (function() {
107 | // scroll the current TOC item into viewport
108 | var ht = $(window).height(), rect = li[0].getBoundingClientRect();
109 | if (rect.top >= ht || rect.top <= 0 || rect.bottom <= 0) {
110 | summary.scrollTop(li[0].offsetTop);
111 | }
112 | // current chapter TOC items
113 | var items = $('a[href^="' + href + '"]').parent('li.chapter'),
114 | m = items.length;
115 | if (m === 0) {
116 | items = summary.find('li.chapter');
117 | m = items.length;
118 | }
119 | if (m === 0) return;
120 | // all section titles on current page
121 | var hs = bookInner.find('.page-inner').find('h1,h2,h3'), n = hs.length,
122 | ts = hs.map(function(i, el) { return $(el).text(); });
123 | if (n === 0) return;
124 | var scrollHandler = function(e) {
125 | var ht = $(window).height();
126 | clearTimeout($.data(this, 'scrollTimer'));
127 | $.data(this, 'scrollTimer', setTimeout(function() {
128 | // find the first visible title in the viewport
129 | for (var i = 0; i < n; i++) {
130 | var rect = hs[i].getBoundingClientRect();
131 | if (rect.top >= 0 && rect.bottom <= ht) break;
132 | }
133 | if (i === n) return;
134 | items.removeClass('active');
135 | for (var j = 0; j < m; j++) {
136 | if (items.eq(j).children('a').first().text() === ts[i]) break;
137 | }
138 | if (j === m) j = 0; // highlight the chapter title
139 | // search bottom-up for a visible TOC item to highlight; if an item is
140 | // hidden, we check if its parent is visible, and so on
141 | while (j > 0 && items.eq(j).is(':hidden')) j--;
142 | items.eq(j).addClass('active');
143 | }, 250));
144 | };
145 | bookInner.on('scroll.bookdown', scrollHandler);
146 | bookBody.on('scroll.bookdown', scrollHandler);
147 | })();
148 |
149 | // do not refresh the page if the TOC item points to the current page
150 | $('a[href="' + href + '"]').parent('li.chapter').children('a')
151 | .on('click', function(e) {
152 | bookInner.scrollTop(0);
153 | bookBody.scrollTop(0);
154 | return false;
155 | });
156 |
157 | var toolbar = config.toolbar;
158 | if (!toolbar || toolbar.position !== 'static') {
159 | var bookHeader = $('.book-header');
160 | bookBody.addClass('fixed');
161 | bookHeader.addClass('fixed')
162 | .css('background-color', bookBody.css('background-color'))
163 | .on('click.bookdown', function(e) {
164 | // the theme may have changed after user clicks the theme button
165 | bookHeader.css('background-color', bookBody.css('background-color'));
166 | });
167 | }
168 |
169 | });
170 |
171 | gitbook.events.bind("page.change", function(e) {
172 | // store TOC scroll position
173 | var summary = $('ul.summary');
174 | gs.set('tocScrollTop', summary.scrollTop());
175 | });
176 |
177 | var bookBody = $('.book-body'), bookInner = bookBody.find('.body-inner');
178 | var chapterTitle = function() {
179 | return bookInner.find('.page-inner').find('h1,h2').first().text();
180 | };
181 | var bookTitle = function() {
182 | return bookInner.find('.book-header > h1').first().text();
183 | };
184 | var saveScrollPos = function(e) {
185 | // save scroll position before page is reloaded
186 | gs.set('bodyScrollTop', {
187 | body: bookBody.scrollTop(),
188 | inner: bookInner.scrollTop(),
189 | focused: document.hasFocus(),
190 | title: chapterTitle()
191 | });
192 | };
193 | $(document).on('servr:reload', saveScrollPos);
194 |
195 | // check if the page is loaded in an iframe (e.g. the RStudio preview window)
196 | var inIFrame = function() {
197 | var inIframe = true;
198 | try { inIframe = window.self !== window.top; } catch (e) {}
199 | return inIframe;
200 | };
201 | $(window).on('blur unload', function(e) {
202 | if (inIFrame()) saveScrollPos(e);
203 | gs.set('bookTitle', bookTitle());
204 | });
205 |
206 | $(function(e) {
207 | if (gs.get('bookTitle', '') !== bookTitle()) localStorage.clear();
208 | var pos = gs.get('bodyScrollTop');
209 | if (pos) {
210 | if (pos.title === chapterTitle()) {
211 | if (pos.body !== 0) bookBody.scrollTop(pos.body);
212 | if (pos.inner !== 0) bookInner.scrollTop(pos.inner);
213 | }
214 | if (pos.focused) bookInner.find('.page-wrapper').focus();
215 | }
216 | // clear book body scroll position
217 | gs.remove('bodyScrollTop');
218 | });
219 |
220 | });
221 |
--------------------------------------------------------------------------------
/docs/libs/gitbook-2.6.7/js/plugin-fontsettings.js:
--------------------------------------------------------------------------------
1 | gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
2 | var fontState;
3 |
4 | var THEMES = {
5 | "white": 0,
6 | "sepia": 1,
7 | "night": 2
8 | };
9 |
10 | var FAMILY = {
11 | "serif": 0,
12 | "sans": 1
13 | };
14 |
15 | // Save current font settings
16 | function saveFontSettings() {
17 | gitbook.storage.set("fontState", fontState);
18 | update();
19 | }
20 |
21 | // Increase font size
22 | function enlargeFontSize(e) {
23 | e.preventDefault();
24 | if (fontState.size >= 4) return;
25 |
26 | fontState.size++;
27 | saveFontSettings();
28 | };
29 |
30 | // Decrease font size
31 | function reduceFontSize(e) {
32 | e.preventDefault();
33 | if (fontState.size <= 0) return;
34 |
35 | fontState.size--;
36 | saveFontSettings();
37 | };
38 |
39 | // Change font family
40 | function changeFontFamily(index, e) {
41 | e.preventDefault();
42 |
43 | fontState.family = index;
44 | saveFontSettings();
45 | };
46 |
47 | // Change type of color
48 | function changeColorTheme(index, e) {
49 | e.preventDefault();
50 |
51 | var $book = $(".book");
52 |
53 | if (fontState.theme !== 0)
54 | $book.removeClass("color-theme-"+fontState.theme);
55 |
56 | fontState.theme = index;
57 | if (fontState.theme !== 0)
58 | $book.addClass("color-theme-"+fontState.theme);
59 |
60 | saveFontSettings();
61 | };
62 |
63 | function update() {
64 | var $book = gitbook.state.$book;
65 |
66 | $(".font-settings .font-family-list li").removeClass("active");
67 | $(".font-settings .font-family-list li:nth-child("+(fontState.family+1)+")").addClass("active");
68 |
69 | $book[0].className = $book[0].className.replace(/\bfont-\S+/g, '');
70 | $book.addClass("font-size-"+fontState.size);
71 | $book.addClass("font-family-"+fontState.family);
72 |
73 | if(fontState.theme !== 0) {
74 | $book[0].className = $book[0].className.replace(/\bcolor-theme-\S+/g, '');
75 | $book.addClass("color-theme-"+fontState.theme);
76 | }
77 | };
78 |
79 | function init(config) {
80 | var $bookBody, $book;
81 |
82 | //Find DOM elements.
83 | $book = gitbook.state.$book;
84 | $bookBody = $book.find(".book-body");
85 |
86 | // Instantiate font state object
87 | fontState = gitbook.storage.get("fontState", {
88 | size: config.size || 2,
89 | family: FAMILY[config.family || "sans"],
90 | theme: THEMES[config.theme || "white"]
91 | });
92 |
93 | update();
94 | };
95 |
96 |
97 | gitbook.events.bind("start", function(e, config) {
98 | var opts = config.fontsettings;
99 |
100 | // Create buttons in toolbar
101 | gitbook.toolbar.createButton({
102 | icon: 'fa fa-font',
103 | label: 'Font Settings',
104 | className: 'font-settings',
105 | dropdown: [
106 | [
107 | {
108 | text: 'A',
109 | className: 'font-reduce',
110 | onClick: reduceFontSize
111 | },
112 | {
113 | text: 'A',
114 | className: 'font-enlarge',
115 | onClick: enlargeFontSize
116 | }
117 | ],
118 | [
119 | {
120 | text: 'Serif',
121 | onClick: _.partial(changeFontFamily, 0)
122 | },
123 | {
124 | text: 'Sans',
125 | onClick: _.partial(changeFontFamily, 1)
126 | }
127 | ],
128 | [
129 | {
130 | text: 'White',
131 | onClick: _.partial(changeColorTheme, 0)
132 | },
133 | {
134 | text: 'Sepia',
135 | onClick: _.partial(changeColorTheme, 1)
136 | },
137 | {
138 | text: 'Night',
139 | onClick: _.partial(changeColorTheme, 2)
140 | }
141 | ]
142 | ]
143 | });
144 |
145 |
146 | // Init current settings
147 | init(opts);
148 | });
149 | });
150 |
151 |
152 |
--------------------------------------------------------------------------------
/docs/libs/gitbook-2.6.7/js/plugin-search.js:
--------------------------------------------------------------------------------
1 | gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
2 | var index = null;
3 | var $searchInput, $searchForm;
4 | var $highlighted, hi = 0, hiOpts = { className: 'search-highlight' };
5 | var collapse = false;
6 |
7 | // Use a specific index
8 | function loadIndex(data) {
9 | // [Yihui] In bookdown, I use a character matrix to store the chapter
10 | // content, and the index is dynamically built on the client side.
11 | // Gitbook prebuilds the index data instead: https://github.com/GitbookIO/plugin-search
12 | // We can certainly do that via R packages V8 and jsonlite, but let's
13 | // see how slow it really is before improving it. On the other hand,
14 | // lunr cannot handle non-English text very well, e.g. the default
15 | // tokenizer cannot deal with Chinese text, so we may want to replace
16 | // lunr with a dumb simple text matching approach.
17 | index = lunr(function () {
18 | this.ref('url');
19 | this.field('title', { boost: 10 });
20 | this.field('body');
21 | });
22 | data.map(function(item) {
23 | index.add({
24 | url: item[0],
25 | title: item[1],
26 | body: item[2]
27 | });
28 | });
29 | }
30 |
31 | // Fetch the search index
32 | function fetchIndex() {
33 | return $.getJSON(gitbook.state.basePath+"/search_index.json")
34 | .then(loadIndex); // [Yihui] we need to use this object later
35 | }
36 |
37 | // Search for a term and return results
38 | function search(q) {
39 | if (!index) return;
40 |
41 | var results = _.chain(index.search(q))
42 | .map(function(result) {
43 | var parts = result.ref.split("#");
44 | return {
45 | path: parts[0],
46 | hash: parts[1]
47 | };
48 | })
49 | .value();
50 |
51 | // [Yihui] Highlight the search keyword on current page
52 | hi = 0;
53 | $highlighted = results.length === 0 ? undefined : $('.page-inner')
54 | .unhighlight(hiOpts).highlight(q, hiOpts).find('span.search-highlight');
55 | scrollToHighlighted();
56 | toggleTOC(results.length > 0);
57 |
58 | return results;
59 | }
60 |
61 | // [Yihui] Scroll the chapter body to the i-th highlighted string
62 | function scrollToHighlighted() {
63 | if (!$highlighted) return;
64 | var n = $highlighted.length;
65 | if (n === 0) return;
66 | var $p = $highlighted.eq(hi), p = $p[0], rect = p.getBoundingClientRect();
67 | if (rect.top < 0 || rect.bottom > $(window).height()) {
68 | ($(window).width() >= 1240 ? $('.body-inner') : $('.book-body'))
69 | .scrollTop(p.offsetTop - 100);
70 | }
71 | $highlighted.css('background-color', '');
72 | // an orange background color on the current item and removed later
73 | $p.css('background-color', 'orange');
74 | setTimeout(function() {
75 | $p.css('background-color', '');
76 | }, 2000);
77 | }
78 |
79 | // [Yihui] Expand/collapse TOC
80 | function toggleTOC(show) {
81 | if (!collapse) return;
82 | var toc_sub = $('ul.summary').children('li[data-level]').children('ul');
83 | if (show) return toc_sub.show();
84 | var href = window.location.pathname;
85 | href = href.substr(href.lastIndexOf('/') + 1);
86 | if (href === '') href = 'index.html';
87 | var li = $('a[href^="' + href + location.hash + '"]').parent('li.chapter').first();
88 | toc_sub.hide().parent().has(li).children('ul').show();
89 | li.children('ul').show();
90 | }
91 |
92 | // Create search form
93 | function createForm(value) {
94 | if ($searchForm) $searchForm.remove();
95 | if ($searchInput) $searchInput.remove();
96 |
97 | $searchForm = $('', {
98 | 'class': 'book-search',
99 | 'role': 'search'
100 | });
101 |
102 | $searchInput = $('', {
103 | 'type': 'search',
104 | 'class': 'form-control',
105 | 'val': value,
106 | 'placeholder': 'Type to search'
107 | });
108 |
109 | $searchInput.appendTo($searchForm);
110 | $searchForm.prependTo(gitbook.state.$book.find('.book-summary'));
111 | }
112 |
113 | // Return true if search is open
114 | function isSearchOpen() {
115 | return gitbook.state.$book.hasClass("with-search");
116 | }
117 |
118 | // Toggle the search
119 | function toggleSearch(_state) {
120 | if (isSearchOpen() === _state) return;
121 | if (!$searchInput) return;
122 |
123 | gitbook.state.$book.toggleClass("with-search", _state);
124 |
125 | // If search bar is open: focus input
126 | if (isSearchOpen()) {
127 | gitbook.sidebar.toggle(true);
128 | $searchInput.focus();
129 | } else {
130 | $searchInput.blur();
131 | $searchInput.val("");
132 | gitbook.storage.remove("keyword");
133 | gitbook.sidebar.filter(null);
134 | $('.page-inner').unhighlight(hiOpts);
135 | toggleTOC(false);
136 | }
137 | }
138 |
139 | // Recover current search when page changed
140 | function recoverSearch() {
141 | var keyword = gitbook.storage.get("keyword", "");
142 |
143 | createForm(keyword);
144 |
145 | if (keyword.length > 0) {
146 | if(!isSearchOpen()) {
147 | toggleSearch(true); // [Yihui] open the search box
148 | }
149 | gitbook.sidebar.filter(_.pluck(search(keyword), "path"));
150 | }
151 | }
152 |
153 |
154 | gitbook.events.bind("start", function(e, config) {
155 | // [Yihui] disable search
156 | if (config.search === false) return;
157 | collapse = !config.toc || config.toc.collapse === 'section' ||
158 | config.toc.collapse === 'subsection';
159 |
160 | // Pre-fetch search index and create the form
161 | fetchIndex()
162 | // [Yihui] recover search after the page is loaded
163 | .then(recoverSearch);
164 |
165 |
166 | // Type in search bar
167 | $(document).on("keyup", ".book-search input", function(e) {
168 | var key = (e.keyCode ? e.keyCode : e.which);
169 | // [Yihui] Escape -> close search box; Up/Down: previous/next highlighted
170 | if (key == 27) {
171 | e.preventDefault();
172 | toggleSearch(false);
173 | } else if (key == 38) {
174 | if (hi <= 0 && $highlighted) hi = $highlighted.length;
175 | hi--;
176 | scrollToHighlighted();
177 | } else if (key == 40) {
178 | hi++;
179 | if ($highlighted && hi >= $highlighted.length) hi = 0;
180 | scrollToHighlighted();
181 | }
182 | }).on("input", ".book-search input", function(e) {
183 | var q = $(this).val().trim();
184 | if (q.length === 0) {
185 | gitbook.sidebar.filter(null);
186 | gitbook.storage.remove("keyword");
187 | $('.page-inner').unhighlight(hiOpts);
188 | toggleTOC(false);
189 | } else {
190 | var results = search(q);
191 | gitbook.sidebar.filter(
192 | _.pluck(results, "path")
193 | );
194 | gitbook.storage.set("keyword", q);
195 | }
196 | });
197 |
198 | // Create the toggle search button
199 | gitbook.toolbar.createButton({
200 | icon: 'fa fa-search',
201 | label: 'Search',
202 | position: 'left',
203 | onClick: toggleSearch
204 | });
205 |
206 | // Bind keyboard to toggle search
207 | gitbook.keyboard.bind(['f'], toggleSearch);
208 | });
209 |
210 | // [Yihui] do not try to recover search; always start fresh
211 | // gitbook.events.bind("page.change", recoverSearch);
212 | });
213 |
--------------------------------------------------------------------------------
/docs/libs/gitbook-2.6.7/js/plugin-sharing.js:
--------------------------------------------------------------------------------
1 | gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
2 | var SITES = {
3 | 'github': {
4 | 'label': 'Github',
5 | 'icon': 'fa fa-github',
6 | 'onClick': function(e) {
7 | e.preventDefault();
8 | var repo = $('meta[name="github-repo"]').attr('content');
9 | if (typeof repo === 'undefined') throw("Github repo not defined");
10 | window.open("https://github.com/"+repo);
11 | }
12 | },
13 | 'facebook': {
14 | 'label': 'Facebook',
15 | 'icon': 'fa fa-facebook',
16 | 'onClick': function(e) {
17 | e.preventDefault();
18 | window.open("http://www.facebook.com/sharer/sharer.php?s=100&p[url]="+encodeURIComponent(location.href));
19 | }
20 | },
21 | 'twitter': {
22 | 'label': 'Twitter',
23 | 'icon': 'fa fa-twitter',
24 | 'onClick': function(e) {
25 | e.preventDefault();
26 | window.open("http://twitter.com/home?status="+encodeURIComponent(document.title+" "+location.href));
27 | }
28 | },
29 | 'google': {
30 | 'label': 'Google+',
31 | 'icon': 'fa fa-google-plus',
32 | 'onClick': function(e) {
33 | e.preventDefault();
34 | window.open("https://plus.google.com/share?url="+encodeURIComponent(location.href));
35 | }
36 | },
37 | 'weibo': {
38 | 'label': 'Weibo',
39 | 'icon': 'fa fa-weibo',
40 | 'onClick': function(e) {
41 | e.preventDefault();
42 | window.open("http://service.weibo.com/share/share.php?content=utf-8&url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title));
43 | }
44 | },
45 | 'instapaper': {
46 | 'label': 'Instapaper',
47 | 'icon': 'fa fa-instapaper',
48 | 'onClick': function(e) {
49 | e.preventDefault();
50 | window.open("http://www.instapaper.com/text?u="+encodeURIComponent(location.href));
51 | }
52 | },
53 | 'vk': {
54 | 'label': 'VK',
55 | 'icon': 'fa fa-vk',
56 | 'onClick': function(e) {
57 | e.preventDefault();
58 | window.open("http://vkontakte.ru/share.php?url="+encodeURIComponent(location.href));
59 | }
60 | }
61 | };
62 |
63 |
64 |
65 | gitbook.events.bind("start", function(e, config) {
66 | var opts = config.sharing;
67 | if (!opts) return;
68 |
69 | // Create dropdown menu
70 | var menu = _.chain(opts.all)
71 | .map(function(id) {
72 | var site = SITES[id];
73 |
74 | return {
75 | text: site.label,
76 | onClick: site.onClick
77 | };
78 | })
79 | .compact()
80 | .value();
81 |
82 | // Create main button with dropdown
83 | if (menu.length > 0) {
84 | gitbook.toolbar.createButton({
85 | icon: 'fa fa-share-alt',
86 | label: 'Share',
87 | position: 'right',
88 | dropdown: [menu]
89 | });
90 | }
91 |
92 | // Direct actions to share
93 | _.each(SITES, function(site, sideId) {
94 | if (!opts[sideId]) return;
95 |
96 | gitbook.toolbar.createButton({
97 | icon: site.icon,
98 | label: site.text,
99 | position: 'right',
100 | onClick: site.onClick
101 | });
102 | });
103 | });
104 | });
105 |
--------------------------------------------------------------------------------
/docs/output_10_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/learnAnalytics-DeepLearning-Azure/00df3cc0c98e8ed28bb33364138e748aa8364b5b/docs/output_10_0.png
--------------------------------------------------------------------------------
/docs/output_10_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/learnAnalytics-DeepLearning-Azure/00df3cc0c98e8ed28bb33364138e748aa8364b5b/docs/output_10_1.png
--------------------------------------------------------------------------------
/docs/output_11_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/learnAnalytics-DeepLearning-Azure/00df3cc0c98e8ed28bb33364138e748aa8364b5b/docs/output_11_0.png
--------------------------------------------------------------------------------
/docs/output_11_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/learnAnalytics-DeepLearning-Azure/00df3cc0c98e8ed28bb33364138e748aa8364b5b/docs/output_11_2.png
--------------------------------------------------------------------------------
/docs/output_12_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/learnAnalytics-DeepLearning-Azure/00df3cc0c98e8ed28bb33364138e748aa8364b5b/docs/output_12_2.png
--------------------------------------------------------------------------------
/docs/output_13_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/learnAnalytics-DeepLearning-Azure/00df3cc0c98e8ed28bb33364138e748aa8364b5b/docs/output_13_0.png
--------------------------------------------------------------------------------
/docs/output_13_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/learnAnalytics-DeepLearning-Azure/00df3cc0c98e8ed28bb33364138e748aa8364b5b/docs/output_13_1.png
--------------------------------------------------------------------------------
/docs/output_13_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/learnAnalytics-DeepLearning-Azure/00df3cc0c98e8ed28bb33364138e748aa8364b5b/docs/output_13_2.png
--------------------------------------------------------------------------------
/docs/output_5_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/learnAnalytics-DeepLearning-Azure/00df3cc0c98e8ed28bb33364138e748aa8364b5b/docs/output_5_0.png
--------------------------------------------------------------------------------
/docs/output_9_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/learnAnalytics-DeepLearning-Azure/00df3cc0c98e8ed28bb33364138e748aa8364b5b/docs/output_9_0.png
--------------------------------------------------------------------------------
/docs/output_9_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/learnAnalytics-DeepLearning-Azure/00df3cc0c98e8ed28bb33364138e748aa8364b5b/docs/output_9_1.png
--------------------------------------------------------------------------------
/docs/style.css:
--------------------------------------------------------------------------------
1 | p.caption {
2 | color: #777;
3 | margin-top: 10px;
4 | }
5 | p code {
6 | white-space: inherit;
7 | }
8 | pre {
9 | word-break: normal;
10 | word-wrap: normal;
11 | }
12 | pre code {
13 | white-space: inherit;
14 | }
15 |
--------------------------------------------------------------------------------
/license.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/learnAnalytics-DeepLearning-Azure/00df3cc0c98e8ed28bb33364138e748aa8364b5b/license.txt
--------------------------------------------------------------------------------