Skip to content

Commit

Permalink
draft of lab 13
Browse files Browse the repository at this point in the history
  • Loading branch information
kbvernon committed Apr 12, 2022
1 parent e359a77 commit 0aa994b
Show file tree
Hide file tree
Showing 136 changed files with 37,706 additions and 4 deletions.
1,064 changes: 1,064 additions & 0 deletions docs/exercises/13-Generalized_Additive_Models.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(fonts/KFOmCnqEu92Fr1Me5g.woff) format('woff');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url(fonts/KFOlCnqEu92Fr1MmEU9vAA.woff) format('woff');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(fonts/KFOlCnqEu92Fr1MmWUlvAA.woff) format('woff');
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Inform the world that we have the ability to use BS3 nav/navbar markup in BS4
window.BS3_COMPAT = true;

// This logic needs to execute after both the BS4+ (new) as well as BS3 (legacy)
// jQuery plugins have been registered. For BS5, plugin registration happens
// after DOM content is loaded, which is why we do the same here.
// https://github.com/twbs/bootstrap/blob/08139c22/js/dist/tab.js#L87
$(function() {

// The legacy plugin needs to be registered after the new one
if (!$.fn.tab.Constructor.VERSION.match(/^3\./)) {
(console.warn || console.error || console.log)("bs3compat.js couldn't find bs3 tab impl; bs3 tabs will not be properly supported");
return;
}
var legacyTabPlugin = $.fn.tab.noConflict();

if (!$.fn.tab || !$.fn.tab.Constructor || !$.fn.tab.noConflict) {
(console.warn || console.error || console.log)("bs3compat.js couldn't find a jQuery tab impl; bs3 tabs will not be properly supported");
}
var newTabPlugin = $.fn.tab.noConflict();

// Re-define the tab click event
// https://github.com/twbs/bootstrap/blob/08139c2/js/src/tab.js#L33
var EVENT_KEY = "click.bs.tab.data-api";
$(document).off(EVENT_KEY);

var SELECTOR = '[data-toggle="tab"], [data-toggle="pill"], [data-bs-toggle="tab"], [data-bs-toggle="pill"]';
$(document).on(EVENT_KEY, SELECTOR, function(event) {
event.preventDefault();
$(this).tab("show");
});

function TabPlugin(config) {
// Legacy (bs3) tabs: li.active > a
// New (bs4+) tabs: li.nav-item > a.active.nav-link
var legacy = $(this).closest(".nav").find("li:not(.dropdown).active > a").length > 0;
var plugin = legacy ? legacyTabPlugin : newTabPlugin;
plugin.call($(this), config);
}

var noconflict = $.fn.tab;
$.fn.tab = TabPlugin;
$.fn.tab.Constructor = newTabPlugin.Constructor;
$.fn.tab.noConflict = function() {
$.fn.tab = noconflict;
return TabPlugin;
};
});
157 changes: 157 additions & 0 deletions docs/exercises/13-Generalized_Additive_Models_files/bs3compat/tabs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
/* ========================================================================
* Bootstrap: tab.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#tabs
* ========================================================================
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

// Register tab plugin after DOM content loaded in order to
// override BS5's plugin
// https://github.com/twbs/bootstrap/blob/08139c22/js/dist/tab.js#L87
$(function() {
'use strict';

// TAB CLASS DEFINITION
// ====================

var Tab = function (element) {
// jscs:disable requireDollarBeforejQueryAssignment
this.element = $(element)
// jscs:enable requireDollarBeforejQueryAssignment
}

Tab.VERSION = '3.4.1'

Tab.TRANSITION_DURATION = 150

Tab.prototype.show = function () {
var $this = this.element
var $ul = $this.closest('ul:not(.dropdown-menu)')
var selector = $this.data('target')

if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}

if ($this.parent('li').hasClass('active')) return

var $previous = $ul.find('.active:last a')
var hideEvent = $.Event('hide.bs.tab', {
relatedTarget: $this[0]
})
var showEvent = $.Event('show.bs.tab', {
relatedTarget: $previous[0]
})

$previous.trigger(hideEvent)
$this.trigger(showEvent)

if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return

var $target = $(document).find(selector)

this.activate($this.closest('li'), $ul)
this.activate($target, $target.parent(), function () {
$previous.trigger({
type: 'hidden.bs.tab',
relatedTarget: $this[0]
})
$this.trigger({
type: 'shown.bs.tab',
relatedTarget: $previous[0]
})
})
}

Tab.prototype.activate = function (element, container, callback) {
var $active = container.find('> .active')
var transition = callback
&& $.support.transition
&& ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)

function next() {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
.end()
.find('[data-toggle="tab"]')
.attr('aria-expanded', false)

element
.addClass('active')
.find('[data-toggle="tab"]')
.attr('aria-expanded', true)

if (transition) {
element[0].offsetWidth // reflow for transition
element.addClass('in')
} else {
element.removeClass('fade')
}

if (element.parent('.dropdown-menu').length) {
element
.closest('li.dropdown')
.addClass('active')
.end()
.find('[data-toggle="tab"]')
.attr('aria-expanded', true)
}

callback && callback()
}

$active.length && transition ?
$active
.one('bsTransitionEnd', next)
.emulateTransitionEnd(Tab.TRANSITION_DURATION) :
next()

$active.removeClass('in')
}


// TAB PLUGIN DEFINITION
// =====================

function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.tab')

if (!data) $this.data('bs.tab', (data = new Tab(this)))
if (typeof option == 'string') data[option]()
})
}

var old = $.fn.tab

$.fn.tab = Plugin
$.fn.tab.Constructor = Tab


// TAB NO CONFLICT
// ===============

$.fn.tab.noConflict = function () {
$.fn.tab = old
return this
}


// TAB DATA-API
// ============

var clickHandler = function (e) {
e.preventDefault()
Plugin.call($(this), 'show')
}

$(document)
.on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
.on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)

});
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/* ========================================================================
* Bootstrap: transition.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#transitions
* ========================================================================
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/v3-dev/LICENSE)
* ======================================================================== */


+function ($) {
'use strict';

// CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)
// ============================================================

function transitionEnd() {
var el = document.createElement('bootstrap')

var transEndEventNames = {
WebkitTransition : 'webkitTransitionEnd',
MozTransition : 'transitionend',
OTransition : 'oTransitionEnd otransitionend',
transition : 'transitionend'
}

for (var name in transEndEventNames) {
if (el.style[name] !== undefined) {
return { end: transEndEventNames[name] }
}
}

return false // explicit for ie8 ( ._.)
}

// https://blog.alexmaccaw.com/css-transitions
$.fn.emulateTransitionEnd = function (duration) {
var called = false
var $el = this
$(this).one('bsTransitionEnd', function () { called = true })
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
setTimeout(callback, duration)
return this
}

$(function () {
$.support.transition = transitionEnd()

if (!$.support.transition) return

$.event.special.bsTransitionEnd = {
bindType: $.support.transition.end,
delegateType: $.support.transition.end,
handle: function (e) {
if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
}
}
})

}(jQuery);

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Loading

0 comments on commit 0aa994b

Please sign in to comment.