Skip to content

Commit d783a1e

Browse files
committed
upload _static
1 parent 32ebc48 commit d783a1e

133 files changed

Lines changed: 8258 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/_static/basic.css

Lines changed: 914 additions & 0 deletions
Large diffs are not rendered by default.

docs/_static/doctools.js

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
/*
2+
* Base JavaScript utilities for all Sphinx HTML documentation.
3+
*/
4+
"use strict";
5+
6+
const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
7+
"TEXTAREA",
8+
"INPUT",
9+
"SELECT",
10+
"BUTTON",
11+
]);
12+
13+
const _ready = (callback) => {
14+
if (document.readyState !== "loading") {
15+
callback();
16+
} else {
17+
document.addEventListener("DOMContentLoaded", callback);
18+
}
19+
};
20+
21+
/**
22+
* Small JavaScript module for the documentation.
23+
*/
24+
const Documentation = {
25+
init: () => {
26+
Documentation.initDomainIndexTable();
27+
Documentation.initOnKeyListeners();
28+
},
29+
30+
/**
31+
* i18n support
32+
*/
33+
TRANSLATIONS: {},
34+
PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
35+
LOCALE: "unknown",
36+
37+
// gettext and ngettext don't access this so that the functions
38+
// can safely bound to a different name (_ = Documentation.gettext)
39+
gettext: (string) => {
40+
const translated = Documentation.TRANSLATIONS[string];
41+
switch (typeof translated) {
42+
case "undefined":
43+
return string; // no translation
44+
case "string":
45+
return translated; // translation exists
46+
default:
47+
return translated[0]; // (singular, plural) translation tuple exists
48+
}
49+
},
50+
51+
ngettext: (singular, plural, n) => {
52+
const translated = Documentation.TRANSLATIONS[singular];
53+
if (typeof translated !== "undefined")
54+
return translated[Documentation.PLURAL_EXPR(n)];
55+
return n === 1 ? singular : plural;
56+
},
57+
58+
addTranslations: (catalog) => {
59+
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
60+
Documentation.PLURAL_EXPR = new Function(
61+
"n",
62+
`return (${catalog.plural_expr})`
63+
);
64+
Documentation.LOCALE = catalog.locale;
65+
},
66+
67+
/**
68+
* helper function to focus on search bar
69+
*/
70+
focusSearchBar: () => {
71+
document.querySelectorAll("input[name=q]")[0]?.focus();
72+
},
73+
74+
/**
75+
* Initialise the domain index toggle buttons
76+
*/
77+
initDomainIndexTable: () => {
78+
const toggler = (el) => {
79+
const idNumber = el.id.substr(7);
80+
const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
81+
if (el.src.substr(-9) === "minus.png") {
82+
el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
83+
toggledRows.forEach((el) => (el.style.display = "none"));
84+
} else {
85+
el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
86+
toggledRows.forEach((el) => (el.style.display = ""));
87+
}
88+
};
89+
90+
const togglerElements = document.querySelectorAll("img.toggler");
91+
togglerElements.forEach((el) =>
92+
el.addEventListener("click", (event) => toggler(event.currentTarget))
93+
);
94+
togglerElements.forEach((el) => (el.style.display = ""));
95+
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
96+
},
97+
98+
initOnKeyListeners: () => {
99+
// only install a listener if it is really needed
100+
if (
101+
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
102+
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
103+
)
104+
return;
105+
106+
document.addEventListener("keydown", (event) => {
107+
// bail for input elements
108+
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
109+
// bail with special keys
110+
if (event.altKey || event.ctrlKey || event.metaKey) return;
111+
112+
if (!event.shiftKey) {
113+
switch (event.key) {
114+
case "ArrowLeft":
115+
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
116+
117+
const prevLink = document.querySelector('link[rel="prev"]');
118+
if (prevLink && prevLink.href) {
119+
window.location.href = prevLink.href;
120+
event.preventDefault();
121+
}
122+
break;
123+
case "ArrowRight":
124+
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
125+
126+
const nextLink = document.querySelector('link[rel="next"]');
127+
if (nextLink && nextLink.href) {
128+
window.location.href = nextLink.href;
129+
event.preventDefault();
130+
}
131+
break;
132+
}
133+
}
134+
135+
// some keyboard layouts may need Shift to get /
136+
switch (event.key) {
137+
case "/":
138+
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
139+
Documentation.focusSearchBar();
140+
event.preventDefault();
141+
}
142+
});
143+
},
144+
};
145+
146+
// quick alias for translations
147+
const _ = Documentation.gettext;
148+
149+
_ready(Documentation.init);
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const DOCUMENTATION_OPTIONS = {
2+
VERSION: '1.00',
3+
LANGUAGE: 'en',
4+
COLLAPSE_INDEX: false,
5+
BUILDER: 'html',
6+
FILE_SUFFIX: '.html',
7+
LINK_SUFFIX: '.html',
8+
HAS_SOURCE: true,
9+
SOURCELINK_SUFFIX: '',
10+
NAVIGATION_WITH_KEYS: false,
11+
SHOW_SEARCH_SUMMARY: true,
12+
ENABLE_SEARCH_SHORTCUTS: true,
13+
};

docs/_static/file.png

286 Bytes
Loading
Lines changed: 19 additions & 0 deletions
Loading

docs/_static/images/logo_colab.png

7.42 KB
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

docs/_static/language_data.js

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
/*
2+
* This script contains the language-specific data used by searchtools.js,
3+
* namely the list of stopwords, stemmer, scorer and splitter.
4+
*/
5+
6+
var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
7+
8+
9+
/* Non-minified version is copied as a separate JS file, if available */
10+
11+
/**
12+
* Porter Stemmer
13+
*/
14+
var Stemmer = function() {
15+
16+
var step2list = {
17+
ational: 'ate',
18+
tional: 'tion',
19+
enci: 'ence',
20+
anci: 'ance',
21+
izer: 'ize',
22+
bli: 'ble',
23+
alli: 'al',
24+
entli: 'ent',
25+
eli: 'e',
26+
ousli: 'ous',
27+
ization: 'ize',
28+
ation: 'ate',
29+
ator: 'ate',
30+
alism: 'al',
31+
iveness: 'ive',
32+
fulness: 'ful',
33+
ousness: 'ous',
34+
aliti: 'al',
35+
iviti: 'ive',
36+
biliti: 'ble',
37+
logi: 'log'
38+
};
39+
40+
var step3list = {
41+
icate: 'ic',
42+
ative: '',
43+
alize: 'al',
44+
iciti: 'ic',
45+
ical: 'ic',
46+
ful: '',
47+
ness: ''
48+
};
49+
50+
var c = "[^aeiou]"; // consonant
51+
var v = "[aeiouy]"; // vowel
52+
var C = c + "[^aeiouy]*"; // consonant sequence
53+
var V = v + "[aeiou]*"; // vowel sequence
54+
55+
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
56+
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
57+
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
58+
var s_v = "^(" + C + ")?" + v; // vowel in stem
59+
60+
this.stemWord = function (w) {
61+
var stem;
62+
var suffix;
63+
var firstch;
64+
var origword = w;
65+
66+
if (w.length < 3)
67+
return w;
68+
69+
var re;
70+
var re2;
71+
var re3;
72+
var re4;
73+
74+
firstch = w.substr(0,1);
75+
if (firstch == "y")
76+
w = firstch.toUpperCase() + w.substr(1);
77+
78+
// Step 1a
79+
re = /^(.+?)(ss|i)es$/;
80+
re2 = /^(.+?)([^s])s$/;
81+
82+
if (re.test(w))
83+
w = w.replace(re,"$1$2");
84+
else if (re2.test(w))
85+
w = w.replace(re2,"$1$2");
86+
87+
// Step 1b
88+
re = /^(.+?)eed$/;
89+
re2 = /^(.+?)(ed|ing)$/;
90+
if (re.test(w)) {
91+
var fp = re.exec(w);
92+
re = new RegExp(mgr0);
93+
if (re.test(fp[1])) {
94+
re = /.$/;
95+
w = w.replace(re,"");
96+
}
97+
}
98+
else if (re2.test(w)) {
99+
var fp = re2.exec(w);
100+
stem = fp[1];
101+
re2 = new RegExp(s_v);
102+
if (re2.test(stem)) {
103+
w = stem;
104+
re2 = /(at|bl|iz)$/;
105+
re3 = new RegExp("([^aeiouylsz])\\1$");
106+
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
107+
if (re2.test(w))
108+
w = w + "e";
109+
else if (re3.test(w)) {
110+
re = /.$/;
111+
w = w.replace(re,"");
112+
}
113+
else if (re4.test(w))
114+
w = w + "e";
115+
}
116+
}
117+
118+
// Step 1c
119+
re = /^(.+?)y$/;
120+
if (re.test(w)) {
121+
var fp = re.exec(w);
122+
stem = fp[1];
123+
re = new RegExp(s_v);
124+
if (re.test(stem))
125+
w = stem + "i";
126+
}
127+
128+
// Step 2
129+
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
130+
if (re.test(w)) {
131+
var fp = re.exec(w);
132+
stem = fp[1];
133+
suffix = fp[2];
134+
re = new RegExp(mgr0);
135+
if (re.test(stem))
136+
w = stem + step2list[suffix];
137+
}
138+
139+
// Step 3
140+
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
141+
if (re.test(w)) {
142+
var fp = re.exec(w);
143+
stem = fp[1];
144+
suffix = fp[2];
145+
re = new RegExp(mgr0);
146+
if (re.test(stem))
147+
w = stem + step3list[suffix];
148+
}
149+
150+
// Step 4
151+
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
152+
re2 = /^(.+?)(s|t)(ion)$/;
153+
if (re.test(w)) {
154+
var fp = re.exec(w);
155+
stem = fp[1];
156+
re = new RegExp(mgr1);
157+
if (re.test(stem))
158+
w = stem;
159+
}
160+
else if (re2.test(w)) {
161+
var fp = re2.exec(w);
162+
stem = fp[1] + fp[2];
163+
re2 = new RegExp(mgr1);
164+
if (re2.test(stem))
165+
w = stem;
166+
}
167+
168+
// Step 5
169+
re = /^(.+?)e$/;
170+
if (re.test(w)) {
171+
var fp = re.exec(w);
172+
stem = fp[1];
173+
re = new RegExp(mgr1);
174+
re2 = new RegExp(meq1);
175+
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
176+
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
177+
w = stem;
178+
}
179+
re = /ll$/;
180+
re2 = new RegExp(mgr1);
181+
if (re.test(w) && re2.test(w)) {
182+
re = /.$/;
183+
w = w.replace(re,"");
184+
}
185+
186+
// and turn initial Y back to y
187+
if (firstch == "y")
188+
w = firstch.toLowerCase() + w.substr(1);
189+
return w;
190+
}
191+
}
192+
1.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)