Browse Source

updated structure

Médéric Hurier 2 months ago
parent
commit
10a745822d

+ 1
- 0
.coveragerc View File

@@ -0,0 +1 @@
1
+covers/coverage.ini

+ 1
- 0
black.ini View File

@@ -0,0 +1 @@
1
+formats/black.ini

+ 4
- 3
covers/Makefile View File

@@ -4,6 +4,7 @@ NAME = $(shell .venv/bin/python setup.py --name)
4 4
 
5 5
 init-covers: .venv
6 6
 	.venv/bin/pip install '.[covers]'
7
+	ln -fs 'covers/coverage.ini' '.coveragerc'
7 8
 
8 9
 clean-covers:
9 10
 	find . -name '.mypy_cache' -exec rm -fr {} +
@@ -11,10 +12,10 @@ clean-covers:
11 12
 commit-covers: report;
12 13
 
13 14
 cover: .venv
14
-	.venv/bin/coverage run --rcfile="covers/coverage.ini" --source ${NAME} -m pytest -q
15
+	.venv/bin/coverage run --source ${NAME} -m pytest -q
15 16
 
16 17
 report: .venv cover
17
-	.venv/bin/coverage report --rcfile="covers/coverage.ini"
18
+	.venv/bin/coverage report
18 19
 
19 20
 htmlcov: .venv cover
20
-	.venv/bin/coverage html --rcfile="covers/coverage.ini" --directory="covers/htmlcov"
21
+	.venv/bin/coverage html --directory="covers/htmlcov"

+ 0
- 584
covers/htmlcov/coverage_html.js View File

@@ -1,584 +0,0 @@
1
-// Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
2
-// For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
3
-
4
-// Coverage.py HTML report browser code.
5
-/*jslint browser: true, sloppy: true, vars: true, plusplus: true, maxerr: 50, indent: 4 */
6
-/*global coverage: true, document, window, $ */
7
-
8
-coverage = {};
9
-
10
-// Find all the elements with shortkey_* class, and use them to assign a shortcut key.
11
-coverage.assign_shortkeys = function () {
12
-    $("*[class*='shortkey_']").each(function (i, e) {
13
-        $.each($(e).attr("class").split(" "), function (i, c) {
14
-            if (/^shortkey_/.test(c)) {
15
-                $(document).bind('keydown', c.substr(9), function () {
16
-                    $(e).click();
17
-                });
18
-            }
19
-        });
20
-    });
21
-};
22
-
23
-// Create the events for the help panel.
24
-coverage.wire_up_help_panel = function () {
25
-    $("#keyboard_icon").click(function () {
26
-        // Show the help panel, and position it so the keyboard icon in the
27
-        // panel is in the same place as the keyboard icon in the header.
28
-        $(".help_panel").show();
29
-        var koff = $("#keyboard_icon").offset();
30
-        var poff = $("#panel_icon").position();
31
-        $(".help_panel").offset({
32
-            top: koff.top-poff.top,
33
-            left: koff.left-poff.left
34
-        });
35
-    });
36
-    $("#panel_icon").click(function () {
37
-        $(".help_panel").hide();
38
-    });
39
-};
40
-
41
-// Create the events for the filter box.
42
-coverage.wire_up_filter = function () {
43
-    // Cache elements.
44
-    var table = $("table.index");
45
-    var table_rows = table.find("tbody tr");
46
-    var table_row_names = table_rows.find("td.name a");
47
-    var no_rows = $("#no_rows");
48
-
49
-    // Create a duplicate table footer that we can modify with dynamic summed values.
50
-    var table_footer = $("table.index tfoot tr");
51
-    var table_dynamic_footer = table_footer.clone();
52
-    table_dynamic_footer.attr('class', 'total_dynamic hidden');
53
-    table_footer.after(table_dynamic_footer);
54
-
55
-    // Observe filter keyevents.
56
-    $("#filter").on("keyup change", $.debounce(150, function (event) {
57
-        var filter_value = $(this).val();
58
-
59
-        if (filter_value === "") {
60
-            // Filter box is empty, remove all filtering.
61
-            table_rows.removeClass("hidden");
62
-
63
-            // Show standard footer, hide dynamic footer.
64
-            table_footer.removeClass("hidden");
65
-            table_dynamic_footer.addClass("hidden");
66
-
67
-            // Hide placeholder, show table.
68
-            if (no_rows.length > 0) {
69
-                no_rows.hide();
70
-            }
71
-            table.show();
72
-
73
-        }
74
-        else {
75
-            // Filter table items by value.
76
-            var hidden = 0;
77
-            var shown = 0;
78
-
79
-            // Hide / show elements.
80
-            $.each(table_row_names, function () {
81
-                var element = $(this).parents("tr");
82
-
83
-                if ($(this).text().indexOf(filter_value) === -1) {
84
-                    // hide
85
-                    element.addClass("hidden");
86
-                    hidden++;
87
-                }
88
-                else {
89
-                    // show
90
-                    element.removeClass("hidden");
91
-                    shown++;
92
-                }
93
-            });
94
-
95
-            // Show placeholder if no rows will be displayed.
96
-            if (no_rows.length > 0) {
97
-                if (shown === 0) {
98
-                    // Show placeholder, hide table.
99
-                    no_rows.show();
100
-                    table.hide();
101
-                }
102
-                else {
103
-                    // Hide placeholder, show table.
104
-                    no_rows.hide();
105
-                    table.show();
106
-                }
107
-            }
108
-
109
-            // Manage dynamic header:
110
-            if (hidden > 0) {
111
-                // Calculate new dynamic sum values based on visible rows.
112
-                for (var column = 2; column < 20; column++) {
113
-                    // Calculate summed value.
114
-                    var cells = table_rows.find('td:nth-child(' + column + ')');
115
-                    if (!cells.length) {
116
-                        // No more columns...!
117
-                        break;
118
-                    }
119
-
120
-                    var sum = 0, numer = 0, denom = 0;
121
-                    $.each(cells.filter(':visible'), function () {
122
-                        var ratio = $(this).data("ratio");
123
-                        if (ratio) {
124
-                            var splitted = ratio.split(" ");
125
-                            numer += parseInt(splitted[0], 10);
126
-                            denom += parseInt(splitted[1], 10);
127
-                        }
128
-                        else {
129
-                            sum += parseInt(this.innerHTML, 10);
130
-                        }
131
-                    });
132
-
133
-                    // Get footer cell element.
134
-                    var footer_cell = table_dynamic_footer.find('td:nth-child(' + column + ')');
135
-
136
-                    // Set value into dynamic footer cell element.
137
-                    if (cells[0].innerHTML.indexOf('%') > -1) {
138
-                        // Percentage columns use the numerator and denominator,
139
-                        // and adapt to the number of decimal places.
140
-                        var match = /\.([0-9]+)/.exec(cells[0].innerHTML);
141
-                        var places = 0;
142
-                        if (match) {
143
-                            places = match[1].length;
144
-                        }
145
-                        var pct = numer * 100 / denom;
146
-                        footer_cell.text(pct.toFixed(places) + '%');
147
-                    }
148
-                    else {
149
-                        footer_cell.text(sum);
150
-                    }
151
-                }
152
-
153
-                // Hide standard footer, show dynamic footer.
154
-                table_footer.addClass("hidden");
155
-                table_dynamic_footer.removeClass("hidden");
156
-            }
157
-            else {
158
-                // Show standard footer, hide dynamic footer.
159
-                table_footer.removeClass("hidden");
160
-                table_dynamic_footer.addClass("hidden");
161
-            }
162
-        }
163
-    }));
164
-
165
-    // Trigger change event on setup, to force filter on page refresh
166
-    // (filter value may still be present).
167
-    $("#filter").trigger("change");
168
-};
169
-
170
-// Loaded on index.html
171
-coverage.index_ready = function ($) {
172
-    // Look for a cookie containing previous sort settings:
173
-    var sort_list = [];
174
-    var cookie_name = "COVERAGE_INDEX_SORT";
175
-    var i;
176
-
177
-    // This almost makes it worth installing the jQuery cookie plugin:
178
-    if (document.cookie.indexOf(cookie_name) > -1) {
179
-        var cookies = document.cookie.split(";");
180
-        for (i = 0; i < cookies.length; i++) {
181
-            var parts = cookies[i].split("=");
182
-
183
-            if ($.trim(parts[0]) === cookie_name && parts[1]) {
184
-                sort_list = eval("[[" + parts[1] + "]]");
185
-                break;
186
-            }
187
-        }
188
-    }
189
-
190
-    // Create a new widget which exists only to save and restore
191
-    // the sort order:
192
-    $.tablesorter.addWidget({
193
-        id: "persistentSort",
194
-
195
-        // Format is called by the widget before displaying:
196
-        format: function (table) {
197
-            if (table.config.sortList.length === 0 && sort_list.length > 0) {
198
-                // This table hasn't been sorted before - we'll use
199
-                // our stored settings:
200
-                $(table).trigger('sorton', [sort_list]);
201
-            }
202
-            else {
203
-                // This is not the first load - something has
204
-                // already defined sorting so we'll just update
205
-                // our stored value to match:
206
-                sort_list = table.config.sortList;
207
-            }
208
-        }
209
-    });
210
-
211
-    // Configure our tablesorter to handle the variable number of
212
-    // columns produced depending on report options:
213
-    var headers = [];
214
-    var col_count = $("table.index > thead > tr > th").length;
215
-
216
-    headers[0] = { sorter: 'text' };
217
-    for (i = 1; i < col_count-1; i++) {
218
-        headers[i] = { sorter: 'digit' };
219
-    }
220
-    headers[col_count-1] = { sorter: 'percent' };
221
-
222
-    // Enable the table sorter:
223
-    $("table.index").tablesorter({
224
-        widgets: ['persistentSort'],
225
-        headers: headers
226
-    });
227
-
228
-    coverage.assign_shortkeys();
229
-    coverage.wire_up_help_panel();
230
-    coverage.wire_up_filter();
231
-
232
-    // Watch for page unload events so we can save the final sort settings:
233
-    $(window).unload(function () {
234
-        document.cookie = cookie_name + "=" + sort_list.toString() + "; path=/";
235
-    });
236
-};
237
-
238
-// -- pyfile stuff --
239
-
240
-coverage.pyfile_ready = function ($) {
241
-    // If we're directed to a particular line number, highlight the line.
242
-    var frag = location.hash;
243
-    if (frag.length > 2 && frag[1] === 'n') {
244
-        $(frag).addClass('highlight');
245
-        coverage.set_sel(parseInt(frag.substr(2), 10));
246
-    }
247
-    else {
248
-        coverage.set_sel(0);
249
-    }
250
-
251
-    $(document)
252
-        .bind('keydown', 'j', coverage.to_next_chunk_nicely)
253
-        .bind('keydown', 'k', coverage.to_prev_chunk_nicely)
254
-        .bind('keydown', '0', coverage.to_top)
255
-        .bind('keydown', '1', coverage.to_first_chunk)
256
-        ;
257
-
258
-    $(".button_toggle_run").click(function (evt) {coverage.toggle_lines(evt.target, "run");});
259
-    $(".button_toggle_exc").click(function (evt) {coverage.toggle_lines(evt.target, "exc");});
260
-    $(".button_toggle_mis").click(function (evt) {coverage.toggle_lines(evt.target, "mis");});
261
-    $(".button_toggle_par").click(function (evt) {coverage.toggle_lines(evt.target, "par");});
262
-
263
-    coverage.assign_shortkeys();
264
-    coverage.wire_up_help_panel();
265
-
266
-    coverage.init_scroll_markers();
267
-
268
-    // Rebuild scroll markers after window high changing
269
-    $(window).resize(coverage.resize_scroll_markers);
270
-};
271
-
272
-coverage.toggle_lines = function (btn, cls) {
273
-    btn = $(btn);
274
-    var hide = "hide_"+cls;
275
-    if (btn.hasClass(hide)) {
276
-        $("#source ."+cls).removeClass(hide);
277
-        btn.removeClass(hide);
278
-    }
279
-    else {
280
-        $("#source ."+cls).addClass(hide);
281
-        btn.addClass(hide);
282
-    }
283
-};
284
-
285
-// Return the nth line div.
286
-coverage.line_elt = function (n) {
287
-    return $("#t" + n);
288
-};
289
-
290
-// Return the nth line number div.
291
-coverage.num_elt = function (n) {
292
-    return $("#n" + n);
293
-};
294
-
295
-// Return the container of all the code.
296
-coverage.code_container = function () {
297
-    return $(".linenos");
298
-};
299
-
300
-// Set the selection.  b and e are line numbers.
301
-coverage.set_sel = function (b, e) {
302
-    // The first line selected.
303
-    coverage.sel_begin = b;
304
-    // The next line not selected.
305
-    coverage.sel_end = (e === undefined) ? b+1 : e;
306
-};
307
-
308
-coverage.to_top = function () {
309
-    coverage.set_sel(0, 1);
310
-    coverage.scroll_window(0);
311
-};
312
-
313
-coverage.to_first_chunk = function () {
314
-    coverage.set_sel(0, 1);
315
-    coverage.to_next_chunk();
316
-};
317
-
318
-coverage.is_transparent = function (color) {
319
-    // Different browsers return different colors for "none".
320
-    return color === "transparent" || color === "rgba(0, 0, 0, 0)";
321
-};
322
-
323
-coverage.to_next_chunk = function () {
324
-    var c = coverage;
325
-
326
-    // Find the start of the next colored chunk.
327
-    var probe = c.sel_end;
328
-    var color, probe_line;
329
-    while (true) {
330
-        probe_line = c.line_elt(probe);
331
-        if (probe_line.length === 0) {
332
-            return;
333
-        }
334
-        color = probe_line.css("background-color");
335
-        if (!c.is_transparent(color)) {
336
-            break;
337
-        }
338
-        probe++;
339
-    }
340
-
341
-    // There's a next chunk, `probe` points to it.
342
-    var begin = probe;
343
-
344
-    // Find the end of this chunk.
345
-    var next_color = color;
346
-    while (next_color === color) {
347
-        probe++;
348
-        probe_line = c.line_elt(probe);
349
-        next_color = probe_line.css("background-color");
350
-    }
351
-    c.set_sel(begin, probe);
352
-    c.show_selection();
353
-};
354
-
355
-coverage.to_prev_chunk = function () {
356
-    var c = coverage;
357
-
358
-    // Find the end of the prev colored chunk.
359
-    var probe = c.sel_begin-1;
360
-    var probe_line = c.line_elt(probe);
361
-    if (probe_line.length === 0) {
362
-        return;
363
-    }
364
-    var color = probe_line.css("background-color");
365
-    while (probe > 0 && c.is_transparent(color)) {
366
-        probe--;
367
-        probe_line = c.line_elt(probe);
368
-        if (probe_line.length === 0) {
369
-            return;
370
-        }
371
-        color = probe_line.css("background-color");
372
-    }
373
-
374
-    // There's a prev chunk, `probe` points to its last line.
375
-    var end = probe+1;
376
-
377
-    // Find the beginning of this chunk.
378
-    var prev_color = color;
379
-    while (prev_color === color) {
380
-        probe--;
381
-        probe_line = c.line_elt(probe);
382
-        prev_color = probe_line.css("background-color");
383
-    }
384
-    c.set_sel(probe+1, end);
385
-    c.show_selection();
386
-};
387
-
388
-// Return the line number of the line nearest pixel position pos
389
-coverage.line_at_pos = function (pos) {
390
-    var l1 = coverage.line_elt(1),
391
-        l2 = coverage.line_elt(2),
392
-        result;
393
-    if (l1.length && l2.length) {
394
-        var l1_top = l1.offset().top,
395
-            line_height = l2.offset().top - l1_top,
396
-            nlines = (pos - l1_top) / line_height;
397
-        if (nlines < 1) {
398
-            result = 1;
399
-        }
400
-        else {
401
-            result = Math.ceil(nlines);
402
-        }
403
-    }
404
-    else {
405
-        result = 1;
406
-    }
407
-    return result;
408
-};
409
-
410
-// Returns 0, 1, or 2: how many of the two ends of the selection are on
411
-// the screen right now?
412
-coverage.selection_ends_on_screen = function () {
413
-    if (coverage.sel_begin === 0) {
414
-        return 0;
415
-    }
416
-
417
-    var top = coverage.line_elt(coverage.sel_begin);
418
-    var next = coverage.line_elt(coverage.sel_end-1);
419
-
420
-    return (
421
-        (top.isOnScreen() ? 1 : 0) +
422
-        (next.isOnScreen() ? 1 : 0)
423
-    );
424
-};
425
-
426
-coverage.to_next_chunk_nicely = function () {
427
-    coverage.finish_scrolling();
428
-    if (coverage.selection_ends_on_screen() === 0) {
429
-        // The selection is entirely off the screen: select the top line on
430
-        // the screen.
431
-        var win = $(window);
432
-        coverage.select_line_or_chunk(coverage.line_at_pos(win.scrollTop()));
433
-    }
434
-    coverage.to_next_chunk();
435
-};
436
-
437
-coverage.to_prev_chunk_nicely = function () {
438
-    coverage.finish_scrolling();
439
-    if (coverage.selection_ends_on_screen() === 0) {
440
-        var win = $(window);
441
-        coverage.select_line_or_chunk(coverage.line_at_pos(win.scrollTop() + win.height()));
442
-    }
443
-    coverage.to_prev_chunk();
444
-};
445
-
446
-// Select line number lineno, or if it is in a colored chunk, select the
447
-// entire chunk
448
-coverage.select_line_or_chunk = function (lineno) {
449
-    var c = coverage;
450
-    var probe_line = c.line_elt(lineno);
451
-    if (probe_line.length === 0) {
452
-        return;
453
-    }
454
-    var the_color = probe_line.css("background-color");
455
-    if (!c.is_transparent(the_color)) {
456
-        // The line is in a highlighted chunk.
457
-        // Search backward for the first line.
458
-        var probe = lineno;
459
-        var color = the_color;
460
-        while (probe > 0 && color === the_color) {
461
-            probe--;
462
-            probe_line = c.line_elt(probe);
463
-            if (probe_line.length === 0) {
464
-                break;
465
-            }
466
-            color = probe_line.css("background-color");
467
-        }
468
-        var begin = probe + 1;
469
-
470
-        // Search forward for the last line.
471
-        probe = lineno;
472
-        color = the_color;
473
-        while (color === the_color) {
474
-            probe++;
475
-            probe_line = c.line_elt(probe);
476
-            color = probe_line.css("background-color");
477
-        }
478
-
479
-        coverage.set_sel(begin, probe);
480
-    }
481
-    else {
482
-        coverage.set_sel(lineno);
483
-    }
484
-};
485
-
486
-coverage.show_selection = function () {
487
-    var c = coverage;
488
-
489
-    // Highlight the lines in the chunk
490
-    c.code_container().find(".highlight").removeClass("highlight");
491
-    for (var probe = c.sel_begin; probe > 0 && probe < c.sel_end; probe++) {
492
-        c.num_elt(probe).addClass("highlight");
493
-    }
494
-
495
-    c.scroll_to_selection();
496
-};
497
-
498
-coverage.scroll_to_selection = function () {
499
-    // Scroll the page if the chunk isn't fully visible.
500
-    if (coverage.selection_ends_on_screen() < 2) {
501
-        // Need to move the page. The html,body trick makes it scroll in all
502
-        // browsers, got it from http://stackoverflow.com/questions/3042651
503
-        var top = coverage.line_elt(coverage.sel_begin);
504
-        var top_pos = parseInt(top.offset().top, 10);
505
-        coverage.scroll_window(top_pos - 30);
506
-    }
507
-};
508
-
509
-coverage.scroll_window = function (to_pos) {
510
-    $("html,body").animate({scrollTop: to_pos}, 200);
511
-};
512
-
513
-coverage.finish_scrolling = function () {
514
-    $("html,body").stop(true, true);
515
-};
516
-
517
-coverage.init_scroll_markers = function () {
518
-    var c = coverage;
519
-    // Init some variables
520
-    c.lines_len = $('td.text p').length;
521
-    c.body_h = $('body').height();
522
-    c.header_h = $('div#header').height();
523
-    c.missed_lines = $('td.text p.mis, td.text p.par');
524
-
525
-    // Build html
526
-    c.resize_scroll_markers();
527
-};
528
-
529
-coverage.resize_scroll_markers = function () {
530
-    var c = coverage,
531
-        min_line_height = 3,
532
-        max_line_height = 10,
533
-        visible_window_h = $(window).height();
534
-
535
-    $('#scroll_marker').remove();
536
-    // Don't build markers if the window has no scroll bar.
537
-    if (c.body_h <= visible_window_h) {
538
-        return;
539
-    }
540
-
541
-    $("body").append("<div id='scroll_marker'>&nbsp;</div>");
542
-    var scroll_marker = $('#scroll_marker'),
543
-        marker_scale = scroll_marker.height() / c.body_h,
544
-        line_height = scroll_marker.height() / c.lines_len;
545
-
546
-    // Line height must be between the extremes.
547
-    if (line_height > min_line_height) {
548
-        if (line_height > max_line_height) {
549
-            line_height = max_line_height;
550
-        }
551
-    }
552
-    else {
553
-        line_height = min_line_height;
554
-    }
555
-
556
-    var previous_line = -99,
557
-        last_mark,
558
-        last_top;
559
-
560
-    c.missed_lines.each(function () {
561
-        var line_top = Math.round($(this).offset().top * marker_scale),
562
-            id_name = $(this).attr('id'),
563
-            line_number = parseInt(id_name.substring(1, id_name.length));
564
-
565
-        if (line_number === previous_line + 1) {
566
-            // If this solid missed block just make previous mark higher.
567
-            last_mark.css({
568
-                'height': line_top + line_height - last_top
569
-            });
570
-        }
571
-        else {
572
-            // Add colored line in scroll_marker block.
573
-            scroll_marker.append('<div id="m' + line_number + '" class="marker"></div>');
574
-            last_mark = $('#m' + line_number);
575
-            last_mark.css({
576
-                'height': line_height,
577
-                'top': line_top
578
-            });
579
-            last_top = line_top;
580
-        }
581
-
582
-        previous_line = line_number;
583
-    });
584
-};

+ 0
- 1015
covers/htmlcov/gampy___init___py.html
File diff suppressed because it is too large
View File


+ 0
- 581
covers/htmlcov/gampy_advices_py.html View File

@@ -1,581 +0,0 @@
1
-
2
-
3
-
4
-<!DOCTYPE html>
5
-<html>
6
-<head>
7
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8
-    
9
-    
10
-    <meta http-equiv="X-UA-Compatible" content="IE=emulateIE7" />
11
-    <title>Coverage for gampy/advices.py: 100%</title>
12
-    <link rel="stylesheet" href="style.css" type="text/css">
13
-    
14
-    <script type="text/javascript" src="jquery.min.js"></script>
15
-    <script type="text/javascript" src="jquery.hotkeys.js"></script>
16
-    <script type="text/javascript" src="jquery.isonscreen.js"></script>
17
-    <script type="text/javascript" src="coverage_html.js"></script>
18
-    <script type="text/javascript">
19
-        jQuery(document).ready(coverage.pyfile_ready);
20
-    </script>
21
-</head>
22
-<body class="pyfile">
23
-
24
-<div id="header">
25
-    <div class="content">
26
-        <h1>Coverage for <b>gampy/advices.py</b> :
27
-            <span class="pc_cov">100%</span>
28
-        </h1>
29
-
30
-        <img id="keyboard_icon" src="keybd_closed.png" alt="Show keyboard shortcuts" />
31
-
32
-        <h2 class="stats">
33
-            104 statements &nbsp;
34
-            <span class="run hide_run shortkey_r button_toggle_run">104 run</span>
35
-            <span class="mis shortkey_m button_toggle_mis">0 missing</span>
36
-            <span class="exc shortkey_x button_toggle_exc">0 excluded</span>
37
-
38
-            
39
-                <span class="par run hide_run shortkey_p button_toggle_par">0 partial</span>
40
-            
41
-        </h2>
42
-    </div>
43
-</div>
44
-
45
-<div class="help_panel">
46
-    <img id="panel_icon" src="keybd_open.png" alt="Hide keyboard shortcuts" />
47
-    <p class="legend">Hot-keys on this page</p>
48
-    <div>
49
-    <p class="keyhelp">
50
-        <span class="key">r</span>
51
-        <span class="key">m</span>
52
-        <span class="key">x</span>
53
-        <span class="key">p</span> &nbsp; toggle line displays
54
-    </p>
55
-    <p class="keyhelp">
56
-        <span class="key">j</span>
57
-        <span class="key">k</span> &nbsp; next/prev highlighted chunk
58
-    </p>
59
-    <p class="keyhelp">
60
-        <span class="key">0</span> &nbsp; (zero) top of page
61
-    </p>
62
-    <p class="keyhelp">
63
-        <span class="key">1</span> &nbsp; (one) first highlighted chunk
64
-    </p>
65
-    </div>
66
-</div>
67
-
68
-<div id="source">
69
-    <table>
70
-        <tr>
71
-            <td class="linenos">
72
-<p id="n1" class="pln"><a href="#n1">1</a></p>
73
-<p id="n2" class="pln"><a href="#n2">2</a></p>
74
-<p id="n3" class="pln"><a href="#n3">3</a></p>
75
-<p id="n4" class="pln"><a href="#n4">4</a></p>
76
-<p id="n5" class="pln"><a href="#n5">5</a></p>
77
-<p id="n6" class="pln"><a href="#n6">6</a></p>
78
-<p id="n7" class="stm run hide_run"><a href="#n7">7</a></p>
79
-<p id="n8" class="pln"><a href="#n8">8</a></p>
80
-<p id="n9" class="stm run hide_run"><a href="#n9">9</a></p>
81
-<p id="n10" class="pln"><a href="#n10">10</a></p>
82
-<p id="n11" class="stm run hide_run"><a href="#n11">11</a></p>
83
-<p id="n12" class="pln"><a href="#n12">12</a></p>
84
-<p id="n13" class="stm run hide_run"><a href="#n13">13</a></p>
85
-<p id="n14" class="pln"><a href="#n14">14</a></p>
86
-<p id="n15" class="stm run hide_run"><a href="#n15">15</a></p>
87
-<p id="n16" class="pln"><a href="#n16">16</a></p>
88
-<p id="n17" class="pln"><a href="#n17">17</a></p>
89
-<p id="n18" class="pln"><a href="#n18">18</a></p>
90
-<p id="n19" class="pln"><a href="#n19">19</a></p>
91
-<p id="n20" class="pln"><a href="#n20">20</a></p>
92
-<p id="n21" class="stm run hide_run"><a href="#n21">21</a></p>
93
-<p id="n22" class="pln"><a href="#n22">22</a></p>
94
-<p id="n23" class="pln"><a href="#n23">23</a></p>
95
-<p id="n24" class="stm run hide_run"><a href="#n24">24</a></p>
96
-<p id="n25" class="stm run hide_run"><a href="#n25">25</a></p>
97
-<p id="n26" class="pln"><a href="#n26">26</a></p>
98
-<p id="n27" class="stm run hide_run"><a href="#n27">27</a></p>
99
-<p id="n28" class="pln"><a href="#n28">28</a></p>
100
-<p id="n29" class="pln"><a href="#n29">29</a></p>
101
-<p id="n30" class="pln"><a href="#n30">30</a></p>
102
-<p id="n31" class="pln"><a href="#n31">31</a></p>
103
-<p id="n32" class="pln"><a href="#n32">32</a></p>
104
-<p id="n33" class="stm run hide_run"><a href="#n33">33</a></p>
105
-<p id="n34" class="pln"><a href="#n34">34</a></p>
106
-<p id="n35" class="stm run hide_run"><a href="#n35">35</a></p>
107
-<p id="n36" class="pln"><a href="#n36">36</a></p>
108
-<p id="n37" class="pln"><a href="#n37">37</a></p>
109
-<p id="n38" class="pln"><a href="#n38">38</a></p>
110
-<p id="n39" class="pln"><a href="#n39">39</a></p>
111
-<p id="n40" class="pln"><a href="#n40">40</a></p>
112
-<p id="n41" class="stm run hide_run"><a href="#n41">41</a></p>
113
-<p id="n42" class="pln"><a href="#n42">42</a></p>
114
-<p id="n43" class="pln"><a href="#n43">43</a></p>
115
-<p id="n44" class="stm run hide_run"><a href="#n44">44</a></p>
116
-<p id="n45" class="stm run hide_run"><a href="#n45">45</a></p>
117
-<p id="n46" class="pln"><a href="#n46">46</a></p>
118
-<p id="n47" class="stm run hide_run"><a href="#n47">47</a></p>
119
-<p id="n48" class="pln"><a href="#n48">48</a></p>
120
-<p id="n49" class="stm run hide_run"><a href="#n49">49</a></p>
121
-<p id="n50" class="pln"><a href="#n50">50</a></p>
122
-<p id="n51" class="stm run hide_run"><a href="#n51">51</a></p>
123
-<p id="n52" class="pln"><a href="#n52">52</a></p>
124
-<p id="n53" class="pln"><a href="#n53">53</a></p>
125
-<p id="n54" class="pln"><a href="#n54">54</a></p>
126
-<p id="n55" class="pln"><a href="#n55">55</a></p>
127
-<p id="n56" class="pln"><a href="#n56">56</a></p>
128
-<p id="n57" class="stm run hide_run"><a href="#n57">57</a></p>
129
-<p id="n58" class="pln"><a href="#n58">58</a></p>
130
-<p id="n59" class="pln"><a href="#n59">59</a></p>
131
-<p id="n60" class="stm run hide_run"><a href="#n60">60</a></p>
132
-<p id="n61" class="stm run hide_run"><a href="#n61">61</a></p>
133
-<p id="n62" class="pln"><a href="#n62">62</a></p>
134
-<p id="n63" class="stm run hide_run"><a href="#n63">63</a></p>
135
-<p id="n64" class="pln"><a href="#n64">64</a></p>
136
-<p id="n65" class="stm run hide_run"><a href="#n65">65</a></p>
137
-<p id="n66" class="pln"><a href="#n66">66</a></p>
138
-<p id="n67" class="stm run hide_run"><a href="#n67">67</a></p>
139
-<p id="n68" class="pln"><a href="#n68">68</a></p>
140
-<p id="n69" class="pln"><a href="#n69">69</a></p>
141
-<p id="n70" class="pln"><a href="#n70">70</a></p>
142
-<p id="n71" class="pln"><a href="#n71">71</a></p>
143
-<p id="n72" class="pln"><a href="#n72">72</a></p>
144
-<p id="n73" class="stm run hide_run"><a href="#n73">73</a></p>
145
-<p id="n74" class="pln"><a href="#n74">74</a></p>
146
-<p id="n75" class="pln"><a href="#n75">75</a></p>
147
-<p id="n76" class="stm run hide_run"><a href="#n76">76</a></p>
148
-<p id="n77" class="stm run hide_run"><a href="#n77">77</a></p>
149
-<p id="n78" class="pln"><a href="#n78">78</a></p>
150
-<p id="n79" class="stm run hide_run"><a href="#n79">79</a></p>
151
-<p id="n80" class="pln"><a href="#n80">80</a></p>
152
-<p id="n81" class="stm run hide_run"><a href="#n81">81</a></p>
153
-<p id="n82" class="stm run hide_run"><a href="#n82">82</a></p>
154
-<p id="n83" class="stm run hide_run"><a href="#n83">83</a></p>
155
-<p id="n84" class="stm run hide_run"><a href="#n84">84</a></p>
156
-<p id="n85" class="pln"><a href="#n85">85</a></p>
157
-<p id="n86" class="stm run hide_run"><a href="#n86">86</a></p>
158
-<p id="n87" class="pln"><a href="#n87">87</a></p>
159
-<p id="n88" class="stm run hide_run"><a href="#n88">88</a></p>
160
-<p id="n89" class="pln"><a href="#n89">89</a></p>
161
-<p id="n90" class="pln"><a href="#n90">90</a></p>
162
-<p id="n91" class="pln"><a href="#n91">91</a></p>
163
-<p id="n92" class="pln"><a href="#n92">92</a></p>
164
-<p id="n93" class="pln"><a href="#n93">93</a></p>
165
-<p id="n94" class="stm run hide_run"><a href="#n94">94</a></p>
166
-<p id="n95" class="pln"><a href="#n95">95</a></p>
167
-<p id="n96" class="pln"><a href="#n96">96</a></p>
168
-<p id="n97" class="stm run hide_run"><a href="#n97">97</a></p>
169
-<p id="n98" class="stm run hide_run"><a href="#n98">98</a></p>
170
-<p id="n99" class="pln"><a href="#n99">99</a></p>
171
-<p id="n100" class="stm run hide_run"><a href="#n100">100</a></p>
172
-<p id="n101" class="pln"><a href="#n101">101</a></p>
173
-<p id="n102" class="stm run hide_run"><a href="#n102">102</a></p>
174
-<p id="n103" class="pln"><a href="#n103">103</a></p>
175
-<p id="n104" class="stm run hide_run"><a href="#n104">104</a></p>
176
-<p id="n105" class="pln"><a href="#n105">105</a></p>
177
-<p id="n106" class="stm run hide_run"><a href="#n106">106</a></p>
178
-<p id="n107" class="pln"><a href="#n107">107</a></p>
179
-<p id="n108" class="pln"><a href="#n108">108</a></p>
180
-<p id="n109" class="pln"><a href="#n109">109</a></p>
181
-<p id="n110" class="pln"><a href="#n110">110</a></p>
182
-<p id="n111" class="pln"><a href="#n111">111</a></p>
183
-<p id="n112" class="stm run hide_run"><a href="#n112">112</a></p>
184
-<p id="n113" class="pln"><a href="#n113">113</a></p>
185
-<p id="n114" class="pln"><a href="#n114">114</a></p>
186
-<p id="n115" class="stm run hide_run"><a href="#n115">115</a></p>
187
-<p id="n116" class="stm run hide_run"><a href="#n116">116</a></p>
188
-<p id="n117" class="pln"><a href="#n117">117</a></p>
189
-<p id="n118" class="stm run hide_run"><a href="#n118">118</a></p>
190
-<p id="n119" class="stm run hide_run"><a href="#n119">119</a></p>
191
-<p id="n120" class="pln"><a href="#n120">120</a></p>
192
-<p id="n121" class="stm run hide_run"><a href="#n121">121</a></p>
193
-<p id="n122" class="pln"><a href="#n122">122</a></p>
194
-<p id="n123" class="stm run hide_run"><a href="#n123">123</a></p>
195
-<p id="n124" class="pln"><a href="#n124">124</a></p>
196
-<p id="n125" class="stm run hide_run"><a href="#n125">125</a></p>
197
-<p id="n126" class="pln"><a href="#n126">126</a></p>
198
-<p id="n127" class="pln"><a href="#n127">127</a></p>
199
-<p id="n128" class="pln"><a href="#n128">128</a></p>
200
-<p id="n129" class="pln"><a href="#n129">129</a></p>
201
-<p id="n130" class="pln"><a href="#n130">130</a></p>
202
-<p id="n131" class="stm run hide_run"><a href="#n131">131</a></p>
203
-<p id="n132" class="pln"><a href="#n132">132</a></p>
204
-<p id="n133" class="pln"><a href="#n133">133</a></p>
205
-<p id="n134" class="stm run hide_run"><a href="#n134">134</a></p>
206
-<p id="n135" class="stm run hide_run"><a href="#n135">135</a></p>
207
-<p id="n136" class="pln"><a href="#n136">136</a></p>
208
-<p id="n137" class="stm run hide_run"><a href="#n137">137</a></p>
209
-<p id="n138" class="pln"><a href="#n138">138</a></p>
210
-<p id="n139" class="stm run hide_run"><a href="#n139">139</a></p>
211
-<p id="n140" class="stm run hide_run"><a href="#n140">140</a></p>
212
-<p id="n141" class="pln"><a href="#n141">141</a></p>
213
-<p id="n142" class="stm run hide_run"><a href="#n142">142</a></p>
214
-<p id="n143" class="pln"><a href="#n143">143</a></p>
215
-<p id="n144" class="stm run hide_run"><a href="#n144">144</a></p>
216
-<p id="n145" class="pln"><a href="#n145">145</a></p>
217
-<p id="n146" class="stm run hide_run"><a href="#n146">146</a></p>
218
-<p id="n147" class="pln"><a href="#n147">147</a></p>
219
-<p id="n148" class="pln"><a href="#n148">148</a></p>
220
-<p id="n149" class="pln"><a href="#n149">149</a></p>
221
-<p id="n150" class="pln"><a href="#n150">150</a></p>
222
-<p id="n151" class="pln"><a href="#n151">151</a></p>
223
-<p id="n152" class="stm run hide_run"><a href="#n152">152</a></p>
224
-<p id="n153" class="pln"><a href="#n153">153</a></p>
225
-<p id="n154" class="pln"><a href="#n154">154</a></p>
226
-<p id="n155" class="stm run hide_run"><a href="#n155">155</a></p>
227
-<p id="n156" class="stm run hide_run"><a href="#n156">156</a></p>
228
-<p id="n157" class="pln"><a href="#n157">157</a></p>
229
-<p id="n158" class="stm run hide_run"><a href="#n158">158</a></p>
230
-<p id="n159" class="stm run hide_run"><a href="#n159">159</a></p>
231
-<p id="n160" class="stm run hide_run"><a href="#n160">160</a></p>
232
-<p id="n161" class="stm run hide_run"><a href="#n161">161</a></p>
233
-<p id="n162" class="stm run hide_run"><a href="#n162">162</a></p>
234
-<p id="n163" class="pln"><a href="#n163">163</a></p>
235
-<p id="n164" class="stm run hide_run"><a href="#n164">164</a></p>
236
-<p id="n165" class="pln"><a href="#n165">165</a></p>
237
-<p id="n166" class="stm run hide_run"><a href="#n166">166</a></p>
238
-<p id="n167" class="pln"><a href="#n167">167</a></p>
239
-<p id="n168" class="stm run hide_run"><a href="#n168">168</a></p>
240
-<p id="n169" class="pln"><a href="#n169">169</a></p>
241
-<p id="n170" class="pln"><a href="#n170">170</a></p>
242
-<p id="n171" class="pln"><a href="#n171">171</a></p>
243
-<p id="n172" class="pln"><a href="#n172">172</a></p>
244
-<p id="n173" class="pln"><a href="#n173">173</a></p>
245
-<p id="n174" class="stm run hide_run"><a href="#n174">174</a></p>
246
-<p id="n175" class="pln"><a href="#n175">175</a></p>
247
-<p id="n176" class="pln"><a href="#n176">176</a></p>
248
-<p id="n177" class="stm run hide_run"><a href="#n177">177</a></p>
249
-<p id="n178" class="stm run hide_run"><a href="#n178">178</a></p>
250
-<p id="n179" class="pln"><a href="#n179">179</a></p>
251
-<p id="n180" class="stm run hide_run"><a href="#n180">180</a></p>
252
-<p id="n181" class="stm run hide_run"><a href="#n181">181</a></p>
253
-<p id="n182" class="stm run hide_run"><a href="#n182">182</a></p>
254
-<p id="n183" class="stm run hide_run"><a href="#n183">183</a></p>
255
-<p id="n184" class="pln"><a href="#n184">184</a></p>
256
-<p id="n185" class="stm run hide_run"><a href="#n185">185</a></p>
257
-<p id="n186" class="pln"><a href="#n186">186</a></p>
258
-<p id="n187" class="stm run hide_run"><a href="#n187">187</a></p>
259
-<p id="n188" class="pln"><a href="#n188">188</a></p>
260
-<p id="n189" class="pln"><a href="#n189">189</a></p>
261
-<p id="n190" class="pln"><a href="#n190">190</a></p>
262
-<p id="n191" class="pln"><a href="#n191">191</a></p>
263
-<p id="n192" class="pln"><a href="#n192">192</a></p>
264
-<p id="n193" class="stm run hide_run"><a href="#n193">193</a></p>
265
-<p id="n194" class="pln"><a href="#n194">194</a></p>
266
-<p id="n195" class="pln"><a href="#n195">195</a></p>
267
-<p id="n196" class="pln"><a href="#n196">196</a></p>
268
-<p id="n197" class="pln"><a href="#n197">197</a></p>
269
-<p id="n198" class="stm run hide_run"><a href="#n198">198</a></p>
270
-<p id="n199" class="stm run hide_run"><a href="#n199">199</a></p>
271
-<p id="n200" class="pln"><a href="#n200">200</a></p>
272
-<p id="n201" class="stm run hide_run"><a href="#n201">201</a></p>
273
-<p id="n202" class="stm run hide_run"><a href="#n202">202</a></p>
274
-<p id="n203" class="pln"><a href="#n203">203</a></p>
275
-<p id="n204" class="stm run hide_run"><a href="#n204">204</a></p>
276
-<p id="n205" class="pln"><a href="#n205">205</a></p>
277
-<p id="n206" class="stm run hide_run"><a href="#n206">206</a></p>
278
-<p id="n207" class="stm run hide_run"><a href="#n207">207</a></p>
279
-<p id="n208" class="pln"><a href="#n208">208</a></p>
280
-<p id="n209" class="stm run hide_run"><a href="#n209">209</a></p>
281
-<p id="n210" class="pln"><a href="#n210">210</a></p>
282
-<p id="n211" class="stm run hide_run"><a href="#n211">211</a></p>
283
-<p id="n212" class="pln"><a href="#n212">212</a></p>
284
-<p id="n213" class="stm run hide_run"><a href="#n213">213</a></p>
285
-<p id="n214" class="pln"><a href="#n214">214</a></p>
286
-<p id="n215" class="pln"><a href="#n215">215</a></p>
287
-<p id="n216" class="pln"><a href="#n216">216</a></p>
288
-<p id="n217" class="pln"><a href="#n217">217</a></p>
289
-<p id="n218" class="pln"><a href="#n218">218</a></p>
290
-<p id="n219" class="stm run hide_run"><a href="#n219">219</a></p>
291
-<p id="n220" class="pln"><a href="#n220">220</a></p>
292
-<p id="n221" class="pln"><a href="#n221">221</a></p>
293
-<p id="n222" class="pln"><a href="#n222">222</a></p>
294
-<p id="n223" class="pln"><a href="#n223">223</a></p>
295
-<p id="n224" class="stm run hide_run"><a href="#n224">224</a></p>
296
-<p id="n225" class="stm run hide_run"><a href="#n225">225</a></p>
297
-<p id="n226" class="pln"><a href="#n226">226</a></p>
298
-<p id="n227" class="stm run hide_run"><a href="#n227">227</a></p>
299
-<p id="n228" class="stm run hide_run"><a href="#n228">228</a></p>
300
-<p id="n229" class="stm run hide_run"><a href="#n229">229</a></p>
301
-<p id="n230" class="stm run hide_run"><a href="#n230">230</a></p>
302
-<p id="n231" class="pln"><a href="#n231">231</a></p>
303
-<p id="n232" class="stm run hide_run"><a href="#n232">232</a></p>
304
-<p id="n233" class="stm run hide_run"><a href="#n233">233</a></p>
305
-<p id="n234" class="pln"><a href="#n234">234</a></p>
306
-<p id="n235" class="stm run hide_run"><a href="#n235">235</a></p>
307
-<p id="n236" class="stm run hide_run"><a href="#n236">236</a></p>
308
-<p id="n237" class="pln"><a href="#n237">237</a></p>
309
-<p id="n238" class="stm run hide_run"><a href="#n238">238</a></p>
310
-<p id="n239" class="stm run hide_run"><a href="#n239">239</a></p>
311
-<p id="n240" class="pln"><a href="#n240">240</a></p>
312
-<p id="n241" class="stm run hide_run"><a href="#n241">241</a></p>
313
-<p id="n242" class="pln"><a href="#n242">242</a></p>
314
-<p id="n243" class="stm run hide_run"><a href="#n243">243</a></p>
315
-<p id="n244" class="pln"><a href="#n244">244</a></p>
316
-<p id="n245" class="stm run hide_run"><a href="#n245">245</a></p>
317
-
318
-            </td>
319
-            <td class="text">
320
-<p id="t1" class="pln"><span class="com">#!/usr/bin/env python</span><span class="strut">&nbsp;</span></p>
321
-<p id="t2" class="pln"><span class="com"># coding: utf-8</span><span class="strut">&nbsp;</span></p>
322
-<p id="t3" class="pln"><span class="strut">&nbsp;</span></p>
323
-<p id="t4" class="pln"><span class="com"># In[8]:</span><span class="strut">&nbsp;</span></p>
324
-<p id="t5" class="pln"><span class="strut">&nbsp;</span></p>
325
-<p id="t6" class="pln"><span class="strut">&nbsp;</span></p>
326
-<p id="t7" class="stm run hide_run"><span class="str">"""Advices of the project."""</span><span class="strut">&nbsp;</span></p>
327
-<p id="t8" class="pln"><span class="strut">&nbsp;</span></p>
328
-<p id="t9" class="stm run hide_run"><span class="key">import</span> <span class="nam">logging</span><span class="strut">&nbsp;</span></p>
329
-<p id="t10" class="pln"><span class="strut">&nbsp;</span></p>
330
-<p id="t11" class="stm run hide_run"><span class="key">from</span> <span class="nam">typing</span> <span class="key">import</span> <span class="nam">Any</span><span class="op">,</span> <span class="nam">Type</span><span class="op">,</span> <span class="nam">Callable</span><span class="strut">&nbsp;</span></p>
331
-<p id="t12" class="pln"><span class="strut">&nbsp;</span></p>
332
-<p id="t13" class="stm run hide_run"><span class="key">from</span> <span class="nam">functools</span> <span class="key">import</span> <span class="nam">wraps</span><span class="op">,</span> <span class="nam">lru_cache</span><span class="strut">&nbsp;</span></p>
333
-<p id="t14" class="pln"><span class="strut">&nbsp;</span></p>
334
-<p id="t15" class="stm run hide_run"><span class="key">from</span> <span class="nam">gampy</span><span class="op">.</span><span class="nam">structures</span> <span class="key">import</span> <span class="nam">Advice</span><span class="strut">&nbsp;</span></p>
335
-<p id="t16" class="pln"><span class="strut">&nbsp;</span></p>
336
-<p id="t17" class="pln"><span class="strut">&nbsp;</span></p>
337
-<p id="t18" class="pln"><span class="com"># In[ ]:</span><span class="strut">&nbsp;</span></p>
338
-<p id="t19" class="pln"><span class="strut">&nbsp;</span></p>
339
-<p id="t20" class="pln"><span class="strut">&nbsp;</span></p>
340
-<p id="t21" class="stm run hide_run"><span class="key">def</span> <span class="nam">identical</span><span class="op">(</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Advice</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
341
-<p id="t22" class="pln">    <span class="str">"""Return f as is."""</span><span class="strut">&nbsp;</span></p>
342
-<p id="t23" class="pln"><span class="strut">&nbsp;</span></p>
343
-<p id="t24" class="stm run hide_run">    <span class="key">def</span> <span class="nam">advice</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
344
-<p id="t25" class="stm run hide_run">        <span class="key">return</span> <span class="nam">f</span><span class="strut">&nbsp;</span></p>
345
-<p id="t26" class="pln"><span class="strut">&nbsp;</span></p>
346
-<p id="t27" class="stm run hide_run">    <span class="key">return</span> <span class="nam">advice</span><span class="strut">&nbsp;</span></p>
347
-<p id="t28" class="pln"><span class="strut">&nbsp;</span></p>
348
-<p id="t29" class="pln"><span class="strut">&nbsp;</span></p>
349
-<p id="t30" class="pln"><span class="com"># In[16]:</span><span class="strut">&nbsp;</span></p>
350
-<p id="t31" class="pln"><span class="strut">&nbsp;</span></p>
351
-<p id="t32" class="pln"><span class="strut">&nbsp;</span></p>
352
-<p id="t33" class="stm run hide_run"><span class="key">def</span> <span class="nam">cacheable</span><span class="op">(</span><span class="nam">n</span><span class="op">:</span> <span class="nam">int</span> <span class="op">=</span> <span class="num">128</span><span class="op">,</span> <span class="nam">typed</span><span class="op">:</span> <span class="nam">bool</span> <span class="op">=</span> <span class="key">False</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Advice</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
353
-<p id="t34" class="pln">    <span class="str">"""Cache the n most recent results."""</span><span class="strut">&nbsp;</span></p>
354
-<p id="t35" class="stm run hide_run">    <span class="key">return</span> <span class="nam">lru_cache</span><span class="op">(</span><span class="nam">n</span><span class="op">,</span> <span class="nam">typed</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
355
-<p id="t36" class="pln"><span class="strut">&nbsp;</span></p>
356
-<p id="t37" class="pln"><span class="strut">&nbsp;</span></p>
357
-<p id="t38" class="pln"><span class="com"># In[3]:</span><span class="strut">&nbsp;</span></p>
358
-<p id="t39" class="pln"><span class="strut">&nbsp;</span></p>
359
-<p id="t40" class="pln"><span class="strut">&nbsp;</span></p>
360
-<p id="t41" class="stm run hide_run"><span class="key">def</span> <span class="nam">constable</span><span class="op">(</span><span class="nam">x</span><span class="op">:</span> <span class="nam">Any</span> <span class="op">=</span> <span class="key">None</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Advice</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
361
-<p id="t42" class="pln">    <span class="str">"""Return x constantly."""</span><span class="strut">&nbsp;</span></p>
362
-<p id="t43" class="pln"><span class="strut">&nbsp;</span></p>
363
-<p id="t44" class="stm run hide_run">    <span class="key">def</span> <span class="nam">advice</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
364
-<p id="t45" class="stm run hide_run">        <span class="op">@</span><span class="nam">wraps</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
365
-<p id="t46" class="pln">        <span class="key">def</span> <span class="nam">wrapped</span><span class="op">(</span><span class="op">*</span><span class="nam">_</span><span class="op">,</span> <span class="op">**</span><span class="nam">__</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
366
-<p id="t47" class="stm run hide_run">            <span class="key">return</span> <span class="nam">x</span><span class="strut">&nbsp;</span></p>
367
-<p id="t48" class="pln"><span class="strut">&nbsp;</span></p>
368
-<p id="t49" class="stm run hide_run">        <span class="key">return</span> <span class="nam">wrapped</span><span class="strut">&nbsp;</span></p>
369
-<p id="t50" class="pln"><span class="strut">&nbsp;</span></p>
370
-<p id="t51" class="stm run hide_run">    <span class="key">return</span> <span class="nam">advice</span><span class="strut">&nbsp;</span></p>
371
-<p id="t52" class="pln"><span class="strut">&nbsp;</span></p>
372
-<p id="t53" class="pln"><span class="strut">&nbsp;</span></p>
373
-<p id="t54" class="pln"><span class="com"># In[2]:</span><span class="strut">&nbsp;</span></p>
374
-<p id="t55" class="pln"><span class="strut">&nbsp;</span></p>
375
-<p id="t56" class="pln"><span class="strut">&nbsp;</span></p>
376
-<p id="t57" class="stm run hide_run"><span class="key">def</span> <span class="nam">flippable</span><span class="op">(</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Advice</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
377
-<p id="t58" class="pln">    <span class="str">"""Flip f arguments."""</span><span class="strut">&nbsp;</span></p>
378
-<p id="t59" class="pln"><span class="strut">&nbsp;</span></p>
379
-<p id="t60" class="stm run hide_run">    <span class="key">def</span> <span class="nam">advice</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
380
-<p id="t61" class="stm run hide_run">        <span class="op">@</span><span class="nam">wraps</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
381
-<p id="t62" class="pln">        <span class="key">def</span> <span class="nam">wrapped</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
382
-<p id="t63" class="stm run hide_run">            <span class="key">return</span> <span class="nam">f</span><span class="op">(</span><span class="op">*</span><span class="nam">reversed</span><span class="op">(</span><span class="nam">args</span><span class="op">)</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
383
-<p id="t64" class="pln"><span class="strut">&nbsp;</span></p>
384
-<p id="t65" class="stm run hide_run">        <span class="key">return</span> <span class="nam">wrapped</span><span class="strut">&nbsp;</span></p>
385
-<p id="t66" class="pln"><span class="strut">&nbsp;</span></p>
386
-<p id="t67" class="stm run hide_run">    <span class="key">return</span> <span class="nam">advice</span><span class="strut">&nbsp;</span></p>
387
-<p id="t68" class="pln"><span class="strut">&nbsp;</span></p>
388
-<p id="t69" class="pln"><span class="strut">&nbsp;</span></p>
389
-<p id="t70" class="pln"><span class="com"># In[4]:</span><span class="strut">&nbsp;</span></p>
390
-<p id="t71" class="pln"><span class="strut">&nbsp;</span></p>
391
-<p id="t72" class="pln"><span class="strut">&nbsp;</span></p>
392
-<p id="t73" class="stm run hide_run"><span class="key">def</span> <span class="nam">fluentable</span><span class="op">(</span><span class="nam">n</span><span class="op">:</span> <span class="nam">int</span> <span class="op">=</span> <span class="num">0</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Advice</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
393
-<p id="t74" class="pln">    <span class="str">"""Return the nth argument of f."""</span><span class="strut">&nbsp;</span></p>
394
-<p id="t75" class="pln"><span class="strut">&nbsp;</span></p>
395
-<p id="t76" class="stm run hide_run">    <span class="key">def</span> <span class="nam">advice</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
396
-<p id="t77" class="stm run hide_run">        <span class="op">@</span><span class="nam">wraps</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
397
-<p id="t78" class="pln">        <span class="key">def</span> <span class="nam">wrapped</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
398
-<p id="t79" class="stm run hide_run">            <span class="nam">state</span> <span class="op">=</span> <span class="nam">f</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
399
-<p id="t80" class="pln"><span class="strut">&nbsp;</span></p>
400
-<p id="t81" class="stm run hide_run">            <span class="key">try</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
401
-<p id="t82" class="stm run hide_run">                <span class="key">return</span> <span class="nam">args</span><span class="op">[</span><span class="nam">n</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
402
-<p id="t83" class="stm run hide_run">            <span class="key">except</span> <span class="nam">IndexError</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
403
-<p id="t84" class="stm run hide_run">                <span class="key">return</span> <span class="nam">state</span><span class="strut">&nbsp;</span></p>
404
-<p id="t85" class="pln"><span class="strut">&nbsp;</span></p>
405
-<p id="t86" class="stm run hide_run">        <span class="key">return</span> <span class="nam">wrapped</span><span class="strut">&nbsp;</span></p>
406
-<p id="t87" class="pln"><span class="strut">&nbsp;</span></p>
407
-<p id="t88" class="stm run hide_run">    <span class="key">return</span> <span class="nam">advice</span><span class="strut">&nbsp;</span></p>
408
-<p id="t89" class="pln"><span class="strut">&nbsp;</span></p>
409
-<p id="t90" class="pln"><span class="strut">&nbsp;</span></p>
410
-<p id="t91" class="pln"><span class="com"># In[ ]:</span><span class="strut">&nbsp;</span></p>
411
-<p id="t92" class="pln"><span class="strut">&nbsp;</span></p>
412
-<p id="t93" class="pln"><span class="strut">&nbsp;</span></p>
413
-<p id="t94" class="stm run hide_run"><span class="key">def</span> <span class="nam">preable</span><span class="op">(</span><span class="nam">do</span><span class="op">:</span> <span class="nam">Callable</span><span class="op">[</span><span class="op">[</span><span class="op">]</span><span class="op">,</span> <span class="key">None</span><span class="op">]</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Advice</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
414
-<p id="t95" class="pln">    <span class="str">"""Call do before f."""</span><span class="strut">&nbsp;</span></p>
415
-<p id="t96" class="pln"><span class="strut">&nbsp;</span></p>
416
-<p id="t97" class="stm run hide_run">    <span class="key">def</span> <span class="nam">advice</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
417
-<p id="t98" class="stm run hide_run">        <span class="op">@</span><span class="nam">wraps</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
418
-<p id="t99" class="pln">        <span class="key">def</span> <span class="nam">wrapped</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
419
-<p id="t100" class="stm run hide_run">            <span class="nam">do</span><span class="op">(</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
420
-<p id="t101" class="pln"><span class="strut">&nbsp;</span></p>
421
-<p id="t102" class="stm run hide_run">            <span class="key">return</span> <span class="nam">f</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
422
-<p id="t103" class="pln"><span class="strut">&nbsp;</span></p>
423
-<p id="t104" class="stm run hide_run">        <span class="key">return</span> <span class="nam">wrapped</span><span class="strut">&nbsp;</span></p>
424
-<p id="t105" class="pln"><span class="strut">&nbsp;</span></p>
425
-<p id="t106" class="stm run hide_run">    <span class="key">return</span> <span class="nam">advice</span><span class="strut">&nbsp;</span></p>
426
-<p id="t107" class="pln"><span class="strut">&nbsp;</span></p>
427
-<p id="t108" class="pln"><span class="strut">&nbsp;</span></p>
428
-<p id="t109" class="pln"><span class="com"># In[6]:</span><span class="strut">&nbsp;</span></p>
429
-<p id="t110" class="pln"><span class="strut">&nbsp;</span></p>
430
-<p id="t111" class="pln"><span class="strut">&nbsp;</span></p>
431
-<p id="t112" class="stm run hide_run"><span class="key">def</span> <span class="nam">postable</span><span class="op">(</span><span class="nam">do</span><span class="op">:</span> <span class="nam">Callable</span><span class="op">[</span><span class="op">[</span><span class="op">]</span><span class="op">,</span> <span class="key">None</span><span class="op">]</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Advice</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
432
-<p id="t113" class="pln">    <span class="str">"""Call do after f."""</span><span class="strut">&nbsp;</span></p>
433
-<p id="t114" class="pln"><span class="strut">&nbsp;</span></p>
434
-<p id="t115" class="stm run hide_run">    <span class="key">def</span> <span class="nam">advice</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
435
-<p id="t116" class="stm run hide_run">        <span class="op">@</span><span class="nam">wraps</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
436
-<p id="t117" class="pln">        <span class="key">def</span> <span class="nam">wrapped</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
437
-<p id="t118" class="stm run hide_run">            <span class="nam">state</span> <span class="op">=</span> <span class="nam">f</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
438
-<p id="t119" class="stm run hide_run">            <span class="nam">do</span><span class="op">(</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
439
-<p id="t120" class="pln"><span class="strut">&nbsp;</span></p>
440
-<p id="t121" class="stm run hide_run">            <span class="key">return</span> <span class="nam">state</span><span class="strut">&nbsp;</span></p>
441
-<p id="t122" class="pln"><span class="strut">&nbsp;</span></p>
442
-<p id="t123" class="stm run hide_run">        <span class="key">return</span> <span class="nam">wrapped</span><span class="strut">&nbsp;</span></p>
443
-<p id="t124" class="pln"><span class="strut">&nbsp;</span></p>
444
-<p id="t125" class="stm run hide_run">    <span class="key">return</span> <span class="nam">advice</span><span class="strut">&nbsp;</span></p>
445
-<p id="t126" class="pln"><span class="strut">&nbsp;</span></p>
446
-<p id="t127" class="pln"><span class="strut">&nbsp;</span></p>
447
-<p id="t128" class="pln"><span class="com"># In[2]:</span><span class="strut">&nbsp;</span></p>
448
-<p id="t129" class="pln"><span class="strut">&nbsp;</span></p>
449
-<p id="t130" class="pln"><span class="strut">&nbsp;</span></p>
450
-<p id="t131" class="stm run hide_run"><span class="key">def</span> <span class="nam">optional</span><span class="op">(</span><span class="nam">x</span><span class="op">:</span> <span class="nam">Any</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Advice</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
451
-<p id="t132" class="pln">    <span class="str">"""Return x when f returns None."""</span><span class="strut">&nbsp;</span></p>
452
-<p id="t133" class="pln"><span class="strut">&nbsp;</span></p>
453
-<p id="t134" class="stm run hide_run">    <span class="key">def</span> <span class="nam">advice</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
454
-<p id="t135" class="stm run hide_run">        <span class="op">@</span><span class="nam">wraps</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
455
-<p id="t136" class="pln">        <span class="key">def</span> <span class="nam">wrapped</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
456
-<p id="t137" class="stm run hide_run">            <span class="nam">state</span> <span class="op">=</span> <span class="nam">f</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
457
-<p id="t138" class="pln"><span class="strut">&nbsp;</span></p>
458
-<p id="t139" class="stm run hide_run">            <span class="key">if</span> <span class="nam">state</span> <span class="key">is</span> <span class="key">None</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
459
-<p id="t140" class="stm run hide_run">                <span class="key">return</span> <span class="nam">x</span><span class="strut">&nbsp;</span></p>
460
-<p id="t141" class="pln"><span class="strut">&nbsp;</span></p>
461
-<p id="t142" class="stm run hide_run">            <span class="key">return</span> <span class="nam">state</span><span class="strut">&nbsp;</span></p>
462
-<p id="t143" class="pln"><span class="strut">&nbsp;</span></p>
463
-<p id="t144" class="stm run hide_run">        <span class="key">return</span> <span class="nam">wrapped</span><span class="strut">&nbsp;</span></p>
464
-<p id="t145" class="pln"><span class="strut">&nbsp;</span></p>
465
-<p id="t146" class="stm run hide_run">    <span class="key">return</span> <span class="nam">advice</span><span class="strut">&nbsp;</span></p>
466
-<p id="t147" class="pln"><span class="strut">&nbsp;</span></p>
467
-<p id="t148" class="pln"><span class="strut">&nbsp;</span></p>
468
-<p id="t149" class="pln"><span class="com"># In[ ]:</span><span class="strut">&nbsp;</span></p>
469
-<p id="t150" class="pln"><span class="strut">&nbsp;</span></p>
470
-<p id="t151" class="pln"><span class="strut">&nbsp;</span></p>
471
-<p id="t152" class="stm run hide_run"><span class="key">def</span> <span class="nam">retryable</span><span class="op">(</span><span class="nam">d</span><span class="op">:</span> <span class="nam">Any</span> <span class="op">=</span> <span class="key">None</span><span class="op">,</span> <span class="nam">n</span><span class="op">:</span> <span class="nam">int</span> <span class="op">=</span> <span class="num">3</span><span class="op">,</span> <span class="nam">on</span><span class="op">:</span> <span class="nam">Type</span><span class="op">[</span><span class="nam">Exception</span><span class="op">]</span> <span class="op">=</span> <span class="nam">Exception</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Advice</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
472
-<p id="t153" class="pln">    <span class="str">"""Retry f n times until success."""</span><span class="strut">&nbsp;</span></p>
473
-<p id="t154" class="pln"><span class="strut">&nbsp;</span></p>
474
-<p id="t155" class="stm run hide_run">    <span class="key">def</span> <span class="nam">advice</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
475
-<p id="t156" class="stm run hide_run">        <span class="op">@</span><span class="nam">wraps</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
476
-<p id="t157" class="pln">        <span class="key">def</span> <span class="nam">wrapped</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
477
-<p id="t158" class="stm run hide_run">            <span class="key">for</span> <span class="nam">_</span> <span class="key">in</span> <span class="nam">range</span><span class="op">(</span><span class="nam">n</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
478
-<p id="t159" class="stm run hide_run">                <span class="key">try</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
479
-<p id="t160" class="stm run hide_run">                    <span class="key">return</span> <span class="nam">f</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
480
-<p id="t161" class="stm run hide_run">                <span class="key">except</span> <span class="nam">on</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
481
-<p id="t162" class="stm run hide_run">                    <span class="key">pass</span><span class="strut">&nbsp;</span></p>
482
-<p id="t163" class="pln"><span class="strut">&nbsp;</span></p>
483
-<p id="t164" class="stm run hide_run">            <span class="key">return</span> <span class="nam">d</span><span class="strut">&nbsp;</span></p>
484
-<p id="t165" class="pln"><span class="strut">&nbsp;</span></p>
485
-<p id="t166" class="stm run hide_run">        <span class="key">return</span> <span class="nam">wrapped</span><span class="strut">&nbsp;</span></p>
486
-<p id="t167" class="pln"><span class="strut">&nbsp;</span></p>
487
-<p id="t168" class="stm run hide_run">    <span class="key">return</span> <span class="nam">advice</span><span class="strut">&nbsp;</span></p>
488
-<p id="t169" class="pln"><span class="strut">&nbsp;</span></p>
489
-<p id="t170" class="pln"><span class="strut">&nbsp;</span></p>
490
-<p id="t171" class="pln"><span class="com"># In[5]:</span><span class="strut">&nbsp;</span></p>
491
-<p id="t172" class="pln"><span class="strut">&nbsp;</span></p>
492
-<p id="t173" class="pln"><span class="strut">&nbsp;</span></p>
493
-<p id="t174" class="stm run hide_run"><span class="key">def</span> <span class="nam">exceptional</span><span class="op">(</span><span class="nam">x</span><span class="op">:</span> <span class="nam">Any</span> <span class="op">=</span> <span class="key">None</span><span class="op">,</span> <span class="nam">on</span><span class="op">:</span> <span class="nam">Type</span><span class="op">[</span><span class="nam">Exception</span><span class="op">]</span> <span class="op">=</span> <span class="nam">Exception</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Advice</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
494
-<p id="t175" class="pln">    <span class="str">"""Return x when f raises an exception."""</span><span class="strut">&nbsp;</span></p>
495
-<p id="t176" class="pln"><span class="strut">&nbsp;</span></p>
496
-<p id="t177" class="stm run hide_run">    <span class="key">def</span> <span class="nam">advice</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
497
-<p id="t178" class="stm run hide_run">        <span class="op">@</span><span class="nam">wraps</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
498
-<p id="t179" class="pln">        <span class="key">def</span> <span class="nam">wrapped</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
499
-<p id="t180" class="stm run hide_run">            <span class="key">try</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
500
-<p id="t181" class="stm run hide_run">                <span class="key">return</span> <span class="nam">f</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
501
-<p id="t182" class="stm run hide_run">            <span class="key">except</span> <span class="nam">on</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
502
-<p id="t183" class="stm run hide_run">                <span class="key">return</span> <span class="nam">x</span><span class="strut">&nbsp;</span></p>
503
-<p id="t184" class="pln"><span class="strut">&nbsp;</span></p>
504
-<p id="t185" class="stm run hide_run">        <span class="key">return</span> <span class="nam">wrapped</span><span class="strut">&nbsp;</span></p>
505
-<p id="t186" class="pln"><span class="strut">&nbsp;</span></p>
506
-<p id="t187" class="stm run hide_run">    <span class="key">return</span> <span class="nam">advice</span><span class="strut">&nbsp;</span></p>
507
-<p id="t188" class="pln"><span class="strut">&nbsp;</span></p>
508
-<p id="t189" class="pln"><span class="strut">&nbsp;</span></p>
509
-<p id="t190" class="pln"><span class="com"># In[4]:</span><span class="strut">&nbsp;</span></p>
510
-<p id="t191" class="pln"><span class="strut">&nbsp;</span></p>
511
-<p id="t192" class="pln"><span class="strut">&nbsp;</span></p>
512
-<p id="t193" class="stm run hide_run"><span class="key">def</span> <span class="nam">loggable</span><span class="op">(</span><span class="strut">&nbsp;</span></p>
513
-<p id="t194" class="pln">    <span class="nam">logger</span><span class="op">:</span> <span class="nam">Callable</span><span class="op">[</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span><span class="op">,</span> <span class="key">None</span><span class="op">]</span> <span class="op">=</span> <span class="nam">logging</span><span class="op">.</span><span class="nam">info</span><span class="op">,</span> <span class="nam">pre</span><span class="op">:</span> <span class="nam">bool</span> <span class="op">=</span> <span class="key">True</span><span class="op">,</span> <span class="nam">post</span><span class="op">:</span> <span class="nam">bool</span> <span class="op">=</span> <span class="key">True</span><span class="strut">&nbsp;</span></p>
514
-<p id="t195" class="pln"><span class="op">)</span> <span class="op">-></span> <span class="nam">Advice</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
515
-<p id="t196" class="pln">    <span class="str">"""Log f before and/or after call."""</span><span class="strut">&nbsp;</span></p>
516
-<p id="t197" class="pln"><span class="strut">&nbsp;</span></p>
517
-<p id="t198" class="stm run hide_run">    <span class="key">def</span> <span class="nam">advice</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
518
-<p id="t199" class="stm run hide_run">        <span class="op">@</span><span class="nam">wraps</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
519
-<p id="t200" class="pln">        <span class="key">def</span> <span class="nam">wrapped</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
520
-<p id="t201" class="stm run hide_run">            <span class="key">if</span> <span class="nam">pre</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
521
-<p id="t202" class="stm run hide_run">                <span class="nam">logger</span><span class="op">(</span><span class="str">"enter: {}"</span><span class="op">.</span><span class="nam">format</span><span class="op">(</span><span class="nam">f</span><span class="op">.</span><span class="nam">__name__</span><span class="op">)</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
522
-<p id="t203" class="pln"><span class="strut">&nbsp;</span></p>
523
-<p id="t204" class="stm run hide_run">            <span class="nam">state</span> <span class="op">=</span> <span class="nam">f</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
524
-<p id="t205" class="pln"><span class="strut">&nbsp;</span></p>
525
-<p id="t206" class="stm run hide_run">            <span class="key">if</span> <span class="nam">post</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
526
-<p id="t207" class="stm run hide_run">                <span class="nam">logger</span><span class="op">(</span><span class="str">"exit: {}"</span><span class="op">.</span><span class="nam">format</span><span class="op">(</span><span class="nam">f</span><span class="op">.</span><span class="nam">__name__</span><span class="op">)</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
527
-<p id="t208" class="pln"><span class="strut">&nbsp;</span></p>
528
-<p id="t209" class="stm run hide_run">            <span class="key">return</span> <span class="nam">state</span><span class="strut">&nbsp;</span></p>
529
-<p id="t210" class="pln"><span class="strut">&nbsp;</span></p>
530
-<p id="t211" class="stm run hide_run">        <span class="key">return</span> <span class="nam">wrapped</span><span class="strut">&nbsp;</span></p>
531
-<p id="t212" class="pln"><span class="strut">&nbsp;</span></p>
532
-<p id="t213" class="stm run hide_run">    <span class="key">return</span> <span class="nam">advice</span><span class="strut">&nbsp;</span></p>
533
-<p id="t214" class="pln"><span class="strut">&nbsp;</span></p>
534
-<p id="t215" class="pln"><span class="strut">&nbsp;</span></p>
535
-<p id="t216" class="pln"><span class="com"># In[7]:</span><span class="strut">&nbsp;</span></p>
536
-<p id="t217" class="pln"><span class="strut">&nbsp;</span></p>
537
-<p id="t218" class="pln"><span class="strut">&nbsp;</span></p>
538
-<p id="t219" class="stm run hide_run"><span class="key">def</span> <span class="nam">traceable</span><span class="op">(</span><span class="strut">&nbsp;</span></p>
539
-<p id="t220" class="pln">    <span class="nam">printer</span><span class="op">:</span> <span class="nam">Callable</span><span class="op">[</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span><span class="op">,</span> <span class="key">None</span><span class="op">]</span> <span class="op">=</span> <span class="nam">print</span><span class="op">,</span> <span class="nam">pre</span><span class="op">:</span> <span class="nam">bool</span> <span class="op">=</span> <span class="key">True</span><span class="op">,</span> <span class="nam">post</span><span class="op">:</span> <span class="nam">bool</span> <span class="op">=</span> <span class="key">False</span><span class="strut">&nbsp;</span></p>
540
-<p id="t221" class="pln"><span class="op">)</span> <span class="op">-></span> <span class="nam">Advice</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
541
-<p id="t222" class="pln">    <span class="str">"""Print f trace before and/or after call."""</span><span class="strut">&nbsp;</span></p>
542
-<p id="t223" class="pln"><span class="strut">&nbsp;</span></p>
543
-<p id="t224" class="stm run hide_run">    <span class="key">def</span> <span class="nam">advice</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
544
-<p id="t225" class="stm run hide_run">        <span class="op">@</span><span class="nam">wraps</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
545
-<p id="t226" class="pln">        <span class="key">def</span> <span class="nam">wrapped</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
546
-<p id="t227" class="stm run hide_run">            <span class="nam">strf</span> <span class="op">=</span> <span class="nam">f</span><span class="op">.</span><span class="nam">__name__</span><span class="strut">&nbsp;</span></p>
547
-<p id="t228" class="stm run hide_run">            <span class="nam">strargs</span> <span class="op">=</span> <span class="op">[</span><span class="nam">str</span><span class="op">(</span><span class="nam">x</span><span class="op">)</span> <span class="key">for</span> <span class="nam">x</span> <span class="key">in</span> <span class="nam">args</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
548
-<p id="t229" class="stm run hide_run">            <span class="nam">strkwargs</span> <span class="op">=</span> <span class="op">[</span><span class="str">"{0}={1}"</span><span class="op">.</span><span class="nam">format</span><span class="op">(</span><span class="nam">k</span><span class="op">,</span> <span class="nam">v</span><span class="op">)</span> <span class="key">for</span> <span class="nam">k</span><span class="op">,</span> <span class="nam">v</span> <span class="key">in</span> <span class="nam">kwargs</span><span class="op">.</span><span class="nam">items</span><span class="op">(</span><span class="op">)</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
549
-<p id="t230" class="stm run hide_run">            <span class="nam">inittrace</span> <span class="op">=</span> <span class="str">"{0}({1})"</span><span class="op">.</span><span class="nam">format</span><span class="op">(</span><span class="nam">strf</span><span class="op">,</span> <span class="str">","</span><span class="op">.</span><span class="nam">join</span><span class="op">(</span><span class="nam">strargs</span> <span class="op">+</span> <span class="nam">strkwargs</span><span class="op">)</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
550
-<p id="t231" class="pln"><span class="strut">&nbsp;</span></p>
551
-<p id="t232" class="stm run hide_run">            <span class="key">if</span> <span class="nam">pre</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
552
-<p id="t233" class="stm run hide_run">                <span class="nam">printer</span><span class="op">(</span><span class="str">"[PRE] {}"</span><span class="op">.</span><span class="nam">format</span><span class="op">(</span><span class="nam">inittrace</span><span class="op">)</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
553
-<p id="t234" class="pln"><span class="strut">&nbsp;</span></p>
554
-<p id="t235" class="stm run hide_run">            <span class="nam">state</span> <span class="op">=</span> <span class="nam">f</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
555
-<p id="t236" class="stm run hide_run">            <span class="nam">exittrace</span> <span class="op">=</span> <span class="nam">str</span><span class="op">(</span><span class="nam">state</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
556
-<p id="t237" class="pln"><span class="strut">&nbsp;</span></p>
557
-<p id="t238" class="stm run hide_run">            <span class="key">if</span> <span class="nam">post</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
558
-<p id="t239" class="stm run hide_run">                <span class="nam">printer</span><span class="op">(</span><span class="str">"[POST] {} -> {}"</span><span class="op">.</span><span class="nam">format</span><span class="op">(</span><span class="nam">inittrace</span><span class="op">,</span> <span class="nam">exittrace</span><span class="op">)</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
559
-<p id="t240" class="pln"><span class="strut">&nbsp;</span></p>
560
-<p id="t241" class="stm run hide_run">            <span class="key">return</span> <span class="nam">state</span><span class="strut">&nbsp;</span></p>
561
-<p id="t242" class="pln"><span class="strut">&nbsp;</span></p>
562
-<p id="t243" class="stm run hide_run">        <span class="key">return</span> <span class="nam">wrapped</span><span class="strut">&nbsp;</span></p>
563
-<p id="t244" class="pln"><span class="strut">&nbsp;</span></p>
564
-<p id="t245" class="stm run hide_run">    <span class="key">return</span> <span class="nam">advice</span><span class="strut">&nbsp;</span></p>
565
-
566
-            </td>
567
-        </tr>
568
-    </table>
569
-</div>
570
-
571
-<div id="footer">
572
-    <div class="content">
573
-        <p>
574
-            <a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v4.5.1</a>,
575
-            created at 2018-10-18 15:49
576
-        </p>
577
-    </div>
578
-</div>
579
-
580
-</body>
581
-</html>

+ 0
- 141
covers/htmlcov/gampy_errors_py.html View File

@@ -1,141 +0,0 @@
1
-
2
-
3
-
4
-<!DOCTYPE html>
5
-<html>
6
-<head>
7
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8
-    
9
-    
10
-    <meta http-equiv="X-UA-Compatible" content="IE=emulateIE7" />
11
-    <title>Coverage for gampy/errors.py: 100%</title>
12
-    <link rel="stylesheet" href="style.css" type="text/css">
13
-    
14
-    <script type="text/javascript" src="jquery.min.js"></script>
15
-    <script type="text/javascript" src="jquery.hotkeys.js"></script>
16
-    <script type="text/javascript" src="jquery.isonscreen.js"></script>
17
-    <script type="text/javascript" src="coverage_html.js"></script>
18
-    <script type="text/javascript">
19
-        jQuery(document).ready(coverage.pyfile_ready);
20
-    </script>
21
-</head>
22
-<body class="pyfile">
23
-
24
-<div id="header">
25
-    <div class="content">
26
-        <h1>Coverage for <b>gampy/errors.py</b> :
27
-            <span class="pc_cov">100%</span>
28
-        </h1>
29
-
30
-        <img id="keyboard_icon" src="keybd_closed.png" alt="Show keyboard shortcuts" />
31
-
32
-        <h2 class="stats">
33
-            7 statements &nbsp;
34
-            <span class="run hide_run shortkey_r button_toggle_run">7 run</span>
35
-            <span class="mis shortkey_m button_toggle_mis">0 missing</span>
36
-            <span class="exc shortkey_x button_toggle_exc">0 excluded</span>
37
-
38
-            
39
-                <span class="par run hide_run shortkey_p button_toggle_par">0 partial</span>
40
-            
41
-        </h2>
42
-    </div>
43
-</div>
44
-
45
-<div class="help_panel">
46
-    <img id="panel_icon" src="keybd_open.png" alt="Hide keyboard shortcuts" />
47
-    <p class="legend">Hot-keys on this page</p>
48
-    <div>
49
-    <p class="keyhelp">
50
-        <span class="key">r</span>
51
-        <span class="key">m</span>
52
-        <span class="key">x</span>
53
-        <span class="key">p</span> &nbsp; toggle line displays
54
-    </p>
55
-    <p class="keyhelp">
56
-        <span class="key">j</span>
57
-        <span class="key">k</span> &nbsp; next/prev highlighted chunk
58
-    </p>
59
-    <p class="keyhelp">
60
-        <span class="key">0</span> &nbsp; (zero) top of page
61
-    </p>
62
-    <p class="keyhelp">
63
-        <span class="key">1</span> &nbsp; (one) first highlighted chunk
64
-    </p>
65
-    </div>
66
-</div>
67
-
68
-<div id="source">
69
-    <table>
70
-        <tr>
71
-            <td class="linenos">
72
-<p id="n1" class="pln"><a href="#n1">1</a></p>
73
-<p id="n2" class="pln"><a href="#n2">2</a></p>
74
-<p id="n3" class="pln"><a href="#n3">3</a></p>
75
-<p id="n4" class="pln"><a href="#n4">4</a></p>
76
-<p id="n5" class="pln"><a href="#n5">5</a></p>
77
-<p id="n6" class="pln"><a href="#n6">6</a></p>
78
-<p id="n7" class="stm run hide_run"><a href="#n7">7</a></p>
79
-<p id="n8" class="pln"><a href="#n8">8</a></p>
80
-<p id="n9" class="pln"><a href="#n9">9</a></p>
81
-<p id="n10" class="stm run hide_run"><a href="#n10">10</a></p>
82
-<p id="n11" class="pln"><a href="#n11">11</a></p>
83
-<p id="n12" class="pln"><a href="#n12">12</a></p>
84
-<p id="n13" class="stm run hide_run"><a href="#n13">13</a></p>
85
-<p id="n14" class="pln"><a href="#n14">14</a></p>
86
-<p id="n15" class="pln"><a href="#n15">15</a></p>
87
-<p id="n16" class="stm run hide_run"><a href="#n16">16</a></p>
88
-<p id="n17" class="pln"><a href="#n17">17</a></p>
89
-<p id="n18" class="pln"><a href="#n18">18</a></p>
90
-<p id="n19" class="stm run hide_run"><a href="#n19">19</a></p>
91
-<p id="n20" class="pln"><a href="#n20">20</a></p>
92
-<p id="n21" class="pln"><a href="#n21">21</a></p>
93
-<p id="n22" class="stm run hide_run"><a href="#n22">22</a></p>
94
-<p id="n23" class="pln"><a href="#n23">23</a></p>
95
-<p id="n24" class="pln"><a href="#n24">24</a></p>
96
-<p id="n25" class="stm run hide_run"><a href="#n25">25</a></p>
97
-
98
-            </td>
99
-            <td class="text">
100
-<p id="t1" class="pln"><span class="com">#!/usr/bin/env python</span><span class="strut">&nbsp;</span></p>
101
-<p id="t2" class="pln"><span class="com"># coding: utf-8</span><span class="strut">&nbsp;</span></p>
102
-<p id="t3" class="pln"><span class="strut">&nbsp;</span></p>
103
-<p id="t4" class="pln"><span class="com"># In[2]:</span><span class="strut">&nbsp;</span></p>
104
-<p id="t5" class="pln"><span class="strut">&nbsp;</span></p>
105
-<p id="t6" class="pln"><span class="strut">&nbsp;</span></p>
106
-<p id="t7" class="stm run hide_run"><span class="str">"""Errors of the project."""</span><span class="strut">&nbsp;</span></p>
107
-<p id="t8" class="pln"><span class="strut">&nbsp;</span></p>
108
-<p id="t9" class="pln"><span class="strut">&nbsp;</span></p>
109
-<p id="t10" class="stm run hide_run"><span class="key">class</span> <span class="nam">Error</span><span class="op">(</span><span class="nam">Exception</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
110
-<p id="t11" class="pln">    <span class="str">"""Base class for errors."""</span><span class="strut">&nbsp;</span></p>
111
-<p id="t12" class="pln"><span class="strut">&nbsp;</span></p>
112
-<p id="t13" class="stm run hide_run">    <span class="key">pass</span><span class="strut">&nbsp;</span></p>
113
-<p id="t14" class="pln"><span class="strut">&nbsp;</span></p>
114
-<p id="t15" class="pln"><span class="strut">&nbsp;</span></p>
115
-<p id="t16" class="stm run hide_run"><span class="key">class</span> <span class="nam">DefinitionError</span><span class="op">(</span><span class="nam">Error</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
116
-<p id="t17" class="pln">    <span class="str">"""Error during definition."""</span><span class="strut">&nbsp;</span></p>
117
-<p id="t18" class="pln"><span class="strut">&nbsp;</span></p>
118
-<p id="t19" class="stm run hide_run">    <span class="key">pass</span><span class="strut">&nbsp;</span></p>
119
-<p id="t20" class="pln"><span class="strut">&nbsp;</span></p>
120
-<p id="t21" class="pln"><span class="strut">&nbsp;</span></p>
121
-<p id="t22" class="stm run hide_run"><span class="key">class</span> <span class="nam">CompositionError</span><span class="op">(</span><span class="nam">Error</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
122
-<p id="t23" class="pln">    <span class="str">"""Error during composition."""</span><span class="strut">&nbsp;</span></p>
123
-<p id="t24" class="pln"><span class="strut">&nbsp;</span></p>
124
-<p id="t25" class="stm run hide_run">    <span class="key">pass</span><span class="strut">&nbsp;</span></p>
125
-
126
-            </td>
127
-        </tr>
128
-    </table>
129
-</div>
130
-
131
-<div id="footer">
132
-    <div class="content">
133
-        <p>
134
-            <a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v4.5.1</a>,
135
-            created at 2018-10-18 10:59
136
-        </p>
137
-    </div>
138
-</div>
139
-
140
-</body>
141
-</html>

+ 0
- 723
covers/htmlcov/gampy_structures_py.html View File

@@ -1,723 +0,0 @@
1
-
2
-
3
-
4
-<!DOCTYPE html>
5
-<html>
6
-<head>
7
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8
-    
9
-    
10
-    <meta http-equiv="X-UA-Compatible" content="IE=emulateIE7" />
11
-    <title>Coverage for gampy/structures.py: 100%</title>
12
-    <link rel="stylesheet" href="style.css" type="text/css">
13
-    
14
-    <script type="text/javascript" src="jquery.min.js"></script>
15
-    <script type="text/javascript" src="jquery.hotkeys.js"></script>
16
-    <script type="text/javascript" src="jquery.isonscreen.js"></script>
17
-    <script type="text/javascript" src="coverage_html.js"></script>
18
-    <script type="text/javascript">
19
-        jQuery(document).ready(coverage.pyfile_ready);
20
-    </script>
21
-</head>
22
-<body class="pyfile">
23
-
24
-<div id="header">
25
-    <div class="content">
26
-        <h1>Coverage for <b>gampy/structures.py</b> :
27
-            <span class="pc_cov">100%</span>
28
-        </h1>
29
-
30
-        <img id="keyboard_icon" src="keybd_closed.png" alt="Show keyboard shortcuts" />
31
-
32
-        <h2 class="stats">
33
-            158 statements &nbsp;
34
-            <span class="run hide_run shortkey_r button_toggle_run">158 run</span>
35
-            <span class="mis shortkey_m button_toggle_mis">0 missing</span>
36
-            <span class="exc shortkey_x button_toggle_exc">0 excluded</span>
37
-
38
-            
39
-                <span class="par run hide_run shortkey_p button_toggle_par">0 partial</span>
40
-            
41
-        </h2>
42
-    </div>
43
-</div>
44
-
45
-<div class="help_panel">
46
-    <img id="panel_icon" src="keybd_open.png" alt="Hide keyboard shortcuts" />
47
-    <p class="legend">Hot-keys on this page</p>
48
-    <div>
49
-    <p class="keyhelp">
50
-        <span class="key">r</span>
51
-        <span class="key">m</span>
52
-        <span class="key">x</span>
53
-        <span class="key">p</span> &nbsp; toggle line displays
54
-    </p>
55
-    <p class="keyhelp">
56
-        <span class="key">j</span>
57
-        <span class="key">k</span> &nbsp; next/prev highlighted chunk
58
-    </p>
59
-    <p class="keyhelp">
60
-        <span class="key">0</span> &nbsp; (zero) top of page
61
-    </p>
62
-    <p class="keyhelp">
63
-        <span class="key">1</span> &nbsp; (one) first highlighted chunk
64
-    </p>
65
-    </div>
66
-</div>
67
-
68
-<div id="source">
69
-    <table>
70
-        <tr>
71
-            <td class="linenos">
72
-<p id="n1" class="pln"><a href="#n1">1</a></p>
73
-<p id="n2" class="pln"><a href="#n2">2</a></p>
74
-<p id="n3" class="pln"><a href="#n3">3</a></p>
75
-<p id="n4" class="pln"><a href="#n4">4</a></p>
76
-<p id="n5" class="pln"><a href="#n5">5</a></p>
77
-<p id="n6" class="pln"><a href="#n6">6</a></p>
78
-<p id="n7" class="stm run hide_run"><a href="#n7">7</a></p>
79
-<p id="n8" class="pln"><a href="#n8">8</a></p>
80
-<p id="n9" class="stm run hide_run"><a href="#n9">9</a></p>
81
-<p id="n10" class="stm run hide_run"><a href="#n10">10</a></p>
82
-<p id="n11" class="pln"><a href="#n11">11</a></p>
83
-<p id="n12" class="stm run hide_run"><a href="#n12">12</a></p>
84
-<p id="n13" class="pln"><a href="#n13">13</a></p>
85
-<p id="n14" class="stm run hide_run"><a href="#n14">14</a></p>
86
-<p id="n15" class="pln"><a href="#n15">15</a></p>
87
-<p id="n16" class="pln"><a href="#n16">16</a></p>
88
-<p id="n17" class="pln"><a href="#n17">17</a></p>
89
-<p id="n18" class="pln"><a href="#n18">18</a></p>
90
-<p id="n19" class="pln"><a href="#n19">19</a></p>
91
-<p id="n20" class="pln"><a href="#n20">20</a></p>
92
-<p id="n21" class="pln"><a href="#n21">21</a></p>
93
-<p id="n22" class="stm run hide_run"><a href="#n22">22</a></p>
94
-<p id="n23" class="stm run hide_run"><a href="#n23">23</a></p>
95
-<p id="n24" class="stm run hide_run"><a href="#n24">24</a></p>
96
-<p id="n25" class="pln"><a href="#n25">25</a></p>
97
-<p id="n26" class="stm run hide_run"><a href="#n26">26</a></p>
98
-<p id="n27" class="stm run hide_run"><a href="#n27">27</a></p>
99
-<p id="n28" class="stm run hide_run"><a href="#n28">28</a></p>
100
-<p id="n29" class="pln"><a href="#n29">29</a></p>
101
-<p id="n30" class="pln"><a href="#n30">30</a></p>
102
-<p id="n31" class="pln"><a href="#n31">31</a></p>
103
-<p id="n32" class="pln"><a href="#n32">32</a></p>
104
-<p id="n33" class="pln"><a href="#n33">33</a></p>
105
-<p id="n34" class="stm run hide_run"><a href="#n34">34</a></p>
106
-<p id="n35" class="pln"><a href="#n35">35</a></p>
107
-<p id="n36" class="pln"><a href="#n36">36</a></p>
108
-<p id="n37" class="stm run hide_run"><a href="#n37">37</a></p>
109
-<p id="n38" class="pln"><a href="#n38">38</a></p>
110
-<p id="n39" class="stm run hide_run"><a href="#n39">39</a></p>
111
-<p id="n40" class="stm run hide_run"><a href="#n40">40</a></p>
112
-<p id="n41" class="pln"><a href="#n41">41</a></p>
113
-<p id="n42" class="pln"><a href="#n42">42</a></p>
114
-<p id="n43" class="pln"><a href="#n43">43</a></p>
115
-<p id="n44" class="stm run hide_run"><a href="#n44">44</a></p>
116
-<p id="n45" class="pln"><a href="#n45">45</a></p>
117
-<p id="n46" class="stm run hide_run"><a href="#n46">46</a></p>
118
-<p id="n47" class="pln"><a href="#n47">47</a></p>
119
-<p id="n48" class="stm run hide_run"><a href="#n48">48</a></p>
120
-<p id="n49" class="pln"><a href="#n49">49</a></p>
121
-<p id="n50" class="pln"><a href="#n50">50</a></p>
122
-<p id="n51" class="pln"><a href="#n51">51</a></p>
123
-<p id="n52" class="stm run hide_run"><a href="#n52">52</a></p>
124
-<p id="n53" class="stm run hide_run"><a href="#n53">53</a></p>
125
-<p id="n54" class="pln"><a href="#n54">54</a></p>
126
-<p id="n55" class="stm run hide_run"><a href="#n55">55</a></p>
127
-<p id="n56" class="pln"><a href="#n56">56</a></p>
128
-<p id="n57" class="stm run hide_run"><a href="#n57">57</a></p>
129
-<p id="n58" class="stm run hide_run"><a href="#n58">58</a></p>
130
-<p id="n59" class="pln"><a href="#n59">59</a></p>
131
-<p id="n60" class="stm run hide_run"><a href="#n60">60</a></p>
132
-<p id="n61" class="pln"><a href="#n61">61</a></p>
133
-<p id="n62" class="stm run hide_run"><a href="#n62">62</a></p>
134
-<p id="n63" class="stm run hide_run"><a href="#n63">63</a></p>
135
-<p id="n64" class="stm run hide_run"><a href="#n64">64</a></p>
136
-<p id="n65" class="stm run hide_run"><a href="#n65">65</a></p>
137
-<p id="n66" class="pln"><a href="#n66">66</a></p>
138
-<p id="n67" class="pln"><a href="#n67">67</a></p>
139
-<p id="n68" class="stm run hide_run"><a href="#n68">68</a></p>
140
-<p id="n69" class="stm run hide_run"><a href="#n69">69</a></p>
141
-<p id="n70" class="stm run hide_run"><a href="#n70">70</a></p>
142
-<p id="n71" class="stm run hide_run"><a href="#n71">71</a></p>
143
-<p id="n72" class="stm run hide_run"><a href="#n72">72</a></p>
144
-<p id="n73" class="stm run hide_run"><a href="#n73">73</a></p>
145
-<p id="n74" class="stm run hide_run"><a href="#n74">74</a></p>
146
-<p id="n75" class="stm run hide_run"><a href="#n75">75</a></p>
147
-<p id="n76" class="stm run hide_run"><a href="#n76">76</a></p>
148
-<p id="n77" class="stm run hide_run"><a href="#n77">77</a></p>
149
-<p id="n78" class="stm run hide_run"><a href="#n78">78</a></p>
150
-<p id="n79" class="stm run hide_run"><a href="#n79">79</a></p>
151
-<p id="n80" class="pln"><a href="#n80">80</a></p>
152
-<p id="n81" class="stm run hide_run"><a href="#n81">81</a></p>
153
-<p id="n82" class="pln"><a href="#n82">82</a></p>
154
-<p id="n83" class="pln"><a href="#n83">83</a></p>
155
-<p id="n84" class="pln"><a href="#n84">84</a></p>
156
-<p id="n85" class="pln"><a href="#n85">85</a></p>
157
-<p id="n86" class="pln"><a href="#n86">86</a></p>
158
-<p id="n87" class="stm run hide_run"><a href="#n87">87</a></p>
159
-<p id="n88" class="pln"><a href="#n88">88</a></p>
160
-<p id="n89" class="pln"><a href="#n89">89</a></p>
161
-<p id="n90" class="pln"><a href="#n90">90</a></p>
162
-<p id="n91" class="pln"><a href="#n91">91</a></p>
163
-<p id="n92" class="pln"><a href="#n92">92</a></p>
164
-<p id="n93" class="pln"><a href="#n93">93</a></p>
165
-<p id="n94" class="stm run hide_run"><a href="#n94">94</a></p>
166
-<p id="n95" class="stm run hide_run"><a href="#n95">95</a></p>
167
-<p id="n96" class="pln"><a href="#n96">96</a></p>
168
-<p id="n97" class="pln"><a href="#n97">97</a></p>
169
-<p id="n98" class="pln"><a href="#n98">98</a></p>
170
-<p id="n99" class="pln"><a href="#n99">99</a></p>
171
-<p id="n100" class="stm run hide_run"><a href="#n100">100</a></p>
172
-<p id="n101" class="stm run hide_run"><a href="#n101">101</a></p>
173
-<p id="n102" class="pln"><a href="#n102">102</a></p>
174
-<p id="n103" class="pln"><a href="#n103">103</a></p>
175
-<p id="n104" class="pln"><a href="#n104">104</a></p>
176
-<p id="n105" class="pln"><a href="#n105">105</a></p>
177
-<p id="n106" class="stm run hide_run"><a href="#n106">106</a></p>
178
-<p id="n107" class="stm run hide_run"><a href="#n107">107</a></p>
179
-<p id="n108" class="pln"><a href="#n108">108</a></p>
180
-<p id="n109" class="pln"><a href="#n109">109</a></p>
181
-<p id="n110" class="pln"><a href="#n110">110</a></p>
182
-<p id="n111" class="pln"><a href="#n111">111</a></p>
183
-<p id="n112" class="pln"><a href="#n112">112</a></p>
184
-<p id="n113" class="stm run hide_run"><a href="#n113">113</a></p>
185
-<p id="n114" class="stm run hide_run"><a href="#n114">114</a></p>
186
-<p id="n115" class="pln"><a href="#n115">115</a></p>
187
-<p id="n116" class="pln"><a href="#n116">116</a></p>
188
-<p id="n117" class="pln"><a href="#n117">117</a></p>
189
-<p id="n118" class="stm run hide_run"><a href="#n118">118</a></p>
190
-<p id="n119" class="pln"><a href="#n119">119</a></p>
191
-<p id="n120" class="stm run hide_run"><a href="#n120">120</a></p>
192
-<p id="n121" class="pln"><a href="#n121">121</a></p>
193
-<p id="n122" class="stm run hide_run"><a href="#n122">122</a></p>
194
-<p id="n123" class="pln"><a href="#n123">123</a></p>
195
-<p id="n124" class="stm run hide_run"><a href="#n124">124</a></p>
196
-<p id="n125" class="pln"><a href="#n125">125</a></p>
197
-<p id="n126" class="pln"><a href="#n126">126</a></p>
198
-<p id="n127" class="pln"><a href="#n127">127</a></p>
199
-<p id="n128" class="stm run hide_run"><a href="#n128">128</a></p>
200
-<p id="n129" class="pln"><a href="#n129">129</a></p>
201
-<p id="n130" class="stm run hide_run"><a href="#n130">130</a></p>
202
-<p id="n131" class="stm run hide_run"><a href="#n131">131</a></p>
203
-<p id="n132" class="stm run hide_run"><a href="#n132">132</a></p>
204
-<p id="n133" class="pln"><a href="#n133">133</a></p>
205
-<p id="n134" class="stm run hide_run"><a href="#n134">134</a></p>
206
-<p id="n135" class="pln"><a href="#n135">135</a></p>
207
-<p id="n136" class="stm run hide_run"><a href="#n136">136</a></p>
208
-<p id="n137" class="pln"><a href="#n137">137</a></p>
209
-<p id="n138" class="stm run hide_run"><a href="#n138">138</a></p>
210
-<p id="n139" class="pln"><a href="#n139">139</a></p>
211
-<p id="n140" class="stm run hide_run"><a href="#n140">140</a></p>
212
-<p id="n141" class="pln"><a href="#n141">141</a></p>
213
-<p id="n142" class="stm run hide_run"><a href="#n142">142</a></p>
214
-<p id="n143" class="pln"><a href="#n143">143</a></p>
215
-<p id="n144" class="stm run hide_run"><a href="#n144">144</a></p>
216
-<p id="n145" class="pln"><a href="#n145">145</a></p>
217
-<p id="n146" class="stm run hide_run"><a href="#n146">146</a></p>
218
-<p id="n147" class="pln"><a href="#n147">147</a></p>
219
-<p id="n148" class="stm run hide_run"><a href="#n148">148</a></p>
220
-<p id="n149" class="stm run hide_run"><a href="#n149">149</a></p>
221
-<p id="n150" class="stm run hide_run"><a href="#n150">150</a></p>
222
-<p id="n151" class="pln"><a href="#n151">151</a></p>
223
-<p id="n152" class="stm run hide_run"><a href="#n152">152</a></p>
224
-<p id="n153" class="pln"><a href="#n153">153</a></p>
225
-<p id="n154" class="stm run hide_run"><a href="#n154">154</a></p>
226
-<p id="n155" class="pln"><a href="#n155">155</a></p>
227
-<p id="n156" class="stm run hide_run"><a href="#n156">156</a></p>
228
-<p id="n157" class="pln"><a href="#n157">157</a></p>
229
-<p id="n158" class="stm run hide_run"><a href="#n158">158</a></p>
230
-<p id="n159" class="pln"><a href="#n159">159</a></p>
231
-<p id="n160" class="stm run hide_run"><a href="#n160">160</a></p>
232
-<p id="n161" class="pln"><a href="#n161">161</a></p>
233
-<p id="n162" class="stm run hide_run"><a href="#n162">162</a></p>
234
-<p id="n163" class="pln"><a href="#n163">163</a></p>
235
-<p id="n164" class="stm run hide_run"><a href="#n164">164</a></p>
236
-<p id="n165" class="stm run hide_run"><a href="#n165">165</a></p>
237
-<p id="n166" class="pln"><a href="#n166">166</a></p>
238
-<p id="n167" class="stm run hide_run"><a href="#n167">167</a></p>
239
-<p id="n168" class="pln"><a href="#n168">168</a></p>
240
-<p id="n169" class="stm run hide_run"><a href="#n169">169</a></p>
241
-<p id="n170" class="pln"><a href="#n170">170</a></p>
242
-<p id="n171" class="stm run hide_run"><a href="#n171">171</a></p>
243
-<p id="n172" class="pln"><a href="#n172">172</a></p>
244
-<p id="n173" class="stm run hide_run"><a href="#n173">173</a></p>
245
-<p id="n174" class="pln"><a href="#n174">174</a></p>
246
-<p id="n175" class="stm run hide_run"><a href="#n175">175</a></p>
247
-<p id="n176" class="pln"><a href="#n176">176</a></p>
248
-<p id="n177" class="stm run hide_run"><a href="#n177">177</a></p>
249
-<p id="n178" class="stm run hide_run"><a href="#n178">178</a></p>
250
-<p id="n179" class="stm run hide_run"><a href="#n179">179</a></p>
251
-<p id="n180" class="pln"><a href="#n180">180</a></p>
252
-<p id="n181" class="stm run hide_run"><a href="#n181">181</a></p>
253
-<p id="n182" class="stm run hide_run"><a href="#n182">182</a></p>
254
-<p id="n183" class="stm run hide_run"><a href="#n183">183</a></p>
255
-<p id="n184" class="stm run hide_run"><a href="#n184">184</a></p>
256
-<p id="n185" class="pln"><a href="#n185">185</a></p>
257
-<p id="n186" class="stm run hide_run"><a href="#n186">186</a></p>
258
-<p id="n187" class="pln"><a href="#n187">187</a></p>
259
-<p id="n188" class="stm run hide_run"><a href="#n188">188</a></p>
260
-<p id="n189" class="pln"><a href="#n189">189</a></p>
261
-<p id="n190" class="stm run hide_run"><a href="#n190">190</a></p>
262
-<p id="n191" class="stm run hide_run"><a href="#n191">191</a></p>
263
-<p id="n192" class="stm run hide_run"><a href="#n192">192</a></p>
264
-<p id="n193" class="pln"><a href="#n193">193</a></p>
265
-<p id="n194" class="stm run hide_run"><a href="#n194">194</a></p>
266
-<p id="n195" class="stm run hide_run"><a href="#n195">195</a></p>
267
-<p id="n196" class="stm run hide_run"><a href="#n196">196</a></p>
268
-<p id="n197" class="stm run hide_run"><a href="#n197">197</a></p>
269
-<p id="n198" class="pln"><a href="#n198">198</a></p>
270
-<p id="n199" class="stm run hide_run"><a href="#n199">199</a></p>
271
-<p id="n200" class="pln"><a href="#n200">200</a></p>
272
-<p id="n201" class="stm run hide_run"><a href="#n201">201</a></p>
273
-<p id="n202" class="pln"><a href="#n202">202</a></p>
274
-<p id="n203" class="stm run hide_run"><a href="#n203">203</a></p>
275
-<p id="n204" class="stm run hide_run"><a href="#n204">204</a></p>
276
-<p id="n205" class="pln"><a href="#n205">205</a></p>
277
-<p id="n206" class="stm run hide_run"><a href="#n206">206</a></p>
278
-<p id="n207" class="pln"><a href="#n207">207</a></p>
279
-<p id="n208" class="pln"><a href="#n208">208</a></p>
280
-<p id="n209" class="pln"><a href="#n209">209</a></p>
281
-<p id="n210" class="stm run hide_run"><a href="#n210">210</a></p>
282
-<p id="n211" class="pln"><a href="#n211">211</a></p>
283
-<p id="n212" class="stm run hide_run"><a href="#n212">212</a></p>
284
-<p id="n213" class="pln"><a href="#n213">213</a></p>
285
-<p id="n214" class="stm run hide_run"><a href="#n214">214</a></p>
286
-<p id="n215" class="pln"><a href="#n215">215</a></p>
287
-<p id="n216" class="stm run hide_run"><a href="#n216">216</a></p>
288
-<p id="n217" class="pln"><a href="#n217">217</a></p>
289
-<p id="n218" class="stm run hide_run"><a href="#n218">218</a></p>
290
-<p id="n219" class="pln"><a href="#n219">219</a></p>
291
-<p id="n220" class="stm run hide_run"><a href="#n220">220</a></p>
292
-<p id="n221" class="pln"><a href="#n221">221</a></p>
293
-<p id="n222" class="stm run hide_run"><a href="#n222">222</a></p>
294
-<p id="n223" class="pln"><a href="#n223">223</a></p>
295
-<p id="n224" class="stm run hide_run"><a href="#n224">224</a></p>
296
-<p id="n225" class="stm run hide_run"><a href="#n225">225</a></p>
297
-<p id="n226" class="pln"><a href="#n226">226</a></p>
298
-<p id="n227" class="stm run hide_run"><a href="#n227">227</a></p>
299
-<p id="n228" class="pln"><a href="#n228">228</a></p>
300
-<p id="n229" class="stm run hide_run"><a href="#n229">229</a></p>
301
-<p id="n230" class="stm run hide_run"><a href="#n230">230</a></p>
302
-<p id="n231" class="pln"><a href="#n231">231</a></p>
303
-<p id="n232" class="stm run hide_run"><a href="#n232">232</a></p>
304
-<p id="n233" class="pln"><a href="#n233">233</a></p>
305
-<p id="n234" class="stm run hide_run"><a href="#n234">234</a></p>
306
-<p id="n235" class="pln"><a href="#n235">235</a></p>
307
-<p id="n236" class="pln"><a href="#n236">236</a></p>
308
-<p id="n237" class="stm run hide_run"><a href="#n237">237</a></p>
309
-<p id="n238" class="stm run hide_run"><a href="#n238">238</a></p>
310
-<p id="n239" class="pln"><a href="#n239">239</a></p>
311
-<p id="n240" class="stm run hide_run"><a href="#n240">240</a></p>
312
-<p id="n241" class="pln"><a href="#n241">241</a></p>
313
-<p id="n242" class="stm run hide_run"><a href="#n242">242</a></p>
314
-<p id="n243" class="stm run hide_run"><a href="#n243">243</a></p>
315
-<p id="n244" class="pln"><a href="#n244">244</a></p>
316
-<p id="n245" class="stm run hide_run"><a href="#n245">245</a></p>
317
-<p id="n246" class="pln"><a href="#n246">246</a></p>
318
-<p id="n247" class="pln"><a href="#n247">247</a></p>
319
-<p id="n248" class="pln"><a href="#n248">248</a></p>
320
-<p id="n249" class="stm run hide_run"><a href="#n249">249</a></p>
321
-<p id="n250" class="pln"><a href="#n250">250</a></p>
322
-<p id="n251" class="stm run hide_run"><a href="#n251">251</a></p>
323
-<p id="n252" class="pln"><a href="#n252">252</a></p>
324
-<p id="n253" class="stm run hide_run"><a href="#n253">253</a></p>
325
-<p id="n254" class="pln"><a href="#n254">254</a></p>
326
-<p id="n255" class="stm run hide_run"><a href="#n255">255</a></p>
327
-<p id="n256" class="pln"><a href="#n256">256</a></p>
328
-<p id="n257" class="stm run hide_run"><a href="#n257">257</a></p>
329
-<p id="n258" class="pln"><a href="#n258">258</a></p>
330
-<p id="n259" class="stm run hide_run"><a href="#n259">259</a></p>
331
-<p id="n260" class="pln"><a href="#n260">260</a></p>
332
-<p id="n261" class="stm run hide_run"><a href="#n261">261</a></p>
333
-<p id="n262" class="pln"><a href="#n262">262</a></p>
334
-<p id="n263" class="stm run hide_run"><a href="#n263">263</a></p>
335
-<p id="n264" class="pln"><a href="#n264">264</a></p>
336
-<p id="n265" class="stm run hide_run"><a href="#n265">265</a></p>
337
-<p id="n266" class="pln"><a href="#n266">266</a></p>
338
-<p id="n267" class="stm run hide_run"><a href="#n267">267</a></p>
339
-<p id="n268" class="pln"><a href="#n268">268</a></p>
340
-<p id="n269" class="pln"><a href="#n269">269</a></p>
341
-<p id="n270" class="pln"><a href="#n270">270</a></p>
342
-<p id="n271" class="stm run hide_run"><a href="#n271">271</a></p>
343
-<p id="n272" class="pln"><a href="#n272">272</a></p>
344
-<p id="n273" class="stm run hide_run"><a href="#n273">273</a></p>
345
-<p id="n274" class="pln"><a href="#n274">274</a></p>
346
-<p id="n275" class="stm run hide_run"><a href="#n275">275</a></p>
347
-<p id="n276" class="pln"><a href="#n276">276</a></p>
348
-<p id="n277" class="stm run hide_run"><a href="#n277">277</a></p>
349
-<p id="n278" class="pln"><a href="#n278">278</a></p>
350
-<p id="n279" class="stm run hide_run"><a href="#n279">279</a></p>
351
-<p id="n280" class="pln"><a href="#n280">280</a></p>
352
-<p id="n281" class="stm run hide_run"><a href="#n281">281</a></p>
353
-<p id="n282" class="pln"><a href="#n282">282</a></p>
354
-<p id="n283" class="stm run hide_run"><a href="#n283">283</a></p>
355
-<p id="n284" class="pln"><a href="#n284">284</a></p>
356
-<p id="n285" class="stm run hide_run"><a href="#n285">285</a></p>
357
-<p id="n286" class="pln"><a href="#n286">286</a></p>
358
-<p id="n287" class="stm run hide_run"><a href="#n287">287</a></p>
359
-<p id="n288" class="pln"><a href="#n288">288</a></p>
360
-<p id="n289" class="stm run hide_run"><a href="#n289">289</a></p>
361
-<p id="n290" class="pln"><a href="#n290">290</a></p>
362
-<p id="n291" class="stm run hide_run"><a href="#n291">291</a></p>
363
-<p id="n292" class="pln"><a href="#n292">292</a></p>
364
-<p id="n293" class="stm run hide_run"><a href="#n293">293</a></p>
365
-<p id="n294" class="pln"><a href="#n294">294</a></p>
366
-<p id="n295" class="stm run hide_run"><a href="#n295">295</a></p>
367
-<p id="n296" class="pln"><a href="#n296">296</a></p>
368
-<p id="n297" class="stm run hide_run"><a href="#n297">297</a></p>
369
-<p id="n298" class="stm run hide_run"><a href="#n298">298</a></p>
370
-<p id="n299" class="pln"><a href="#n299">299</a></p>
371
-<p id="n300" class="stm run hide_run"><a href="#n300">300</a></p>
372
-<p id="n301" class="pln"><a href="#n301">301</a></p>
373
-<p id="n302" class="stm run hide_run"><a href="#n302">302</a></p>
374
-<p id="n303" class="pln"><a href="#n303">303</a></p>
375
-<p id="n304" class="stm run hide_run"><a href="#n304">304</a></p>
376
-<p id="n305" class="stm run hide_run"><a href="#n305">305</a></p>
377
-<p id="n306" class="stm run hide_run"><a href="#n306">306</a></p>
378
-<p id="n307" class="pln"><a href="#n307">307</a></p>
379
-<p id="n308" class="stm run hide_run"><a href="#n308">308</a></p>
380
-<p id="n309" class="pln"><a href="#n309">309</a></p>
381
-<p id="n310" class="stm run hide_run"><a href="#n310">310</a></p>
382
-<p id="n311" class="pln"><a href="#n311">311</a></p>
383
-<p id="n312" class="stm run hide_run"><a href="#n312">312</a></p>
384
-<p id="n313" class="stm run hide_run"><a href="#n313">313</a></p>
385
-<p id="n314" class="stm run hide_run"><a href="#n314">314</a></p>
386
-<p id="n315" class="pln"><a href="#n315">315</a></p>
387
-<p id="n316" class="stm run hide_run"><a href="#n316">316</a></p>
388
-
389
-            </td>
390
-            <td class="text">
391
-<p id="t1" class="pln"><span class="com">#!/usr/bin/env python</span><span class="strut">&nbsp;</span></p>
392
-<p id="t2" class="pln"><span class="com"># coding: utf-8</span><span class="strut">&nbsp;</span></p>
393
-<p id="t3" class="pln"><span class="strut">&nbsp;</span></p>
394
-<p id="t4" class="pln"><span class="com"># In[4]:</span><span class="strut">&nbsp;</span></p>
395
-<p id="t5" class="pln"><span class="strut">&nbsp;</span></p>
396
-<p id="t6" class="pln"><span class="strut">&nbsp;</span></p>
397
-<p id="t7" class="stm run hide_run"><span class="str">"""Structures of the project."""</span><span class="strut">&nbsp;</span></p>
398
-<p id="t8" class="pln"><span class="strut">&nbsp;</span></p>
399
-<p id="t9" class="stm run hide_run"><span class="key">from</span> <span class="nam">functools</span> <span class="key">import</span> <span class="nam">reduce</span><span class="op">,</span> <span class="nam">partial</span><span class="strut">&nbsp;</span></p>
400
-<p id="t10" class="stm run hide_run"><span class="key">from</span> <span class="nam">itertools</span> <span class="key">import</span> <span class="nam">chain</span><span class="op">,</span> <span class="nam">zip_longest</span><span class="strut">&nbsp;</span></p>
401
-<p id="t11" class="pln"><span class="strut">&nbsp;</span></p>
402
-<p id="t12" class="stm run hide_run"><span class="key">from</span> <span class="nam">typing</span> <span class="key">import</span> <span class="nam">Union</span><span class="op">,</span> <span class="nam">Tuple</span><span class="op">,</span> <span class="nam">Mapping</span><span class="op">,</span> <span class="nam">Sequence</span><span class="op">,</span> <span class="nam">Iterable</span><span class="op">,</span> <span class="nam">Callable</span><span class="strut">&nbsp;</span></p>
403
-<p id="t13" class="pln"><span class="strut">&nbsp;</span></p>
404
-<p id="t14" class="stm run hide_run"><span class="key">from</span> <span class="nam">gampy</span><span class="op">.</span><span class="nam">errors</span> <span class="key">import</span> <span class="nam">DefinitionError</span><span class="op">,</span> <span class="nam">CompositionError</span><span class="strut">&nbsp;</span></p>
405
-<p id="t15" class="pln"><span class="strut">&nbsp;</span></p>
406
-<p id="t16" class="pln"><span class="strut">&nbsp;</span></p>
407
-<p id="t17" class="pln"><span class="com"># In[13]:</span><span class="strut">&nbsp;</span></p>
408
-<p id="t18" class="pln"><span class="strut">&nbsp;</span></p>
409
-<p id="t19" class="pln"><span class="strut">&nbsp;</span></p>
410
-<p id="t20" class="pln"><span class="com"># TYPES</span><span class="strut">&nbsp;</span></p>
411
-<p id="t21" class="pln"><span class="strut">&nbsp;</span></p>
412
-<p id="t22" class="stm run hide_run"><span class="nam">Args</span> <span class="op">=</span> <span class="nam">Sequence</span><span class="strut">&nbsp;</span></p>
413
-<p id="t23" class="stm run hide_run"><span class="nam">Kwargs</span> <span class="op">=</span> <span class="nam">Mapping</span><span class="strut">&nbsp;</span></p>
414
-<p id="t24" class="stm run hide_run"><span class="nam">Function</span> <span class="op">=</span> <span class="nam">Callable</span><span class="strut">&nbsp;</span></p>
415
-<p id="t25" class="pln"><span class="strut">&nbsp;</span></p>
416
-<p id="t26" class="stm run hide_run"><span class="nam">Step</span> <span class="op">=</span> <span class="nam">Tuple</span><span class="op">[</span><span class="nam">Function</span><span class="op">,</span> <span class="nam">Args</span><span class="op">,</span> <span class="nam">Kwargs</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
417
-<p id="t27" class="stm run hide_run"><span class="nam">Advice</span> <span class="op">=</span> <span class="nam">Callable</span><span class="op">[</span><span class="op">[</span><span class="nam">Function</span><span class="op">]</span><span class="op">,</span> <span class="nam">Function</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
418
-<p id="t28" class="stm run hide_run"><span class="nam">PartialStep</span> <span class="op">=</span> <span class="nam">Union</span><span class="op">[</span><span class="nam">Function</span><span class="op">,</span> <span class="nam">Sequence</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
419
-<p id="t29" class="pln"><span class="strut">&nbsp;</span></p>
420
-<p id="t30" class="pln"><span class="strut">&nbsp;</span></p>
421
-<p id="t31" class="pln"><span class="com"># In[17]:</span><span class="strut">&nbsp;</span></p>
422
-<p id="t32" class="pln"><span class="strut">&nbsp;</span></p>
423
-<p id="t33" class="pln"><span class="strut">&nbsp;</span></p>
424
-<p id="t34" class="stm run hide_run"><span class="key">class</span> <span class="nam">Pipeline</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
425
-<p id="t35" class="pln">    <span class="str">"""A Pipeline is a sequence of steps."""</span><span class="strut">&nbsp;</span></p>
426
-<p id="t36" class="pln"><span class="strut">&nbsp;</span></p>
427
-<p id="t37" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__init__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">steps</span><span class="op">:</span> <span class="nam">Iterable</span><span class="op">)</span> <span class="op">-></span> <span class="key">None</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
428
-<p id="t38" class="pln">        <span class="str">"""Initialize object."""</span><span class="strut">&nbsp;</span></p>
429
-<p id="t39" class="stm run hide_run">        <span class="nam">self</span><span class="op">.</span><span class="nam">_steps</span><span class="op">:</span> <span class="nam">list</span> <span class="op">=</span> <span class="op">[</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
430
-<p id="t40" class="stm run hide_run">        <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span> <span class="op">=</span> <span class="nam">steps</span>  <span class="com"># trigger setter</span><span class="strut">&nbsp;</span></p>
431
-<p id="t41" class="pln"><span class="strut">&nbsp;</span></p>
432
-<p id="t42" class="pln">    <span class="com"># OBJECT</span><span class="strut">&nbsp;</span></p>
433
-<p id="t43" class="pln"><span class="strut">&nbsp;</span></p>
434
-<p id="t44" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__hash__</span><span class="op">(</span><span class="nam">self</span><span class="op">)</span> <span class="op">-></span> <span class="nam">int</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
435
-<p id="t45" class="pln">        <span class="str">"""Hash step functions."""</span><span class="strut">&nbsp;</span></p>
436
-<p id="t46" class="stm run hide_run">        <span class="nam">functions</span> <span class="op">=</span> <span class="nam">tuple</span><span class="op">(</span><span class="nam">f</span> <span class="key">for</span> <span class="nam">f</span><span class="op">,</span> <span class="nam">args</span><span class="op">,</span> <span class="nam">kwargs</span> <span class="key">in</span> <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
437
-<p id="t47" class="pln"><span class="strut">&nbsp;</span></p>
438
-<p id="t48" class="stm run hide_run">        <span class="key">return</span> <span class="nam">hash</span><span class="op">(</span><span class="nam">functions</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
439
-<p id="t49" class="pln"><span class="strut">&nbsp;</span></p>
440
-<p id="t50" class="pln">    <span class="com"># PROPERTY</span><span class="strut">&nbsp;</span></p>
441
-<p id="t51" class="pln"><span class="strut">&nbsp;</span></p>
442
-<p id="t52" class="stm run hide_run">    <span class="op">@</span><span class="nam">property</span><span class="strut">&nbsp;</span></p>
443
-<p id="t53" class="stm run hide_run">    <span class="key">def</span> <span class="nam">steps</span><span class="op">(</span><span class="nam">self</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Sequence</span><span class="op">[</span><span class="nam">Step</span><span class="op">]</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
444
-<p id="t54" class="pln">        <span class="str">"""Get pipeline steps."""</span><span class="strut">&nbsp;</span></p>
445
-<p id="t55" class="stm run hide_run">        <span class="key">return</span> <span class="nam">self</span><span class="op">.</span><span class="nam">_steps</span><span class="strut">&nbsp;</span></p>
446
-<p id="t56" class="pln"><span class="strut">&nbsp;</span></p>
447
-<p id="t57" class="stm run hide_run">    <span class="op">@</span><span class="nam">steps</span><span class="op">.</span><span class="nam">setter</span><span class="strut">&nbsp;</span></p>
448
-<p id="t58" class="stm run hide_run">    <span class="key">def</span> <span class="nam">steps</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">steps</span><span class="op">:</span> <span class="nam">Iterable</span><span class="op">[</span><span class="nam">PartialStep</span><span class="op">]</span><span class="op">)</span> <span class="op">-></span> <span class="key">None</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
449
-<p id="t59" class="pln">        <span class="str">"""Assign pipeline steps."""</span><span class="strut">&nbsp;</span></p>
450
-<p id="t60" class="stm run hide_run">        <span class="nam">self</span><span class="op">.</span><span class="nam">_steps</span> <span class="op">=</span> <span class="op">[</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
451
-<p id="t61" class="pln"><span class="strut">&nbsp;</span></p>
452
-<p id="t62" class="stm run hide_run">        <span class="key">for</span> <span class="nam">s</span> <span class="key">in</span> <span class="nam">steps</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
453
-<p id="t63" class="stm run hide_run">            <span class="nam">f</span> <span class="op">=</span> <span class="key">None</span><span class="strut">&nbsp;</span></p>
454
-<p id="t64" class="stm run hide_run">            <span class="nam">args</span><span class="op">:</span> <span class="nam">list</span> <span class="op">=</span> <span class="nam">list</span><span class="op">(</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
455
-<p id="t65" class="stm run hide_run">            <span class="nam">kwargs</span><span class="op">:</span> <span class="nam">dict</span> <span class="op">=</span> <span class="nam">dict</span><span class="op">(</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
456
-<p id="t66" class="pln"><span class="strut">&nbsp;</span></p>
457
-<p id="t67" class="pln">            <span class="com"># fill blanks</span><span class="strut">&nbsp;</span></p>
458
-<p id="t68" class="stm run hide_run">            <span class="key">if</span> <span class="nam">callable</span><span class="op">(</span><span class="nam">s</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
459
-<p id="t69" class="stm run hide_run">                <span class="nam">f</span> <span class="op">=</span> <span class="nam">s</span><span class="strut">&nbsp;</span></p>
460
-<p id="t70" class="stm run hide_run">            <span class="key">elif</span> <span class="nam">isinstance</span><span class="op">(</span><span class="nam">s</span><span class="op">,</span> <span class="nam">Sequence</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
461
-<p id="t71" class="stm run hide_run">                <span class="key">if</span> <span class="nam">len</span><span class="op">(</span><span class="nam">s</span><span class="op">)</span> <span class="op">==</span> <span class="num">1</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
462
-<p id="t72" class="stm run hide_run">                    <span class="nam">f</span> <span class="op">=</span> <span class="nam">s</span><span class="op">[</span><span class="num">0</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
463
-<p id="t73" class="stm run hide_run">                <span class="key">elif</span> <span class="nam">len</span><span class="op">(</span><span class="nam">s</span><span class="op">)</span> <span class="op">==</span> <span class="num">2</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
464
-<p id="t74" class="stm run hide_run">                    <span class="nam">f</span> <span class="op">=</span> <span class="nam">s</span><span class="op">[</span><span class="num">0</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
465
-<p id="t75" class="stm run hide_run">                    <span class="nam">args</span> <span class="op">=</span> <span class="nam">s</span><span class="op">[</span><span class="num">1</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
466
-<p id="t76" class="stm run hide_run">                <span class="key">elif</span> <span class="nam">len</span><span class="op">(</span><span class="nam">s</span><span class="op">)</span> <span class="op">==</span> <span class="num">3</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
467
-<p id="t77" class="stm run hide_run">                    <span class="nam">f</span> <span class="op">=</span> <span class="nam">s</span><span class="op">[</span><span class="num">0</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
468
-<p id="t78" class="stm run hide_run">                    <span class="nam">args</span> <span class="op">=</span> <span class="nam">s</span><span class="op">[</span><span class="num">1</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
469
-<p id="t79" class="stm run hide_run">                    <span class="nam">kwargs</span> <span class="op">=</span> <span class="nam">s</span><span class="op">[</span><span class="num">2</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
470
-<p id="t80" class="pln">                <span class="key">else</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
471
-<p id="t81" class="stm run hide_run">                    <span class="key">raise</span> <span class="nam">DefinitionError</span><span class="op">(</span><span class="strut">&nbsp;</span></p>
472
-<p id="t82" class="pln">                        <span class="str">"A tuple step should contain 1, 2 or 3 items. Not: {}."</span><span class="op">.</span><span class="nam">format</span><span class="op">(</span><span class="strut">&nbsp;</span></p>
473
-<p id="t83" class="pln">                            <span class="nam">len</span><span class="op">(</span><span class="nam">s</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
474
-<p id="t84" class="pln">                        <span class="op">)</span><span class="strut">&nbsp;</span></p>
475
-<p id="t85" class="pln">                    <span class="op">)</span><span class="strut">&nbsp;</span></p>
476
-<p id="t86" class="pln">            <span class="key">else</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
477
-<p id="t87" class="stm run hide_run">                <span class="key">raise</span> <span class="nam">DefinitionError</span><span class="op">(</span><span class="strut">&nbsp;</span></p>
478
-<p id="t88" class="pln">                    <span class="str">"A step should be Callable or Iterable. Not: {}."</span><span class="op">.</span><span class="nam">format</span><span class="op">(</span><span class="strut">&nbsp;</span></p>
479
-<p id="t89" class="pln">                        <span class="nam">type</span><span class="op">(</span><span class="nam">s</span><span class="op">)</span><span class="op">.</span><span class="nam">__name__</span><span class="strut">&nbsp;</span></p>
480
-<p id="t90" class="pln">                    <span class="op">)</span><span class="strut">&nbsp;</span></p>
481
-<p id="t91" class="pln">                <span class="op">)</span><span class="strut">&nbsp;</span></p>
482
-<p id="t92" class="pln"><span class="strut">&nbsp;</span></p>
483
-<p id="t93" class="pln">            <span class="com"># validate items</span><span class="strut">&nbsp;</span></p>
484
-<p id="t94" class="stm run hide_run">            <span class="key">if</span> <span class="key">not</span> <span class="nam">callable</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
485
-<p id="t95" class="stm run hide_run">                <span class="key">raise</span> <span class="nam">DefinitionError</span><span class="op">(</span><span class="strut">&nbsp;</span></p>
486
-<p id="t96" class="pln">                    <span class="str">"The first step argument should be Callable. Not: {}."</span><span class="op">.</span><span class="nam">format</span><span class="op">(</span><span class="strut">&nbsp;</span></p>
487
-<p id="t97" class="pln">                        <span class="nam">type</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="op">.</span><span class="nam">__name__</span><span class="strut">&nbsp;</span></p>
488
-<p id="t98" class="pln">                    <span class="op">)</span><span class="strut">&nbsp;</span></p>
489
-<p id="t99" class="pln">                <span class="op">)</span><span class="strut">&nbsp;</span></p>
490
-<p id="t100" class="stm run hide_run">            <span class="key">elif</span> <span class="key">not</span> <span class="nam">isinstance</span><span class="op">(</span><span class="nam">args</span><span class="op">,</span> <span class="nam">Args</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
491
-<p id="t101" class="stm run hide_run">                <span class="key">raise</span> <span class="nam">DefinitionError</span><span class="op">(</span><span class="strut">&nbsp;</span></p>
492
-<p id="t102" class="pln">                    <span class="str">"The second step argument should be Iterable. Not: {}."</span><span class="op">.</span><span class="nam">format</span><span class="op">(</span><span class="strut">&nbsp;</span></p>
493
-<p id="t103" class="pln">                        <span class="nam">type</span><span class="op">(</span><span class="nam">args</span><span class="op">)</span><span class="op">.</span><span class="nam">__name__</span><span class="strut">&nbsp;</span></p>
494
-<p id="t104" class="pln">                    <span class="op">)</span><span class="strut">&nbsp;</span></p>
495
-<p id="t105" class="pln">                <span class="op">)</span><span class="strut">&nbsp;</span></p>
496
-<p id="t106" class="stm run hide_run">            <span class="key">elif</span> <span class="key">not</span> <span class="nam">isinstance</span><span class="op">(</span><span class="nam">kwargs</span><span class="op">,</span> <span class="nam">Kwargs</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
497
-<p id="t107" class="stm run hide_run">                <span class="key">raise</span> <span class="nam">DefinitionError</span><span class="op">(</span><span class="strut">&nbsp;</span></p>
498
-<p id="t108" class="pln">                    <span class="str">"The third step argument should be Mapping. Not: {}."</span><span class="op">.</span><span class="nam">format</span><span class="op">(</span><span class="strut">&nbsp;</span></p>
499
-<p id="t109" class="pln">                        <span class="nam">type</span><span class="op">(</span><span class="nam">kwargs</span><span class="op">)</span><span class="op">.</span><span class="nam">__name__</span><span class="strut">&nbsp;</span></p>
500
-<p id="t110" class="pln">                    <span class="op">)</span><span class="strut">&nbsp;</span></p>
501
-<p id="t111" class="pln">                <span class="op">)</span><span class="strut">&nbsp;</span></p>
502
-<p id="t112" class="pln"><span class="strut">&nbsp;</span></p>
503
-<p id="t113" class="stm run hide_run">            <span class="nam">step</span> <span class="op">=</span> <span class="op">(</span><span class="nam">f</span><span class="op">,</span> <span class="nam">args</span><span class="op">,</span> <span class="nam">kwargs</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
504
-<p id="t114" class="stm run hide_run">            <span class="nam">self</span><span class="op">.</span><span class="nam">_steps</span><span class="op">.</span><span class="nam">append</span><span class="op">(</span><span class="nam">step</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
505
-<p id="t115" class="pln"><span class="strut">&nbsp;</span></p>
506
-<p id="t116" class="pln">    <span class="com"># CONTEXT</span><span class="strut">&nbsp;</span></p>
507
-<p id="t117" class="pln"><span class="strut">&nbsp;</span></p>
508
-<p id="t118" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__enter__</span><span class="op">(</span><span class="nam">self</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Sequence</span><span class="op">[</span><span class="nam">Step</span><span class="op">]</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
509
-<p id="t119" class="pln">        <span class="str">"""Return steps in a context."""</span><span class="strut">&nbsp;</span></p>
510
-<p id="t120" class="stm run hide_run">        <span class="key">return</span> <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="strut">&nbsp;</span></p>
511
-<p id="t121" class="pln"><span class="strut">&nbsp;</span></p>
512
-<p id="t122" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__exit__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">exc_type</span><span class="op">,</span> <span class="nam">exc_value</span><span class="op">,</span> <span class="nam">traceback</span><span class="op">)</span> <span class="op">-></span> <span class="key">None</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
513
-<p id="t123" class="pln">        <span class="str">"""Update steps from a context."""</span><span class="strut">&nbsp;</span></p>
514
-<p id="t124" class="stm run hide_run">        <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span> <span class="op">=</span> <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span>  <span class="com"># trigger setter</span><span class="strut">&nbsp;</span></p>
515
-<p id="t125" class="pln"><span class="strut">&nbsp;</span></p>
516
-<p id="t126" class="pln">    <span class="com"># OPERATION</span><span class="strut">&nbsp;</span></p>
517
-<p id="t127" class="pln"><span class="strut">&nbsp;</span></p>
518
-<p id="t128" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__or__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">f</span><span class="op">:</span> <span class="nam">Callable</span><span class="op">)</span> <span class="op">-></span> <span class="str">"Pipeline"</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
519
-<p id="t129" class="pln">        <span class="str">"""Add a function step."""</span><span class="strut">&nbsp;</span></p>
520
-<p id="t130" class="stm run hide_run">        <span class="nam">steps</span><span class="op">:</span> <span class="nam">list</span> <span class="op">=</span> <span class="nam">list</span><span class="op">(</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
521
-<p id="t131" class="stm run hide_run">        <span class="nam">steps</span><span class="op">.</span><span class="nam">extend</span><span class="op">(</span><span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
522
-<p id="t132" class="stm run hide_run">        <span class="nam">steps</span><span class="op">.</span><span class="nam">append</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
523
-<p id="t133" class="pln"><span class="strut">&nbsp;</span></p>
524
-<p id="t134" class="stm run hide_run">        <span class="key">return</span> <span class="nam">self</span><span class="op">.</span><span class="nam">__class__</span><span class="op">(</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
525
-<p id="t135" class="pln"><span class="strut">&nbsp;</span></p>
526
-<p id="t136" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__and__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">other</span><span class="op">:</span> <span class="str">"Pipeline"</span><span class="op">)</span> <span class="op">-></span> <span class="str">"Pipeline"</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
527
-<p id="t137" class="pln">        <span class="str">"""Keep common steps."""</span><span class="strut">&nbsp;</span></p>
528
-<p id="t138" class="stm run hide_run">        <span class="nam">steps</span> <span class="op">=</span> <span class="op">[</span><span class="nam">s</span> <span class="key">for</span> <span class="nam">s</span> <span class="key">in</span> <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span> <span class="key">if</span> <span class="nam">s</span> <span class="key">in</span> <span class="nam">other</span><span class="op">.</span><span class="nam">steps</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
529
-<p id="t139" class="pln"><span class="strut">&nbsp;</span></p>
530
-<p id="t140" class="stm run hide_run">        <span class="key">return</span> <span class="nam">self</span><span class="op">.</span><span class="nam">__class__</span><span class="op">(</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
531
-<p id="t141" class="pln"><span class="strut">&nbsp;</span></p>
532
-<p id="t142" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__xor__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">other</span><span class="op">:</span> <span class="str">"Pipeline"</span><span class="op">)</span> <span class="op">-></span> <span class="str">"Pipeline"</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
533
-<p id="t143" class="pln">        <span class="str">"""Keep uncommon steps."""</span><span class="strut">&nbsp;</span></p>
534
-<p id="t144" class="stm run hide_run">        <span class="key">return</span> <span class="op">(</span><span class="nam">self</span> <span class="op">+</span> <span class="nam">other</span><span class="op">)</span> <span class="op">-</span> <span class="op">(</span><span class="nam">self</span> <span class="op">&amp;</span> <span class="nam">other</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
535
-<p id="t145" class="pln"><span class="strut">&nbsp;</span></p>
536
-<p id="t146" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__add__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">other</span><span class="op">:</span> <span class="str">"Pipeline"</span><span class="op">)</span> <span class="op">-></span> <span class="str">"Pipeline"</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
537
-<p id="t147" class="pln">        <span class="str">"""Concatenate every steps."""</span><span class="strut">&nbsp;</span></p>
538
-<p id="t148" class="stm run hide_run">        <span class="nam">steps</span><span class="op">:</span> <span class="nam">list</span> <span class="op">=</span> <span class="nam">list</span><span class="op">(</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
539
-<p id="t149" class="stm run hide_run">        <span class="nam">steps</span><span class="op">.</span><span class="nam">extend</span><span class="op">(</span><span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
540
-<p id="t150" class="stm run hide_run">        <span class="nam">steps</span><span class="op">.</span><span class="nam">extend</span><span class="op">(</span><span class="nam">other</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
541
-<p id="t151" class="pln"><span class="strut">&nbsp;</span></p>
542
-<p id="t152" class="stm run hide_run">        <span class="key">return</span> <span class="nam">self</span><span class="op">.</span><span class="nam">__class__</span><span class="op">(</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
543
-<p id="t153" class="pln"><span class="strut">&nbsp;</span></p>
544
-<p id="t154" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__sub__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">other</span><span class="op">:</span> <span class="str">"Pipeline"</span><span class="op">)</span> <span class="op">-></span> <span class="str">"Pipeline"</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
545
-<p id="t155" class="pln">        <span class="str">"""Intersect common steps."""</span><span class="strut">&nbsp;</span></p>
546
-<p id="t156" class="stm run hide_run">        <span class="nam">steps</span> <span class="op">=</span> <span class="op">[</span><span class="nam">s</span> <span class="key">for</span> <span class="nam">s</span> <span class="key">in</span> <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span> <span class="key">if</span> <span class="nam">s</span> <span class="key">not</span> <span class="key">in</span> <span class="nam">other</span><span class="op">.</span><span class="nam">steps</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
547
-<p id="t157" class="pln"><span class="strut">&nbsp;</span></p>
548
-<p id="t158" class="stm run hide_run">        <span class="key">return</span> <span class="nam">self</span><span class="op">.</span><span class="nam">__class__</span><span class="op">(</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
549
-<p id="t159" class="pln"><span class="strut">&nbsp;</span></p>
550
-<p id="t160" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__mul__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">n</span><span class="op">:</span> <span class="nam">int</span><span class="op">)</span> <span class="op">-></span> <span class="str">"Pipeline"</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
551
-<p id="t161" class="pln">        <span class="str">"""Duplicate steps n times."""</span><span class="strut">&nbsp;</span></p>
552
-<p id="t162" class="stm run hide_run">        <span class="nam">steps</span><span class="op">:</span> <span class="nam">list</span> <span class="op">=</span> <span class="op">[</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
553
-<p id="t163" class="pln"><span class="strut">&nbsp;</span></p>
554
-<p id="t164" class="stm run hide_run">        <span class="key">for</span> <span class="nam">_</span> <span class="key">in</span> <span class="nam">range</span><span class="op">(</span><span class="nam">n</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
555
-<p id="t165" class="stm run hide_run">            <span class="nam">steps</span><span class="op">.</span><span class="nam">extend</span><span class="op">(</span><span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
556
-<p id="t166" class="pln"><span class="strut">&nbsp;</span></p>
557
-<p id="t167" class="stm run hide_run">        <span class="key">return</span> <span class="nam">self</span><span class="op">.</span><span class="nam">__class__</span><span class="op">(</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
558
-<p id="t168" class="pln"><span class="strut">&nbsp;</span></p>
559
-<p id="t169" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__matmul__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">advice</span><span class="op">:</span> <span class="nam">Advice</span><span class="op">)</span> <span class="op">-></span> <span class="str">"Pipeline"</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
560
-<p id="t170" class="pln">        <span class="str">"""Apply advice to step functions."""</span><span class="strut">&nbsp;</span></p>
561
-<p id="t171" class="stm run hide_run">        <span class="nam">steps</span> <span class="op">=</span> <span class="op">[</span><span class="op">(</span><span class="nam">advice</span><span class="op">(</span><span class="nam">f</span><span class="op">)</span><span class="op">,</span> <span class="nam">args</span><span class="op">,</span> <span class="nam">kwargs</span><span class="op">)</span> <span class="key">for</span> <span class="nam">f</span><span class="op">,</span> <span class="nam">args</span><span class="op">,</span> <span class="nam">kwargs</span> <span class="key">in</span> <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
562
-<p id="t172" class="pln"><span class="strut">&nbsp;</span></p>
563
-<p id="t173" class="stm run hide_run">        <span class="key">return</span> <span class="nam">self</span><span class="op">.</span><span class="nam">__class__</span><span class="op">(</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
564
-<p id="t174" class="pln"><span class="strut">&nbsp;</span></p>
565
-<p id="t175" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__truediv__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">n</span><span class="op">:</span> <span class="nam">int</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Sequence</span><span class="op">[</span><span class="str">"Pipeline"</span><span class="op">]</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
566
-<p id="t176" class="pln">        <span class="str">"""Create step chunks of size n (strict)."""</span><span class="strut">&nbsp;</span></p>
567
-<p id="t177" class="stm run hide_run">        <span class="nam">ps</span> <span class="op">=</span> <span class="op">[</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
568
-<p id="t178" class="stm run hide_run">        <span class="nam">starts</span> <span class="op">=</span> <span class="nam">range</span><span class="op">(</span><span class="num">0</span><span class="op">,</span> <span class="nam">len</span><span class="op">(</span><span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="op">,</span> <span class="nam">n</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
569
-<p id="t179" class="stm run hide_run">        <span class="nam">ends</span> <span class="op">=</span> <span class="nam">range</span><span class="op">(</span><span class="nam">n</span><span class="op">,</span> <span class="nam">len</span><span class="op">(</span><span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span> <span class="op">+</span> <span class="nam">n</span><span class="op">,</span> <span class="nam">n</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
570
-<p id="t180" class="pln"><span class="strut">&nbsp;</span></p>
571
-<p id="t181" class="stm run hide_run">        <span class="key">for</span> <span class="nam">start</span><span class="op">,</span> <span class="nam">end</span> <span class="key">in</span> <span class="nam">zip</span><span class="op">(</span><span class="nam">starts</span><span class="op">,</span> <span class="nam">ends</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
572
-<p id="t182" class="stm run hide_run">            <span class="nam">steps</span> <span class="op">=</span> <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">[</span><span class="nam">start</span><span class="op">:</span><span class="nam">end</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
573
-<p id="t183" class="stm run hide_run">            <span class="nam">pipe</span> <span class="op">=</span> <span class="nam">self</span><span class="op">.</span><span class="nam">__class__</span><span class="op">(</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
574
-<p id="t184" class="stm run hide_run">            <span class="nam">ps</span><span class="op">.</span><span class="nam">append</span><span class="op">(</span><span class="nam">pipe</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
575
-<p id="t185" class="pln"><span class="strut">&nbsp;</span></p>
576
-<p id="t186" class="stm run hide_run">        <span class="key">return</span> <span class="nam">ps</span><span class="strut">&nbsp;</span></p>
577
-<p id="t187" class="pln"><span class="strut">&nbsp;</span></p>
578
-<p id="t188" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__floordiv__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">n</span><span class="op">:</span> <span class="nam">int</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Sequence</span><span class="op">[</span><span class="str">"Pipeline"</span><span class="op">]</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
579
-<p id="t189" class="pln">        <span class="str">"""Create step chunks of size n (longest)."""</span><span class="strut">&nbsp;</span></p>
580
-<p id="t190" class="stm run hide_run">        <span class="nam">ps</span> <span class="op">=</span> <span class="op">[</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
581
-<p id="t191" class="stm run hide_run">        <span class="nam">ends</span> <span class="op">=</span> <span class="nam">range</span><span class="op">(</span><span class="nam">n</span><span class="op">,</span> <span class="nam">len</span><span class="op">(</span><span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="op">,</span> <span class="nam">n</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
582
-<p id="t192" class="stm run hide_run">        <span class="nam">starts</span> <span class="op">=</span> <span class="nam">range</span><span class="op">(</span><span class="num">0</span><span class="op">,</span> <span class="nam">len</span><span class="op">(</span><span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="op">,</span> <span class="nam">n</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
583
-<p id="t193" class="pln"><span class="strut">&nbsp;</span></p>
584
-<p id="t194" class="stm run hide_run">        <span class="key">for</span> <span class="nam">start</span><span class="op">,</span> <span class="nam">end</span> <span class="key">in</span> <span class="nam">zip</span><span class="op">(</span><span class="nam">starts</span><span class="op">,</span> <span class="nam">ends</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
585
-<p id="t195" class="stm run hide_run">            <span class="nam">steps</span> <span class="op">=</span> <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">[</span><span class="nam">start</span><span class="op">:</span><span class="nam">end</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
586
-<p id="t196" class="stm run hide_run">            <span class="nam">pipe</span> <span class="op">=</span> <span class="nam">self</span><span class="op">.</span><span class="nam">__class__</span><span class="op">(</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
587
-<p id="t197" class="stm run hide_run">            <span class="nam">ps</span><span class="op">.</span><span class="nam">append</span><span class="op">(</span><span class="nam">pipe</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
588
-<p id="t198" class="pln"><span class="strut">&nbsp;</span></p>
589
-<p id="t199" class="stm run hide_run">        <span class="key">return</span> <span class="nam">ps</span><span class="strut">&nbsp;</span></p>
590
-<p id="t200" class="pln"><span class="strut">&nbsp;</span></p>
591
-<p id="t201" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__mod__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">other</span><span class="op">:</span> <span class="str">"Pipeline"</span><span class="op">)</span> <span class="op">-></span> <span class="str">"Pipeline"</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
592
-<p id="t202" class="pln">        <span class="str">"""Alternate between self and other steps."""</span><span class="strut">&nbsp;</span></p>
593
-<p id="t203" class="stm run hide_run">        <span class="nam">gen</span> <span class="op">=</span> <span class="nam">chain</span><span class="op">.</span><span class="nam">from_iterable</span><span class="op">(</span><span class="nam">zip_longest</span><span class="op">(</span><span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">,</span> <span class="nam">other</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
594
-<p id="t204" class="stm run hide_run">        <span class="nam">steps</span> <span class="op">=</span> <span class="op">[</span><span class="nam">s</span> <span class="key">for</span> <span class="nam">s</span> <span class="key">in</span> <span class="nam">gen</span> <span class="key">if</span> <span class="nam">s</span> <span class="key">is</span> <span class="key">not</span> <span class="key">None</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
595
-<p id="t205" class="pln"><span class="strut">&nbsp;</span></p>
596
-<p id="t206" class="stm run hide_run">        <span class="key">return</span> <span class="nam">self</span><span class="op">.</span><span class="nam">__class__</span><span class="op">(</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
597
-<p id="t207" class="pln"><span class="strut">&nbsp;</span></p>
598
-<p id="t208" class="pln">    <span class="com"># CONVERTION</span><span class="strut">&nbsp;</span></p>
599
-<p id="t209" class="pln"><span class="strut">&nbsp;</span></p>
600
-<p id="t210" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__str__</span><span class="op">(</span><span class="nam">self</span><span class="op">)</span> <span class="op">-></span> <span class="nam">str</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
601
-<p id="t211" class="pln">        <span class="str">"""Return steps as a string."""</span><span class="strut">&nbsp;</span></p>
602
-<p id="t212" class="stm run hide_run">        <span class="key">return</span> <span class="str">" -> "</span><span class="op">.</span><span class="nam">join</span><span class="op">(</span><span class="nam">f</span><span class="op">.</span><span class="nam">__name__</span> <span class="key">for</span> <span class="nam">f</span><span class="op">,</span> <span class="nam">args</span><span class="op">,</span> <span class="nam">kwargs</span> <span class="key">in</span> <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
603
-<p id="t213" class="pln"><span class="strut">&nbsp;</span></p>
604
-<p id="t214" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__repr__</span><span class="op">(</span><span class="nam">self</span><span class="op">)</span> <span class="op">-></span> <span class="nam">str</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
605
-<p id="t215" class="pln">        <span class="str">"""Return steps as a raw string."""</span><span class="strut">&nbsp;</span></p>
606
-<p id="t216" class="stm run hide_run">        <span class="key">return</span> <span class="nam">str</span><span class="op">(</span><span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
607
-<p id="t217" class="pln"><span class="strut">&nbsp;</span></p>
608
-<p id="t218" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__bool__</span><span class="op">(</span><span class="nam">self</span><span class="op">)</span> <span class="op">-></span> <span class="nam">bool</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
609
-<p id="t219" class="pln">        <span class="str">"""Return True if steps is not empty."""</span><span class="strut">&nbsp;</span></p>
610
-<p id="t220" class="stm run hide_run">        <span class="key">return</span> <span class="nam">len</span><span class="op">(</span><span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span> <span class="op">></span> <span class="num">0</span><span class="strut">&nbsp;</span></p>
611
-<p id="t221" class="pln"><span class="strut">&nbsp;</span></p>
612
-<p id="t222" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__call__</span><span class="op">(</span><span class="nam">self</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Callable</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
613
-<p id="t223" class="pln">        <span class="str">"""Return a Callable through composition."""</span><span class="strut">&nbsp;</span></p>
614
-<p id="t224" class="stm run hide_run">        <span class="key">if</span> <span class="key">not</span> <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
615
-<p id="t225" class="stm run hide_run">            <span class="key">raise</span> <span class="nam">CompositionError</span><span class="op">(</span><span class="str">"Cannot compose from an empty pipeline."</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
616
-<p id="t226" class="pln"><span class="strut">&nbsp;</span></p>
617
-<p id="t227" class="stm run hide_run">        <span class="key">def</span> <span class="nam">part</span><span class="op">(</span><span class="nam">step</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
618
-<p id="t228" class="pln">            <span class="str">"""Apply partial to one step."""</span><span class="strut">&nbsp;</span></p>
619
-<p id="t229" class="stm run hide_run">            <span class="nam">f</span><span class="op">,</span> <span class="nam">args</span><span class="op">,</span> <span class="nam">kwargs</span> <span class="op">=</span> <span class="nam">step</span><span class="strut">&nbsp;</span></p>
620
-<p id="t230" class="stm run hide_run">            <span class="nam">h</span> <span class="op">=</span> <span class="nam">partial</span><span class="op">(</span><span class="nam">f</span><span class="op">,</span> <span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
621
-<p id="t231" class="pln"><span class="strut">&nbsp;</span></p>
622
-<p id="t232" class="stm run hide_run">            <span class="key">return</span> <span class="nam">h</span><span class="strut">&nbsp;</span></p>
623
-<p id="t233" class="pln"><span class="strut">&nbsp;</span></p>
624
-<p id="t234" class="stm run hide_run">        <span class="key">def</span> <span class="nam">comp</span><span class="op">(</span><span class="nam">f</span><span class="op">,</span> <span class="nam">g</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
625
-<p id="t235" class="pln">            <span class="str">"""Apply compose to two steps."""</span><span class="strut">&nbsp;</span></p>
626
-<p id="t236" class="pln"><span class="strut">&nbsp;</span></p>
627
-<p id="t237" class="stm run hide_run">            <span class="key">def</span> <span class="nam">composition</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
628
-<p id="t238" class="stm run hide_run">                <span class="key">return</span> <span class="nam">g</span><span class="op">(</span><span class="nam">f</span><span class="op">(</span><span class="op">*</span><span class="nam">args</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
629
-<p id="t239" class="pln"><span class="strut">&nbsp;</span></p>
630
-<p id="t240" class="stm run hide_run">            <span class="key">return</span> <span class="nam">composition</span><span class="strut">&nbsp;</span></p>
631
-<p id="t241" class="pln"><span class="strut">&nbsp;</span></p>
632
-<p id="t242" class="stm run hide_run">        <span class="nam">functions</span> <span class="op">=</span> <span class="nam">map</span><span class="op">(</span><span class="nam">part</span><span class="op">,</span> <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
633
-<p id="t243" class="stm run hide_run">        <span class="nam">function</span> <span class="op">=</span> <span class="nam">reduce</span><span class="op">(</span><span class="nam">comp</span><span class="op">,</span> <span class="nam">functions</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
634
-<p id="t244" class="pln"><span class="strut">&nbsp;</span></p>
635
-<p id="t245" class="stm run hide_run">        <span class="key">return</span> <span class="nam">function</span><span class="strut">&nbsp;</span></p>
636
-<p id="t246" class="pln"><span class="strut">&nbsp;</span></p>
637
-<p id="t247" class="pln">    <span class="com"># COLLECTION</span><span class="strut">&nbsp;</span></p>
638
-<p id="t248" class="pln"><span class="strut">&nbsp;</span></p>
639
-<p id="t249" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__len__</span><span class="op">(</span><span class="nam">self</span><span class="op">)</span> <span class="op">-></span> <span class="nam">int</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
640
-<p id="t250" class="pln">        <span class="str">"""Return the number of steps."""</span><span class="strut">&nbsp;</span></p>
641
-<p id="t251" class="stm run hide_run">        <span class="key">return</span> <span class="nam">len</span><span class="op">(</span><span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
642
-<p id="t252" class="pln"><span class="strut">&nbsp;</span></p>
643
-<p id="t253" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__iter__</span><span class="op">(</span><span class="nam">self</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Iterable</span><span class="op">[</span><span class="nam">Step</span><span class="op">]</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
644
-<p id="t254" class="pln">        <span class="str">"""Iterate over steps."""</span><span class="strut">&nbsp;</span></p>
645
-<p id="t255" class="stm run hide_run">        <span class="key">return</span> <span class="nam">iter</span><span class="op">(</span><span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
646
-<p id="t256" class="pln"><span class="strut">&nbsp;</span></p>
647
-<p id="t257" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__getitem__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">n</span><span class="op">:</span> <span class="nam">int</span><span class="op">)</span> <span class="op">-></span> <span class="nam">Step</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
648
-<p id="t258" class="pln">        <span class="str">"""Return the nth step."""</span><span class="strut">&nbsp;</span></p>
649
-<p id="t259" class="stm run hide_run">        <span class="key">return</span> <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">[</span><span class="nam">n</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
650
-<p id="t260" class="pln"><span class="strut">&nbsp;</span></p>
651
-<p id="t261" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__contains__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">step</span><span class="op">:</span> <span class="nam">Step</span><span class="op">)</span> <span class="op">-></span> <span class="nam">bool</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
652
-<p id="t262" class="pln">        <span class="str">"""Return True if step is in steps."""</span><span class="strut">&nbsp;</span></p>
653
-<p id="t263" class="stm run hide_run">        <span class="key">return</span> <span class="nam">step</span> <span class="key">in</span> <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="strut">&nbsp;</span></p>
654
-<p id="t264" class="pln"><span class="strut">&nbsp;</span></p>
655
-<p id="t265" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__reversed__</span><span class="op">(</span><span class="nam">self</span><span class="op">)</span> <span class="op">-></span> <span class="str">"Pipeline"</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
656
-<p id="t266" class="pln">        <span class="str">"""Reverse the order of steps."""</span><span class="strut">&nbsp;</span></p>
657
-<p id="t267" class="stm run hide_run">        <span class="key">return</span> <span class="nam">self</span><span class="op">.</span><span class="nam">__class__</span><span class="op">(</span><span class="nam">reversed</span><span class="op">(</span><span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
658
-<p id="t268" class="pln"><span class="strut">&nbsp;</span></p>
659
-<p id="t269" class="pln">    <span class="com"># COMPARISON</span><span class="strut">&nbsp;</span></p>
660
-<p id="t270" class="pln"><span class="strut">&nbsp;</span></p>
661
-<p id="t271" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__lt__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">other</span><span class="op">:</span> <span class="str">"Pipeline"</span><span class="op">)</span> <span class="op">-></span> <span class="nam">bool</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
662
-<p id="t272" class="pln">        <span class="str">"""Compare the step lengths with &lt;."""</span><span class="strut">&nbsp;</span></p>
663
-<p id="t273" class="stm run hide_run">        <span class="key">return</span> <span class="nam">len</span><span class="op">(</span><span class="nam">self</span><span class="op">)</span> <span class="op">&lt;</span> <span class="nam">len</span><span class="op">(</span><span class="nam">other</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
664
-<p id="t274" class="pln"><span class="strut">&nbsp;</span></p>
665
-<p id="t275" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__gt__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">other</span><span class="op">:</span> <span class="str">"Pipeline"</span><span class="op">)</span> <span class="op">-></span> <span class="nam">bool</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
666
-<p id="t276" class="pln">        <span class="str">"""Compare the steps lengths with >."""</span><span class="strut">&nbsp;</span></p>
667
-<p id="t277" class="stm run hide_run">        <span class="key">return</span> <span class="nam">len</span><span class="op">(</span><span class="nam">self</span><span class="op">)</span> <span class="op">></span> <span class="nam">len</span><span class="op">(</span><span class="nam">other</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
668
-<p id="t278" class="pln"><span class="strut">&nbsp;</span></p>
669
-<p id="t279" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__le__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">other</span><span class="op">:</span> <span class="str">"Pipeline"</span><span class="op">)</span> <span class="op">-></span> <span class="nam">bool</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
670
-<p id="t280" class="pln">        <span class="str">"""Compare the step lengths with &lt;=."""</span><span class="strut">&nbsp;</span></p>
671
-<p id="t281" class="stm run hide_run">        <span class="key">return</span> <span class="nam">len</span><span class="op">(</span><span class="nam">self</span><span class="op">)</span> <span class="op">&lt;=</span> <span class="nam">len</span><span class="op">(</span><span class="nam">other</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
672
-<p id="t282" class="pln"><span class="strut">&nbsp;</span></p>
673
-<p id="t283" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__ge__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">other</span><span class="op">:</span> <span class="str">"Pipeline"</span><span class="op">)</span> <span class="op">-></span> <span class="nam">bool</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
674
-<p id="t284" class="pln">        <span class="str">"""Compare the step lengths with >=."""</span><span class="strut">&nbsp;</span></p>
675
-<p id="t285" class="stm run hide_run">        <span class="key">return</span> <span class="nam">len</span><span class="op">(</span><span class="nam">self</span><span class="op">)</span> <span class="op">>=</span> <span class="nam">len</span><span class="op">(</span><span class="nam">other</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
676
-<p id="t286" class="pln"><span class="strut">&nbsp;</span></p>
677
-<p id="t287" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__eq__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">other</span><span class="op">)</span> <span class="op">-></span> <span class="nam">bool</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
678
-<p id="t288" class="pln">        <span class="str">"""Compare the step lengths with ==."""</span><span class="strut">&nbsp;</span></p>
679
-<p id="t289" class="stm run hide_run">        <span class="key">return</span> <span class="nam">len</span><span class="op">(</span><span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span> <span class="op">==</span> <span class="nam">len</span><span class="op">(</span><span class="nam">other</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
680
-<p id="t290" class="pln"><span class="strut">&nbsp;</span></p>
681
-<p id="t291" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__ne__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">other</span><span class="op">)</span> <span class="op">-></span> <span class="nam">bool</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
682
-<p id="t292" class="pln">        <span class="str">"""Compare the step lengths with !=."""</span><span class="strut">&nbsp;</span></p>
683
-<p id="t293" class="stm run hide_run">        <span class="key">return</span> <span class="nam">len</span><span class="op">(</span><span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span> <span class="op">!=</span> <span class="nam">len</span><span class="op">(</span><span class="nam">other</span><span class="op">.</span><span class="nam">steps</span><span class="op">)</span><span class="strut">&nbsp;</span></p>
684
-<p id="t294" class="pln"><span class="strut">&nbsp;</span></p>
685
-<p id="t295" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__pow__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">other</span><span class="op">:</span> <span class="str">"Pipeline"</span><span class="op">)</span> <span class="op">-></span> <span class="nam">bool</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
686
-<p id="t296" class="pln">        <span class="str">"""Compare the pipeline functions in order."""</span><span class="strut">&nbsp;</span></p>
687
-<p id="t297" class="stm run hide_run">        <span class="nam">fself</span> <span class="op">=</span> <span class="op">[</span><span class="nam">f</span> <span class="key">for</span> <span class="nam">f</span><span class="op">,</span> <span class="nam">args</span><span class="op">,</span> <span class="nam">kwargs</span> <span class="key">in</span> <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
688
-<p id="t298" class="stm run hide_run">        <span class="nam">fother</span> <span class="op">=</span> <span class="op">[</span><span class="nam">f</span> <span class="key">for</span> <span class="nam">f</span><span class="op">,</span> <span class="nam">args</span><span class="op">,</span> <span class="nam">kwargs</span> <span class="key">in</span> <span class="nam">other</span><span class="op">.</span><span class="nam">steps</span><span class="op">]</span><span class="strut">&nbsp;</span></p>
689
-<p id="t299" class="pln"><span class="strut">&nbsp;</span></p>
690
-<p id="t300" class="stm run hide_run">        <span class="key">return</span> <span class="nam">fself</span> <span class="op">==</span> <span class="nam">fother</span><span class="strut">&nbsp;</span></p>
691
-<p id="t301" class="pln"><span class="strut">&nbsp;</span></p>
692
-<p id="t302" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__lshift__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">other</span><span class="op">:</span> <span class="str">"Pipeline"</span><span class="op">)</span> <span class="op">-></span> <span class="nam">bool</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
693
-<p id="t303" class="pln">        <span class="str">"""Return True if self is a subset of other."""</span><span class="strut">&nbsp;</span></p>
694
-<p id="t304" class="stm run hide_run">        <span class="key">for</span> <span class="nam">s</span> <span class="key">in</span> <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
695
-<p id="t305" class="stm run hide_run">            <span class="key">if</span> <span class="nam">s</span> <span class="key">not</span> <span class="key">in</span> <span class="nam">other</span><span class="op">.</span><span class="nam">steps</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
696
-<p id="t306" class="stm run hide_run">                <span class="key">return</span> <span class="key">False</span><span class="strut">&nbsp;</span></p>
697
-<p id="t307" class="pln"><span class="strut">&nbsp;</span></p>
698
-<p id="t308" class="stm run hide_run">        <span class="key">return</span> <span class="key">True</span><span class="strut">&nbsp;</span></p>
699
-<p id="t309" class="pln"><span class="strut">&nbsp;</span></p>
700
-<p id="t310" class="stm run hide_run">    <span class="key">def</span> <span class="nam">__rshift__</span><span class="op">(</span><span class="nam">self</span><span class="op">,</span> <span class="nam">other</span><span class="op">:</span> <span class="str">"Pipeline"</span><span class="op">)</span> <span class="op">-></span> <span class="nam">bool</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
701
-<p id="t311" class="pln">        <span class="str">"""Return True if self is a superset of other."""</span><span class="strut">&nbsp;</span></p>
702
-<p id="t312" class="stm run hide_run">        <span class="key">for</span> <span class="nam">s</span> <span class="key">in</span> <span class="nam">other</span><span class="op">.</span><span class="nam">steps</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
703
-<p id="t313" class="stm run hide_run">            <span class="key">if</span> <span class="nam">s</span> <span class="key">not</span> <span class="key">in</span> <span class="nam">self</span><span class="op">.</span><span class="nam">steps</span><span class="op">:</span><span class="strut">&nbsp;</span></p>
704
-<p id="t314" class="stm run hide_run">                <span class="key">return</span> <span class="key">False</span><span class="strut">&nbsp;</span></p>
705
-<p id="t315" class="pln"><span class="strut">&nbsp;</span></p>
706
-<p id="t316" class="stm run hide_run">        <span class="key">return</span> <span class="key">True</span><span class="strut">&nbsp;</span></p>
707
-
708
-            </td>
709
-        </tr>
710
-    </table>
711
-</div>
712
-
713
-<div id="footer">
714
-    <div class="content">
715
-        <p>
716
-            <a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v4.5.1</a>,
717
-            created at 2018-10-18 15:43
718
-        </p>
719
-    </div>
720
-</div>
721
-
722
-</body>
723
-</html>

+ 0
- 152
covers/htmlcov/index.html View File

@@ -1,152 +0,0 @@
1
-
2
-
3
-
4
-<!DOCTYPE html>
5
-<html>
6
-<head>
7
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8
-    <title>Coverage report</title>
9
-    <link rel="stylesheet" href="style.css" type="text/css">
10
-    
11
-    <script type="text/javascript" src="jquery.min.js"></script>
12
-    <script type="text/javascript" src="jquery.ba-throttle-debounce.min.js"></script>
13
-    <script type="text/javascript" src="jquery.tablesorter.min.js"></script>
14
-    <script type="text/javascript" src="jquery.hotkeys.js"></script>
15
-    <script type="text/javascript" src="coverage_html.js"></script>
16
-    <script type="text/javascript">
17
-        jQuery(document).ready(coverage.index_ready);
18
-    </script>
19
-</head>
20
-<body class="indexfile">
21
-
22
-<div id="header">
23
-    <div class="content">
24
-        <h1>Coverage report:
25
-            <span class="pc_cov">100%</span>
26
-        </h1>
27
-
28
-        <img id="keyboard_icon" src="keybd_closed.png" alt="Show keyboard shortcuts" />
29
-
30
-        <form id="filter_container">
31
-            <input id="filter" type="text" value="" placeholder="filter..." />
32
-        </form>
33
-    </div>
34
-</div>
35
-
36
-<div class="help_panel">
37
-    <img id="panel_icon" src="keybd_open.png" alt="Hide keyboard shortcuts" />
38
-    <p class="legend">Hot-keys on this page</p>
39
-    <div>
40
-    <p class="keyhelp">
41
-        <span class="key">n</span>
42
-        <span class="key">s</span>
43
-        <span class="key">m</span>
44
-        <span class="key">x</span>
45
-        
46
-        <span class="key">b</span>
47
-        <span class="key">p</span>
48
-        
49
-        <span class="key">c</span> &nbsp; change column sorting
50
-    </p>
51
-    </div>