i

Jupyter

Jupyter kann in den beiden folgenden Versionen eingebunden werden:

  • Jupyter-Notebook: ablenkungsfreiere Version
  • Jupyter-Lab: komplexere Version, mehrere Tabs möglich

Jupyter-Notebook einbinden (genau 1 Datei in lokalem Verzeichnis)

Jupyter-Notebook kann wie folgt eingebunden werden und genau eine Datei aus dem lokalen Verzeichnis öffnen.
    <center>
        <a id="lab" target="_blank" href"#">Vollbildmodus</a> ・ Download:
        <a id="download" target="_blank" href"#">Jupyter-Notebook</a>
    </center>
    
    <iframe id="ilab" src="#" style="min-height:75vh; min-width: 100%; border: none;"></iframe>
    
    <script>
        file = "hello-world.ipynb"
    
        path = baseURL + "/assets/thirdparty/jupyter/_output/notebooks/index.html?fromURL="
                       + window.location.href + "/" + file
    
        document.getElementById("lab").setAttribute("href", path);
        document.getElementById("download").setAttribute("href", window.location.href + "/" + file);
    
        document.getElementById("ilab").setAttribute("src", path);
    </script>

Ergebnis Jupyter-Notebook (genau 1 Datei in lokalem Verzeichnis)

Vollbildmodus ・ Download: Jupyter-Notebook

Jupyter-Lab einbinden (mehrere Dateien in lokalem Verzeichnis)

Achtung Im Moment ist noch nicht reproduzierbar, welche der Dateien nach dem Laden geöffnet ist. Deshalb ist diese Methode noch nicht für das Schulbuch geeignet, sondern nur für den Lösungsbereich. Ein feature-request an die Erweiterung fromURL ist gestellt, aber noch nicht bearbeitet.

Sollen im Schulbuch mehrere Dateien geladen werden und zuverlässig eine der Dateien angezeigt werden, so müssen daher im Moment noch alle Dateien im entsprechenden Unterverzeichnis von /assets hinterlegt werden. Dieses Unterverzeichnis wird jedoch automatisch generiert (und auch automatisch überschrieben!). Also bitte nicht selbständig ändern, sondern Kontakt zu Ulla aufnehmen.

    <center>
        <a id="lab1" target="_blank" href"#">Vollbildmodus</a> ・ Download:
        <a id="download1" target="_blank" href"#">Jupyter-Notebook</a>
        <a id="download2" target="_blank" href"#">Dataset</a>
    
    </center>
    
    <iframe id="ilab1" src="#" style="min-height:75vh; min-width: 100%; border: none;"></iframe>
    
    <script>
        file1 = "hello-world.ipynb"
        file2 = "data.csv"
    
        path = baseURL + "/assets/thirdparty/jupyter/_output/lab/index.html?fromURL="
                       + window.location.href + "/" + file2 + "&fromURL="
                       + window.location.href + "/" + file1
    
        document.getElementById("lab1").setAttribute("href", path);
        document.getElementById("download1").setAttribute("href", window.location.href + "/" + file1);
        document.getElementById("download2").setAttribute("href", window.location.href + "/" + file2);
    
        document.getElementById("ilab1").setAttribute("src", path);
    </script>

Ergebnis Jupyter-Lab (mehrere Dateien in lokalem Verzeichnis)

Vollbildmodus ・ Download: Jupyter-Notebook Dataset

Jupyter-Notebook einbinden im Schulbuch (mehrere Dateienin zentralen Verzeichnis)

Achtung: Die Dateien in Verzeichnis /assets/thirdparty/jupyter/_output/files/ werden automatisch generiert (und auch autmatisch überschrieben!). Also bitte nicht selbständig ändern, sondern Kontakt zu Ulla aufnehmen.
    <center>
        <a id="lab2" target="_blank" href"#">Vollbildmodus</a> ・ Download:
        <a id="download21" target="_blank" href"#">Jupyter-Notebook</a>
        <a id="download22" target="_blank" href"#">Dataset-1</a>
        <a id="download23" target="_blank" href"#">Dataset-2</a>
        </center>
        
        <iframe id="ilab2" src="#" style="min-height:75vh; min-width: 100%; border: none;"></iframe>
        
        <script>
            file21 = "deep-learning-mit-knn/10.3-ziffernerkennung-tiefe-netze-aufgabe.ipynb"
            file22 = "deep-learning-mit-knn/mnist_dataset/mnist_train_1000.csv"
            file23 = "deep-learning-mit-knn/mnist_dataset/mnist_test_100.csv"
        
            path2 = baseURL + "/assets/thirdparty/jupyter/_output/tree/index.html?path="+ file21
        
            document.getElementById("lab2").setAttribute("href", path2);
        
            document.getElementById("download21").setAttribute("href", baseURL + "/assets/thirdparty/jupyter/_output/files/"+ file21);
            document.getElementById("download22").setAttribute("href", baseURL + "/assets/thirdparty/jupyter/_output/files/"+ file22);
            document.getElementById("download23").setAttribute("href", baseURL + "/assets/thirdparty/jupyter/_output/files/"+ file23);
        
            document.getElementById("ilab2").setAttribute("src", path2);
        </script>

Ergebnis Jupyter-Notebook (mehrere Dateien in zentralen Verzeichnis)

Vollbildmodus ・ Download: Jupyter-Notebook Dataset-1 Dataset-2

Suche

v
17.6.3.4.31
https://inf-schule.de/infschule/dokumentation/kapitel-erstellen/interaktive-elemente/jupyter
https://inf-schule.de/17.6.3.4.31
https://inf-schule.de/@/page/P3c9F8cGcRJm3xC9

Rückmeldung geben