Spaces:
Running
Running
intermediate save
Browse files- Code/Lof/_extension.yml +8 -0
- Code/Lof/lof.lua +91 -0
- Data/1_Writing/1_Task/1_Introduction.qmd +4 -1
- Data/1_Writing/2_Task/0_Methodlogy.qmd +2 -1
- Web_Code/CSS/css_0.css +0 -26
- _quarto.yml +17 -10
- toc_lof/.gitignore +4 -0
- toc_lof/README.md +23 -0
- toc_lof/example.qmd +11 -0
- trials.qmd +11 -42
Code/Lof/_extension.yml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
title: Lof
|
2 |
+
author: Shafayet Khan Shafee
|
3 |
+
version: 1.0.0
|
4 |
+
quarto-required: ">=1.2.0"
|
5 |
+
contributes:
|
6 |
+
shortcodes:
|
7 |
+
- lof.lua
|
8 |
+
|
Code/Lof/lof.lua
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
--[[
|
2 |
+
MIT License
|
3 |
+
|
4 |
+
Copyright (c) 2023 Shafayet Khan Shafee
|
5 |
+
|
6 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7 |
+
of this software and associated documentation files (the "Software"), to deal
|
8 |
+
in the Software without restriction, including without limitation the rights
|
9 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10 |
+
copies of the Software, and to permit persons to whom the Software is
|
11 |
+
furnished to do so, subject to the following conditions:
|
12 |
+
|
13 |
+
The above copyright notice and this permission notice shall be included in all
|
14 |
+
copies or substantial portions of the Software.
|
15 |
+
|
16 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22 |
+
SOFTWARE.
|
23 |
+
]]--
|
24 |
+
|
25 |
+
|
26 |
+
return {
|
27 |
+
['lof'] = function(args, kwargs, meta)
|
28 |
+
|
29 |
+
-- args and kwargs
|
30 |
+
local file_path = str(args[1])
|
31 |
+
local extension = "." .. file_path:match("[^.]+$")
|
32 |
+
local dname = optional(str(kwargs["dname"]), "file")
|
33 |
+
local dfilename = dname .. extension
|
34 |
+
local btn_label = " " .. optional(str(kwargs["label"]), "Download") .. " "
|
35 |
+
local btn_type = optional(str(kwargs["type"]), "default")
|
36 |
+
local icon = optional(str(kwargs["icon"]), "download")
|
37 |
+
local class = " " .. optional(str(kwargs["class"]), "")
|
38 |
+
local rand = "dnldts" .. str(math.random(1, 65000))
|
39 |
+
local id = optional(str(kwargs["id"]), rand)
|
40 |
+
-- reading files
|
41 |
+
local fh = io.open(file_path, "rb")
|
42 |
+
if not fh then
|
43 |
+
io.stderr:write("Cannot open file " ..
|
44 |
+
file_path ..
|
45 |
+
" | Javed Skipping adding buttons\n")
|
46 |
+
return pandoc.Null()
|
47 |
+
else
|
48 |
+
local contents = fh:read("*all")
|
49 |
+
fh:close()
|
50 |
+
|
51 |
+
-- creating dataURI object
|
52 |
+
local b64_encoded = b64.encode(contents)
|
53 |
+
local mimetype = puremagic.via_path(file_path)
|
54 |
+
local data_uri = 'data:' .. mimetype .. ";base64," .. b64_encoded
|
55 |
+
|
56 |
+
-- js code taken from
|
57 |
+
-- https://github.com/fmmattioni/downloadthis/blob/master/R/utils.R#L59
|
58 |
+
local js = [[fetch('%s').then(res => res.blob()).then(blob => {
|
59 |
+
const downloadURL = window.URL.createObjectURL(blob);
|
60 |
+
const a = document.createElement('a');
|
61 |
+
document.body.appendChild(a);
|
62 |
+
a.href = downloadURL;
|
63 |
+
a.download = '%s'; a.click();
|
64 |
+
window.URL.revokeObjectURL(downloadURL);
|
65 |
+
document.body.removeChild(a);
|
66 |
+
});]]
|
67 |
+
|
68 |
+
local clicked = js:format(data_uri, dfilename)
|
69 |
+
|
70 |
+
-- creating button
|
71 |
+
local button =
|
72 |
+
"<button class=\"btn btn-" .. btn_type .. " downloadthis " ..
|
73 |
+
class .. "\"" ..
|
74 |
+
" id=\"" .. id .. "\"" ..
|
75 |
+
"><i class=\"bi bi-" .. icon .. "\"" .. "></i>" ..
|
76 |
+
btn_label ..
|
77 |
+
"</button>"
|
78 |
+
if quarto.doc.is_format("html:js") and quarto.doc.has_bootstrap()
|
79 |
+
then
|
80 |
+
ensureHtmlDeps()
|
81 |
+
return pandoc.RawInline('html',
|
82 |
+
"<a href=\"#" .. id .. "\"" ..
|
83 |
+
" onclick=\"" .. clicked .. "\">" .. button .. "</a>"
|
84 |
+
)
|
85 |
+
else
|
86 |
+
return pandoc.Null()
|
87 |
+
end
|
88 |
+
end
|
89 |
+
end
|
90 |
+
}
|
91 |
+
|
Data/1_Writing/1_Task/1_Introduction.qmd
CHANGED
@@ -11,10 +11,13 @@ subsection [-@sec-subsec_1_1_1_Principles] and in-depth explanations about \gls{
|
|
11 |
chapter [-@sec-chap_2_Methodlogy]. \newline
|
12 |
|
13 |
However, for a short and broad introduction to \gls{cnmc} the workflow depicted in figure @fig-fig_1_CNMC_Workflow shall be highlighted.
|
|
|
|
|
14 |
The input it receives is data of a dynamical system or space state vectors for a range of model parameter values. The two main important outcomes are some accuracy measurements and the predicted trajectory for each desired model parameter value.
|
15 |
Any inexperienced user may only have a look at the predicted trajectories to
|
16 |
quickly decide visually whether the prediction matches the trained data. Since \gls{cnmc} is written in a modular manner, meaning it can be regarded as
|
17 |
a black-box function, it can easily be integrated into other existing codes or
|
18 |
workflows. \newline
|
19 |
|
20 |
-
{#fig-fig_1_CNMC_Workflow}
|
|
|
|
11 |
chapter [-@sec-chap_2_Methodlogy]. \newline
|
12 |
|
13 |
However, for a short and broad introduction to \gls{cnmc} the workflow depicted in figure @fig-fig_1_CNMC_Workflow shall be highlighted.
|
14 |
+
|
15 |
+
|
16 |
The input it receives is data of a dynamical system or space state vectors for a range of model parameter values. The two main important outcomes are some accuracy measurements and the predicted trajectory for each desired model parameter value.
|
17 |
Any inexperienced user may only have a look at the predicted trajectories to
|
18 |
quickly decide visually whether the prediction matches the trained data. Since \gls{cnmc} is written in a modular manner, meaning it can be regarded as
|
19 |
a black-box function, it can easily be integrated into other existing codes or
|
20 |
workflows. \newline
|
21 |
|
22 |
+
{#fig-fig_1_CNMC_Workflow}
|
23 |
+
|
Data/1_Writing/2_Task/0_Methodlogy.qmd
CHANGED
@@ -3,6 +3,7 @@ In this chapter, the entire pipeline for designing the proposed
|
|
3 |
\gls{cnmc} is elaborated. For this purpose, the ideas behind
|
4 |
the individual processes are explained.
|
5 |
Results from the step tracking onwards will be presented in chapter [-@sec-ch_3].
|
|
|
6 |
Having said that, \gls{cnmc} consists of multiple main process steps or stages.
|
7 |
First, a broad overview of the \gls{cnmc}'s workflow shall be given.
|
8 |
Followed by a detailed explanation for each major operational step. The
|
@@ -52,7 +53,7 @@ ODE solution can take a few minutes. Applying \gls{cnmc} on latter dynamical
|
|
52 |
systems results in solving their \gls{ode}s for multiple different model parameter values. Thus, deploying the parallelization can be advised in the latter mentioned time-consuming \gls{ode}s.\newline
|
53 |
|
54 |
By far the most time-intensive part of the improved \gls{cnmc} is the clustering step. The main computation for this step is done with
|
55 |
-
|
56 |
computation time can be reduced drastically when multiple threads are available.
|
57 |
Other than that, *NumPy* and *SciPy* are well-optimized libraries and
|
58 |
are assumed to benefit from powerful computers. In summary, it shall be stated that a powerful machine is for sure advised when multiple dynamical
|
|
|
3 |
\gls{cnmc} is elaborated. For this purpose, the ideas behind
|
4 |
the individual processes are explained.
|
5 |
Results from the step tracking onwards will be presented in chapter [-@sec-ch_3].
|
6 |
+
|
7 |
Having said that, \gls{cnmc} consists of multiple main process steps or stages.
|
8 |
First, a broad overview of the \gls{cnmc}'s workflow shall be given.
|
9 |
Followed by a detailed explanation for each major operational step. The
|
|
|
53 |
systems results in solving their \gls{ode}s for multiple different model parameter values. Thus, deploying the parallelization can be advised in the latter mentioned time-consuming \gls{ode}s.\newline
|
54 |
|
55 |
By far the most time-intensive part of the improved \gls{cnmc} is the clustering step. The main computation for this step is done with
|
56 |
+
*Scikit-learn* [@scikit-learn]. It is heavily parallelized and the
|
57 |
computation time can be reduced drastically when multiple threads are available.
|
58 |
Other than that, *NumPy* and *SciPy* are well-optimized libraries and
|
59 |
are assumed to benefit from powerful computers. In summary, it shall be stated that a powerful machine is for sure advised when multiple dynamical
|
Web_Code/CSS/css_0.css
CHANGED
@@ -29,29 +29,3 @@
|
|
29 |
.modebar-btn--logo{
|
30 |
visibility: hidden;
|
31 |
}
|
32 |
-
|
33 |
-
|
34 |
-
/* <div id="loader_Initial" class="cl_Loader">
|
35 |
-
</div> */
|
36 |
-
|
37 |
-
/* when the main page is opened, it might take some time to load everything - for that a loader shall be made visibe. */
|
38 |
-
/* .cl_Loader {
|
39 |
-
border: 16px solid #f3f3f3;
|
40 |
-
border-radius: 50%;
|
41 |
-
border-top: 16px solid #3498db;
|
42 |
-
width: 120px;
|
43 |
-
height: 120px;
|
44 |
-
animation: spin 2s linear infinite;
|
45 |
-
position: absolute;
|
46 |
-
top: 50%;
|
47 |
-
left: 50%;
|
48 |
-
margin-top: -60px;
|
49 |
-
margin-left: -60px;
|
50 |
-
}
|
51 |
-
|
52 |
-
|
53 |
-
@keyframes spin {
|
54 |
-
0% { transform: rotate(0deg); }
|
55 |
-
100% { transform: rotate(360deg); }
|
56 |
-
}
|
57 |
-
*/
|
|
|
29 |
.modebar-btn--logo{
|
30 |
visibility: hidden;
|
31 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_quarto.yml
CHANGED
@@ -13,15 +13,19 @@ project:
|
|
13 |
|
14 |
filters:
|
15 |
# see: https://dialoa.github.io/first-line-indent/
|
16 |
-
- first-line-indent
|
17 |
|
18 |
# see: https://github.com/quarto-ext/lightbox :MIT
|
|
|
19 |
- lightbox
|
20 |
|
21 |
# https://github.com/schochastics/quarto-social-share :MIT
|
22 |
# - social-share
|
23 |
|
24 |
- Code/Gls/gls_Main.lua
|
|
|
|
|
|
|
25 |
|
26 |
# see: https://github.com/quarto-ext/lightbox
|
27 |
lightbox:
|
@@ -42,18 +46,19 @@ lightbox:
|
|
42 |
|
43 |
# see: https://quarto.org/docs/reference/formats/html.html#table-of-contents
|
44 |
toc-depth: 4
|
45 |
-
toc-location: right
|
|
|
46 |
|
47 |
# number-sections: false
|
48 |
number-depth: 4
|
49 |
|
50 |
crossref:
|
51 |
# see: https://quarto.org/docs/authoring/cross-references.html#options
|
52 |
-
fig-prefix: ""
|
53 |
-
eq-prefix: ""
|
54 |
-
tbl-prefix: ""
|
55 |
-
sec-prefix: ""
|
56 |
-
title-delim: —
|
57 |
|
58 |
|
59 |
# ============================================================================ #
|
@@ -117,12 +122,10 @@ cluster-based network modeling"
|
|
117 |
- Data/1_Writing/0_Deco/1_Erkl.qmd
|
118 |
|
119 |
# add pdfs intro and tasks
|
120 |
-
- Data/1_Writing/0_Deco/
|
121 |
|
122 |
- Data/1_Writing/0_Deco/2_1_Abstract.qmd
|
123 |
|
124 |
-
- Data/1_Writing/0_Deco/2_0_Task_Def.qmd
|
125 |
-
|
126 |
# toc, list figures, list tables
|
127 |
|
128 |
- Data/1_Writing/0_Deco/3_Used_Abbrev.qmd
|
@@ -211,6 +214,10 @@ format:
|
|
211 |
# see: https://dialoa.github.io/first-line-indent/
|
212 |
indent: false
|
213 |
keep-tex: true
|
|
|
|
|
|
|
|
|
214 |
|
215 |
# make the table captions appear at the bottom
|
216 |
tbl-cap-location: bottom
|
|
|
13 |
|
14 |
filters:
|
15 |
# see: https://dialoa.github.io/first-line-indent/
|
16 |
+
# - first-line-indent
|
17 |
|
18 |
# see: https://github.com/quarto-ext/lightbox :MIT
|
19 |
+
# destroys the figure cross referecning, because it removes the fig id
|
20 |
- lightbox
|
21 |
|
22 |
# https://github.com/schochastics/quarto-social-share :MIT
|
23 |
# - social-share
|
24 |
|
25 |
- Code/Gls/gls_Main.lua
|
26 |
+
# - Code/Lof/lof.lua
|
27 |
+
# - Lof
|
28 |
+
# - toc_lof
|
29 |
|
30 |
# see: https://github.com/quarto-ext/lightbox
|
31 |
lightbox:
|
|
|
46 |
|
47 |
# see: https://quarto.org/docs/reference/formats/html.html#table-of-contents
|
48 |
toc-depth: 4
|
49 |
+
toc-location: right
|
50 |
+
|
51 |
|
52 |
# number-sections: false
|
53 |
number-depth: 4
|
54 |
|
55 |
crossref:
|
56 |
# see: https://quarto.org/docs/authoring/cross-references.html#options
|
57 |
+
fig-prefix: "" # (default is "Figure")
|
58 |
+
eq-prefix: "" # (default is "Equation")
|
59 |
+
tbl-prefix: "" # (default is "Table")
|
60 |
+
sec-prefix: "" # default is Chapter
|
61 |
+
title-delim: — # (default is ":")
|
62 |
|
63 |
|
64 |
# ============================================================================ #
|
|
|
122 |
- Data/1_Writing/0_Deco/1_Erkl.qmd
|
123 |
|
124 |
# add pdfs intro and tasks
|
125 |
+
- Data/1_Writing/0_Deco/2_0_Task_Def.qmd
|
126 |
|
127 |
- Data/1_Writing/0_Deco/2_1_Abstract.qmd
|
128 |
|
|
|
|
|
129 |
# toc, list figures, list tables
|
130 |
|
131 |
- Data/1_Writing/0_Deco/3_Used_Abbrev.qmd
|
|
|
214 |
# see: https://dialoa.github.io/first-line-indent/
|
215 |
indent: false
|
216 |
keep-tex: true
|
217 |
+
number-sections: true
|
218 |
+
lof: true
|
219 |
+
lot: true
|
220 |
+
toc: true
|
221 |
|
222 |
# make the table captions appear at the bottom
|
223 |
tbl-cap-location: bottom
|
toc_lof/.gitignore
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.html
|
2 |
+
*.pdf
|
3 |
+
*_files/
|
4 |
+
/.luarc.json
|
toc_lof/README.md
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Toc_lof Extension For Quarto
|
2 |
+
|
3 |
+
_TODO_: Add a short description of your extension.
|
4 |
+
|
5 |
+
## Installing
|
6 |
+
|
7 |
+
_TODO_: Replace the `<github-organization>` with your GitHub organization.
|
8 |
+
|
9 |
+
```bash
|
10 |
+
quarto add <github-organization>/toc_lof
|
11 |
+
```
|
12 |
+
|
13 |
+
This will install the extension under the `_extensions` subdirectory.
|
14 |
+
If you're using version control, you will want to check in this directory.
|
15 |
+
|
16 |
+
## Using
|
17 |
+
|
18 |
+
_TODO_: Describe how to use your extension.
|
19 |
+
|
20 |
+
## Example
|
21 |
+
|
22 |
+
Here is the source code for a minimal example: [example.qmd](example.qmd).
|
23 |
+
|
toc_lof/example.qmd
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: "Toc_lof Example"
|
3 |
+
filters:
|
4 |
+
- toc_lof
|
5 |
+
---
|
6 |
+
|
7 |
+
## Heading
|
8 |
+
|
9 |
+
This filter adds formatting to heading text.
|
10 |
+
|
11 |
+
|
trials.qmd
CHANGED
@@ -1,45 +1,14 @@
|
|
1 |
-
# Trials
|
2 |
-
|
3 |
Thissince \gls{cnmc}
|
|
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
// when th full page is laoded --> slows down quite abite
|
13 |
-
window.addEventListener("load", function() {
|
14 |
-
// when the tornada plotly plot is shown let the riksha disappear
|
15 |
-
const player = document.querySelector('dotlottie-player');
|
16 |
-
player.load('./Data/7_Animation/Riksha.lottie');
|
17 |
-
});
|
18 |
-
|
19 |
-
// this without addEventListener is much faster
|
20 |
-
// const player = document.querySelector('dotlottie-player');
|
21 |
-
// player.load('./Data/7_Animation/Riksha.lottie');
|
22 |
-
</script
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
<div>
|
27 |
-
<h1>Hello, World!</h1>
|
28 |
-
<p>This is my first HTML code.</p>
|
29 |
-
</div>
|
30 |
-
|
31 |
-
<div>
|
32 |
-
<h1>Hello, World!</h1>
|
33 |
-
<script>
|
34 |
-
document.write("This text is generated by JavaScript!");
|
35 |
-
</script>
|
36 |
-
</div>
|
37 |
-
|
38 |
-
|
39 |
-
<div>
|
40 |
-
<h1>Final header</h1>
|
41 |
-
<p>This is my first HTML code.</p>
|
42 |
-
</div>
|
43 |
-
|
44 |
|
45 |
-
|
|
|
|
1 |
+
# Trials {.unnumbered}
|
2 |
+
asdasd
|
3 |
Thissince \gls{cnmc}
|
4 |
+
Hello thre
|
5 |
|
6 |
+
## ANd some more
|
7 |
+
asdad
|
8 |
+
asd
|
9 |
+
ad
|
10 |
+
asf
|
11 |
+
as
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
+
{{< lof image.png >}}
|
14 |
+
{{< downloadthis image.png >}}
|