Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
marko-knoebl committed Sep 15, 2021
1 parent 88aa903 commit 4d31b56
Show file tree
Hide file tree
Showing 24 changed files with 250 additions and 194 deletions.
2 changes: 1 addition & 1 deletion docs/index-collection-de.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index-collection-en.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/python-advanced-collection-de.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html lang="de" style="height:100%"><head><meta charSet="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap-reboot.min.css"/></head><body style="height:100%"><div style="height:100%;display:flex;align-items:stretch"><nav style="flex-basis:320px;overflow:auto;padding-top:4em;padding-left:1em;padding-right:1em;padding-bottom:0.5em;margin-bottom:0.5em"><div>parent topic: <a href="/slides/python-all-de.html">Python</a></div><div><a href="python-advanced-de.html">show presentation individually</a></div><section><h1>Python Fortgeschritten</h1><ul><li><a href="/slides/python-advanced-de.html#/0" target="content">Python Fortgeschritten</a></li><li><a href="/slides/python-advanced-de.html#/1" target="content">Logging</a></li><li><a href="/slides/python-advanced-de.html#/2" target="content">Automatisiertes Testen</a></li><li><a href="/slides/python-advanced-de.html#/3" target="content">Pytest</a></li><li><a href="/slides/python-advanced-de.html#/4" target="content">Doctests</a></li><li><a href="/slides/python-advanced-de.html#/5" target="content">Unittest</a></li><li><a href="/slides/python-advanced-de.html#/6" target="content">Docstrings</a></li><li><a href="/slides/python-advanced-de.html#/7" target="content">Type Hints</a></li><li><a href="/slides/python-advanced-de.html#/8" target="content">Fortgeschrittene objektorientierte Programmierung</a></li><li><a href="/slides/python-advanced-de.html#/9" target="content">OOP: Properties</a></li><li><a href="/slides/python-advanced-de.html#/10" target="content">OOP: Statische Attribute und Methoden</a></li><li><a href="/slides/python-advanced-de.html#/11" target="content">OOP: Magic Methods</a></li><li><a href="/slides/python-advanced-de.html#/12" target="content">OOP: Vererbung</a></li><li><a href="/slides/python-advanced-de.html#/13" target="content">OOP: Vertiefung</a></li><li><a href="/slides/python-advanced-de.html#/14" target="content">Iterators</a></li><li><a href="/slides/python-advanced-de.html#/15" target="content">Generatorfunktionen und Generator Expressions</a></li><li><a href="/slides/python-advanced-de.html#/16" target="content">Iterators: Hintergründe</a></li><li><a href="/slides/python-advanced-de.html#/17" target="content">Schleifen</a></li><li><a href="/slides/python-advanced-de.html#/18" target="content">Lambdas</a></li><li><a href="/slides/python-advanced-de.html#/19" target="content">Funktionen höherer Ordnung</a></li><li><a href="/slides/python-advanced-de.html#/20" target="content">Fortgeschrittene Datentypen</a></li><li><a href="/slides/python-advanced-de.html#/21" target="content">set &amp; frozenset</a></li><li><a href="/slides/python-advanced-de.html#/22" target="content">namedtuple</a></li><li><a href="/slides/python-advanced-de.html#/23" target="content">Enum</a></li><li><a href="/slides/python-advanced-de.html#/24" target="content">Prallelisierung</a></li></ul></section></nav><main style="flex-grow:1"><iframe name="content" style="width:100%;height:100%;border:none"></iframe></main><button id="nav-toggle-button" style="position:absolute;top:1rem;left:1rem;padding:0.4em 0.8em;cursor:pointer;border-radius:0.25em;background-color:#0074d9;color:#ffffff;border:none">toggle sidebar</button><style>
<html lang="de" style="height:100%"><head><meta charSet="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap-reboot.min.css"/></head><body style="height:100%"><div style="height:100%;display:flex;align-items:stretch"><nav style="flex-basis:320px;overflow:auto;padding-top:4em;padding-left:1em;padding-right:1em;padding-bottom:0.5em;margin-bottom:0.5em"><div>parent topic: <a href="/slides/python-all-de.html">Python</a></div><div><a href="python-advanced-de.html">show presentation individually</a></div><section><h1>Python Fortgeschritten</h1><ul><li><a href="/slides/python-advanced-de.html#/0" target="content">Python Fortgeschritten</a></li><li><a href="/slides/python-advanced-de.html#/1" target="content">Logging</a></li><li><a href="/slides/python-advanced-de.html#/2" target="content">Automatisiertes Testen</a></li><li><a href="/slides/python-advanced-de.html#/3" target="content">Pytest</a></li><li><a href="/slides/python-advanced-de.html#/4" target="content">Doctests</a></li><li><a href="/slides/python-advanced-de.html#/5" target="content">Unittest</a></li><li><a href="/slides/python-advanced-de.html#/6" target="content">Docstrings</a></li><li><a href="/slides/python-advanced-de.html#/7" target="content">Type Hints</a></li><li><a href="/slides/python-advanced-de.html#/8" target="content">Fortgeschrittene objektorientierte Programmierung</a></li><li><a href="/slides/python-advanced-de.html#/9" target="content">OOP: Properties</a></li><li><a href="/slides/python-advanced-de.html#/10" target="content">OOP: Statische Attribute und Methoden</a></li><li><a href="/slides/python-advanced-de.html#/11" target="content">OOP: Magic Methods</a></li><li><a href="/slides/python-advanced-de.html#/12" target="content">OOP: Vererbung</a></li><li><a href="/slides/python-advanced-de.html#/13" target="content">OOP: Vertiefung</a></li><li><a href="/slides/python-advanced-de.html#/14" target="content">Iterables und Iterators</a></li><li><a href="/slides/python-advanced-de.html#/15" target="content">Generatorfunktionen und Generator Expressions</a></li><li><a href="/slides/python-advanced-de.html#/16" target="content">Iterators: Hintergründe</a></li><li><a href="/slides/python-advanced-de.html#/17" target="content">Schleifen</a></li><li><a href="/slides/python-advanced-de.html#/18" target="content">Lambdas</a></li><li><a href="/slides/python-advanced-de.html#/19" target="content">Funktionen höherer Ordnung</a></li><li><a href="/slides/python-advanced-de.html#/20" target="content">Fortgeschrittene Datentypen</a></li><li><a href="/slides/python-advanced-de.html#/21" target="content">set &amp; frozenset</a></li><li><a href="/slides/python-advanced-de.html#/22" target="content">namedtuple</a></li><li><a href="/slides/python-advanced-de.html#/23" target="content">Enum</a></li><li><a href="/slides/python-advanced-de.html#/24" target="content">Prallelisierung</a></li></ul></section></nav><main style="flex-grow:1"><iframe name="content" style="width:100%;height:100%;border:none"></iframe></main><button id="nav-toggle-button" style="position:absolute;top:1rem;left:1rem;padding:0.4em 0.8em;cursor:pointer;border-radius:0.25em;background-color:#0074d9;color:#ffffff;border:none">toggle sidebar</button><style>
nav.hidden {
display: none;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/python-advanced-collection-en.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html lang="en" style="height:100%"><head><meta charSet="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap-reboot.min.css"/></head><body style="height:100%"><div style="height:100%;display:flex;align-items:stretch"><nav style="flex-basis:320px;overflow:auto;padding-top:4em;padding-left:1em;padding-right:1em;padding-bottom:0.5em;margin-bottom:0.5em"><div>parent topic: <a href="/slides/python-all-en.html">Python</a></div><div><a href="python-advanced-en.html">show presentation individually</a></div><section><h1>Python Advanced</h1><ul><li><a href="/slides/python-advanced-en.html#/0" target="content">Python Advanced</a></li><li><a href="/slides/python-advanced-en.html#/1" target="content">Logging</a></li><li><a href="/slides/python-advanced-en.html#/2" target="content">Automated testing</a></li><li><a href="/slides/python-advanced-en.html#/3" target="content">Pytest</a></li><li><a href="/slides/python-advanced-en.html#/4" target="content">Doctests</a></li><li><a href="/slides/python-advanced-en.html#/5" target="content">Unittest</a></li><li><a href="/slides/python-advanced-en.html#/6" target="content">Docstrings</a></li><li><a href="/slides/python-advanced-en.html#/7" target="content">Type hints</a></li><li><a href="/slides/python-advanced-en.html#/8" target="content">Advanced object-oriented programming</a></li><li><a href="/slides/python-advanced-en.html#/9" target="content">OOP: Properties</a></li><li><a href="/slides/python-advanced-en.html#/10" target="content">OOP: Static attributes and methods</a></li><li><a href="/slides/python-advanced-en.html#/11" target="content">OOP: Magic Methods</a></li><li><a href="/slides/python-advanced-en.html#/12" target="content">OOP: Inheritance</a></li><li><a href="/slides/python-advanced-en.html#/13" target="content">OOP: In depth</a></li><li><a href="/slides/python-advanced-en.html#/14" target="content">Iterators</a></li><li><a href="/slides/python-advanced-en.html#/15" target="content">Generator functions and generator expressions</a></li><li><a href="/slides/python-advanced-en.html#/16" target="content">Iterators: internals</a></li><li><a href="/slides/python-advanced-en.html#/17" target="content">For ... else</a></li><li><a href="/slides/python-advanced-en.html#/18" target="content">Lambdas</a></li><li><a href="/slides/python-advanced-en.html#/19" target="content">Higher-order functions</a></li><li><a href="/slides/python-advanced-en.html#/20" target="content">Advanced data types</a></li><li><a href="/slides/python-advanced-en.html#/21" target="content">set &amp; frozenset</a></li><li><a href="/slides/python-advanced-en.html#/22" target="content">namedtuple</a></li><li><a href="/slides/python-advanced-en.html#/23" target="content">Enum</a></li><li><a href="/slides/python-advanced-en.html#/24" target="content">Parallelization</a></li></ul></section></nav><main style="flex-grow:1"><iframe name="content" style="width:100%;height:100%;border:none"></iframe></main><button id="nav-toggle-button" style="position:absolute;top:1rem;left:1rem;padding:0.4em 0.8em;cursor:pointer;border-radius:0.25em;background-color:#0074d9;color:#ffffff;border:none">toggle sidebar</button><style>
<html lang="en" style="height:100%"><head><meta charSet="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap-reboot.min.css"/></head><body style="height:100%"><div style="height:100%;display:flex;align-items:stretch"><nav style="flex-basis:320px;overflow:auto;padding-top:4em;padding-left:1em;padding-right:1em;padding-bottom:0.5em;margin-bottom:0.5em"><div>parent topic: <a href="/slides/python-all-en.html">Python</a></div><div><a href="python-advanced-en.html">show presentation individually</a></div><section><h1>Python Advanced</h1><ul><li><a href="/slides/python-advanced-en.html#/0" target="content">Python Advanced</a></li><li><a href="/slides/python-advanced-en.html#/1" target="content">Logging</a></li><li><a href="/slides/python-advanced-en.html#/2" target="content">Automated testing</a></li><li><a href="/slides/python-advanced-en.html#/3" target="content">Pytest</a></li><li><a href="/slides/python-advanced-en.html#/4" target="content">Doctests</a></li><li><a href="/slides/python-advanced-en.html#/5" target="content">Unittest</a></li><li><a href="/slides/python-advanced-en.html#/6" target="content">Docstrings</a></li><li><a href="/slides/python-advanced-en.html#/7" target="content">Type hints</a></li><li><a href="/slides/python-advanced-en.html#/8" target="content">Advanced object-oriented programming</a></li><li><a href="/slides/python-advanced-en.html#/9" target="content">OOP: Properties</a></li><li><a href="/slides/python-advanced-en.html#/10" target="content">OOP: Static attributes and methods</a></li><li><a href="/slides/python-advanced-en.html#/11" target="content">OOP: Magic Methods</a></li><li><a href="/slides/python-advanced-en.html#/12" target="content">OOP: Inheritance</a></li><li><a href="/slides/python-advanced-en.html#/13" target="content">OOP: In depth</a></li><li><a href="/slides/python-advanced-en.html#/14" target="content">Iterables and iterators</a></li><li><a href="/slides/python-advanced-en.html#/15" target="content">Generator functions and generator expressions</a></li><li><a href="/slides/python-advanced-en.html#/16" target="content">Iterators: internals</a></li><li><a href="/slides/python-advanced-en.html#/17" target="content">For ... else</a></li><li><a href="/slides/python-advanced-en.html#/18" target="content">Lambdas</a></li><li><a href="/slides/python-advanced-en.html#/19" target="content">Higher-order functions</a></li><li><a href="/slides/python-advanced-en.html#/20" target="content">Advanced data types</a></li><li><a href="/slides/python-advanced-en.html#/21" target="content">set &amp; frozenset</a></li><li><a href="/slides/python-advanced-en.html#/22" target="content">namedtuple</a></li><li><a href="/slides/python-advanced-en.html#/23" target="content">Enum</a></li><li><a href="/slides/python-advanced-en.html#/24" target="content">Parallelization</a></li></ul></section></nav><main style="flex-grow:1"><iframe name="content" style="width:100%;height:100%;border:none"></iframe></main><button id="nav-toggle-button" style="position:absolute;top:1rem;left:1rem;padding:0.4em 0.8em;cursor:pointer;border-radius:0.25em;background-color:#0074d9;color:#ffffff;border:none">toggle sidebar</button><style>
nav.hidden {
display: none;
}
Expand Down
78 changes: 50 additions & 28 deletions docs/python-advanced-de.html
Original file line number Diff line number Diff line change
Expand Up @@ -2623,33 +2623,70 @@
<li>Klasse "BankAccount"</li>
<li>Klasse "Dictionary" (Wörterbuch)</li>
</ul>
</section></section><section class="slides-section"><section class="slide"><h1>Iterators</h1>
</section></section><section class="slides-section"><section class="slide"><h1>Iterables und Iterators</h1>
</section><section class="slide"><h2>Iterables und Iterators</h2>
<p><em>Iterable</em>: ein Objekt, über das mittels <code>for element in my_iterable</code> iteriert werden kann</p>
<p><em>Iterator</em>: ein leichtgewichtiges Iterable</p>
<ul>
<li>"statisches <em>Iterable</em>": Elementenabfolge ist vordefiniert (z.B. <em>list</em>)</li>
<li>"dynamisches <em>Iterable</em>": Elemente werden während des Durchlaufs erzeugt (z.B. <em>range</em>)</li>
</ul>
</section><section class="slide"><h2>Iterables und Iterators</h2>
<p>Beispiele für Iterables:</p>
<p>Hierarchie von Iterables:</p>
<ul>
<li>lists</li>
<li>dicts</li>
<li>range-Objekte</li>
<li>iterators</li>
<li>"statische Iterables" (z.B. <em>list</em>, <em>dict</em>)</li>
<li>"dynamische Iterables" (z.B. <em>range</em>)
<ul>
<li>Iterators (z.B. <em>enumerate</em>, <em>os.scandir</em>)
<ul>
<li>Generators (selbst-definiert)</li>
</ul>
</section><section class="slide"><h2>Iterators</h2>
<p>Ein <em>Iterator</em> ist ein ressourcensparendes Iterable</p>
<p>Mögliche Vorteile eines Iterators gegenüber Listen:</p>
</li>
</ul>
</li>
</ul>
</section><section class="slide"><h2>Iterables und Iterators</h2>
<p>Vorteile von "dynamischen Iterables" / Iterators:</p>
<ul>
<li>Ressourcen werden nur bei Bedarf erstellt / abgefragt</li>
<li>Speicherverbrauch bleibt niedrig (nur je ein Element ist jeweils im Speicher)</li>
</ul>
</section><section class="slide"><h2>Iterators</h2>
</section><section class="slide"><h2>Iterables und Iterators</h2>
<p>Beispiele für "statische Iterables":</p>
<ul>
<li>list</li>
<li>tuple</li>
<li>dict</li>
<li>string</li>
</ul>
</section><section class="slide"><h2>Iterables und Iterators</h2>
<p>Beispiele für "dynamische Iterables":</p>
<ul>
<li>range-Objekte</li>
<li>iterators</li>
</ul>
</section><section class="slide"><h2>Iterables und Iterators</h2>
<p>Aufrufe, die Iterators zurückgeben:</p>
<ul>
<li><code>enumerate()</code></li>
<li><code>reversed()</code></li>
<li><code>open()</code></li>
<li><code>os.walk()</code></li>
<li><code>os.scandir()</code></li>
<li><code>map()</code></li>
<li><code>filter()</code></li>
<li>Funktionen in <em>itertools</em></li>
<li>üblicherweise Datenbankcursor (PEP 249)</li>
<li>Generators</li>
<li>...</li>
</ul>
</section><section class="slide"><h2>Iterables und Iterators</h2>
<p>Beispiel: <code>open()</code> gibt einen Iterator von Zeilen einer Datei zurück</p>
<pre><code class="hljs language-py"><span class="hljs-keyword">with</span> <span class="hljs-built_in">open</span>(<span class="hljs-string">"./foo.txt"</span>, encoding=<span class="hljs-string">"utf-8"</span>) <span class="hljs-keyword">as</span> f:
<span class="hljs-keyword">for</span> line <span class="hljs-keyword">in</span> f:
<span class="hljs-built_in">print</span> line
</code></pre>
<p>Die Datei könnte mehrere GB oder größer sein und dieser Code würde problemlos laufen</p>
</section><section class="slide"><h2>Iterators</h2>
<p>Die Datei könnte mehrere GB groß sein und dieser Code würde problemlos laufen</p>
</section><section class="slide"><h2>Iterators und Iterators</h2>
<p>Beispielfunktionen:</p>
<p>Lädt alle Textdateien in <em>./foo/</em> gleichzeitig in eine Liste, iteriert dann über sie:</p>
<pre><code class="hljs language-py"><span class="hljs-keyword">for</span> text <span class="hljs-keyword">in</span> read_textfiles_as_list(<span class="hljs-string">"./foo/"</span>):
Expand All @@ -2659,21 +2696,6 @@
<pre><code class="hljs language-py"><span class="hljs-keyword">for</span> text <span class="hljs-keyword">in</span> read_textfiles_as_iterator(<span class="hljs-string">"./foo/"</span>):
print(text[:<span class="hljs-number">5</span>])
</code></pre>
</section><section class="slide"><h2>Iterators</h2>
<p>Aufrufe, die Iterators zurückgeben:</p>
<ul>
<li><code>enumerate()</code></li>
<li><code>reversed()</code></li>
<li><code>open()</code></li>
<li><code>os.walk()</code></li>
<li><code>os.scandir()</code></li>
<li><code>map()</code></li>
<li><code>filter()</code></li>
<li>Funktionen in <em>itertools</em></li>
<li>üblicherweise Datenbankcursor (PEP 249)</li>
<li>...</li>
</ul>
<p>Bemerkung: <code>range</code> gibt keinen Iterator zurück (aber ein ähnliches Objekt)</p>
</section><section class="slide"><h2>Itertools</h2>
<p><a href="https://docs.python.org/3/library/itertools.html">itertools</a>: Modul zum erstellen von Iterators</p>
<ul>
Expand Down
Loading

0 comments on commit 4d31b56

Please sign in to comment.