Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klaus Wölfel
wendelin
Commits
6d911518
Commit
6d911518
authored
Jul 05, 2019
by
Matevz Golob
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add gadgets to be used for the tutorial
parent
c5e8dcba
Changes
13
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
9697 additions
and
0 deletions
+9697
-0
bt5/erp5_wendelin_tutorial/PathTemplateItem/web_page_module/rjs_gadget_ndarray_html.html
...TemplateItem/web_page_module/rjs_gadget_ndarray_html.html
+19
-0
bt5/erp5_wendelin_tutorial/PathTemplateItem/web_page_module/rjs_gadget_ndarray_html.xml
...hTemplateItem/web_page_module/rjs_gadget_ndarray_html.xml
+324
-0
bt5/erp5_wendelin_tutorial/PathTemplateItem/web_page_module/rjs_gadget_ndarray_js.js
...PathTemplateItem/web_page_module/rjs_gadget_ndarray_js.js
+90
-0
bt5/erp5_wendelin_tutorial/PathTemplateItem/web_page_module/rjs_gadget_ndarray_js.xml
...athTemplateItem/web_page_module/rjs_gadget_ndarray_js.xml
+320
-0
bt5/erp5_wendelin_tutorial/PathTemplateItem/web_page_module/rjs_ndarray_bundle_js.js
...PathTemplateItem/web_page_module/rjs_ndarray_bundle_js.js
+8611
-0
bt5/erp5_wendelin_tutorial/PathTemplateItem/web_page_module/rjs_ndarray_bundle_js.xml
...athTemplateItem/web_page_module/rjs_ndarray_bundle_js.xml
+320
-0
bt5/erp5_wendelin_tutorial/bt/description
bt5/erp5_wendelin_tutorial/bt/description
+1
-0
bt5/erp5_wendelin_tutorial/bt/template_format_version
bt5/erp5_wendelin_tutorial/bt/template_format_version
+1
-0
bt5/erp5_wendelin_tutorial/bt/template_keep_last_workflow_history_only_path_list
...ial/bt/template_keep_last_workflow_history_only_path_list
+3
-0
bt5/erp5_wendelin_tutorial/bt/template_keep_workflow_path_list
...rp5_wendelin_tutorial/bt/template_keep_workflow_path_list
+3
-0
bt5/erp5_wendelin_tutorial/bt/template_path_list
bt5/erp5_wendelin_tutorial/bt/template_path_list
+3
-0
bt5/erp5_wendelin_tutorial/bt/title
bt5/erp5_wendelin_tutorial/bt/title
+1
-0
bt5/erp5_wendelin_tutorial/bt/version
bt5/erp5_wendelin_tutorial/bt/version
+1
-0
No files found.
bt5/erp5_wendelin_tutorial/PathTemplateItem/web_page_module/rjs_gadget_ndarray_html.html
0 → 100644
View file @
6d911518
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
<title>
Ndarray Gadget
</title>
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"ndarray_bundle.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_ndarray.js"
type=
"text/javascript"
></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
bt5/erp5_wendelin_tutorial/PathTemplateItem/web_page_module/rjs_gadget_ndarray_html.xml
0 → 100644
View file @
6d911518
This diff is collapsed.
Click to expand it.
bt5/erp5_wendelin_tutorial/PathTemplateItem/web_page_module/rjs_gadget_ndarray_js.js
0 → 100644
View file @
6d911518
/*global window, rJS, nj */
/*jslint indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
nj
)
{
"
use strict
"
;
// parse dict in string in python pprint.pfromat
function
parserPythonPformatDict
(
s
)
{
s
=
s
.
replace
(
/False/g
,
"
false
"
)
.
replace
(
/True/g
,
"
true
"
)
.
replace
(
/
\(
/g
,
"
[
"
)
.
replace
(
/
\)
/g
,
"
]
"
)
.
replace
(
/, }/g
,
"
}
"
)
.
replace
(
/
\'
/g
,
'
"
'
)
return
JSON
.
parse
(
s
);
}
// Initial idea from https://github.com/BillMills/numpychuck/blob/master/helpers.js
// https://github.com/numpy/numpy/blob/master/doc/neps/npy-format.rst#format-specification-version-10
function
unpackNPY
(
dv
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
var
HEADER_LEN
=
dv
.
getUint16
(
8
,
true
),
offset
=
HEADER_LEN
+
10
,
dataLength
=
dv
.
byteLength
-
offset
,
i
,
header_string
=
''
,
char
,
header_dict
,
value_length
,
getValue
,
shape
=
[],
array
=
[],
value
;
for
(
i
=
10
;
i
<=
offset
;
i
++
)
{
char
=
String
.
fromCharCode
(
dv
.
getUint8
(
i
,
true
));
header_string
+=
char
;
if
(
char
==
'
}
'
)
{
break
;
}
}
header_dict
=
parserPythonPformatDict
(
header_string
);
return
unpackArray
(
dv
,
header_dict
,
offset
);
});
}
// Initial idea from https://github.com/BillMills/numpychuck/blob/master/helpers.js
// https://github.com/numpy/numpy/blob/master/doc/neps/npy-format.rst#format-specification-version-10
function
unpackArray
(
dv
,
header_dict
,
offset
)
{
var
i
,
array
=
[];
if
(
offset
===
undefined
)
{
offset
=
0
;
}
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
if
((
header_dict
.
descr
===
"
<i8
"
)
&
(
header_dict
.
fortran_order
==
false
))
{
for
(
i
=
0
;
i
<
dv
.
byteLength
-
offset
-
1
;
i
+=
8
)
{
array
.
push
(
dv
.
getUint8
(
i
+
offset
,
true
))
}
}
else
if
(
header_dict
.
descr
==
"
<f8
"
&
(
header_dict
.
fortran_order
==
false
))
{
for
(
i
=
0
;
i
<
dv
.
byteLength
-
offset
-
1
;
i
+=
8
)
{
array
.
push
(
dv
.
getFloat64
(
i
+
offset
,
true
))
}
}
else
{
throw
(
"
Unsupported dtype:
"
+
header_dict
.
descr
+
"
with fortran_order =
"
+
header_dict
.
fortran_order
);
}
return
nj
.
ndarray
(
array
,
header_dict
.
shape
);
});
}
rJS
(
window
)
.
ready
(
function
(
gadget
)
{
})
.
declareMethod
(
'
unpackNPY
'
,
function
()
{
return
unpackNPY
(
arguments
[
0
]);
})
.
declareMethod
(
'
unpackArray
'
,
function
()
{
return
unpackArray
(
arguments
[
0
],
arguments
[
1
]);
})
}(
window
,
rJS
,
nj
));
\ No newline at end of file
bt5/erp5_wendelin_tutorial/PathTemplateItem/web_page_module/rjs_gadget_ndarray_js.xml
0 → 100644
View file @
6d911518
This diff is collapsed.
Click to expand it.
bt5/erp5_wendelin_tutorial/PathTemplateItem/web_page_module/rjs_ndarray_bundle_js.js
0 → 100644
View file @
6d911518
This diff is collapsed.
Click to expand it.
bt5/erp5_wendelin_tutorial/PathTemplateItem/web_page_module/rjs_ndarray_bundle_js.xml
0 → 100644
View file @
6d911518
This diff is collapsed.
Click to expand it.
bt5/erp5_wendelin_tutorial/bt/description
0 → 100644
View file @
6d911518
Includes gadgets used in the Wendelin tutorial.
\ No newline at end of file
bt5/erp5_wendelin_tutorial/bt/template_format_version
0 → 100644
View file @
6d911518
1
\ No newline at end of file
bt5/erp5_wendelin_tutorial/bt/template_keep_last_workflow_history_only_path_list
0 → 100644
View file @
6d911518
web_page_module/rjs_gadget_ndarray_html
web_page_module/rjs_gadget_ndarray_js
web_page_module/rjs_ndarray_bundle_js
\ No newline at end of file
bt5/erp5_wendelin_tutorial/bt/template_keep_workflow_path_list
0 → 100644
View file @
6d911518
web_page_module/rjs_gadget_ndarray_html
web_page_module/rjs_gadget_ndarray_js
web_page_module/rjs_ndarray_bundle_js
\ No newline at end of file
bt5/erp5_wendelin_tutorial/bt/template_path_list
0 → 100644
View file @
6d911518
web_page_module/rjs_gadget_ndarray_html
web_page_module/rjs_gadget_ndarray_js
web_page_module/rjs_ndarray_bundle_js
\ No newline at end of file
bt5/erp5_wendelin_tutorial/bt/title
0 → 100644
View file @
6d911518
erp5_wendelin_tutorial
\ No newline at end of file
bt5/erp5_wendelin_tutorial/bt/version
0 → 100644
View file @
6d911518
001
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment