From fa4237904dd3e41138f9e510293536e962705157 Mon Sep 17 00:00:00 2001 From: Kevin Mader Date: Fri, 22 Nov 2019 18:01:40 +0100 Subject: [PATCH] adding build file (#65) * adding build file * adding badge fixing inkscape install * adding pip to environment, adding tex to build pdf workflow * using chrome to convert pdfs adding pdf badge * adding sudo * fixing pdf generating code and forcing draft-status * updating pdf-building, removing png files * updating pdf workflow * adding pdf upload and link * changing id --- .github/workflows/pdf.yml | 93 +++++++++++++++++++++++++++++++++++++ Lectures/10-ScalingUp.ipynb | 2 +- README.md | 28 +++++------ binder/environment.yml | 1 + 4 files changed, 109 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/pdf.yml diff --git a/.github/workflows/pdf.yml b/.github/workflows/pdf.yml new file mode 100644 index 0000000..f4a7edb --- /dev/null +++ b/.github/workflows/pdf.yml @@ -0,0 +1,93 @@ +name: make_pdfs + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: apt_deps + run: | + sudo apt-get update + sudo apt-get install -y inkscape ghostscript + sudo apt-get install -y --no-install-recommends chromium-browser + - name: Setup environment + run: | + mkdir -p download + cd download + echo "Cached in $HOME/download :" + if [[ ! -f miniconda.sh ]] + then + wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \ + -O miniconda.sh + fi + chmod +x miniconda.sh && ./miniconda.sh -b + cd .. + export PATH="$HOME/miniconda3/bin:$PATH" + conda update --yes conda + # Configure the conda environment and put it in the path using the + # provided versions + conda create -n testenv --yes python=$PYTHON_VERSION pip nose pytest + conda env update -n testenv -f binder/environment.yml -q + source activate testenv + chmod a+x binder/postBuild + sh binder/postBuild + ipython kernel install --user --name testkernel + jupyter kernelspec list + - name: Build Lectures + run: | + export PATH="$HOME/miniconda3/bin:$PATH"; + source activate testenv; + shopt -s globstar; + cd Lectures; + for nb in *ipynb; do + if [[ $nb = *"Kaggle"* ]]; then + echo "skipping kaggle kernel $nb"; + else + jupyter nbconvert --ExecutePreprocessor.timeout=3600 --ExecutePreprocessor.kernel_name=testkernel "$nb" --to html + chromium-browser --no-sandbox --headless --disable-gpu --print-to-pdf=$(basename "$nb" .ipynb).pdf $(basename "$nb" .ipynb).html + fi; + done + cd .. + - name: Collect PDFs + run: | + zip -r pdfs.zip */*.pdf + zip -ur pdfs.zip */*.html + - name: Make Combined + run: | + git clone https://github.com/bronson/pdfdir + pdfdir/pdfdir-join Lectures/ + zip -ur pdfs.zip Lectures.pdf + - name: Create Release + id: create_release + uses: actions/create-release@v1.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: true + prerelease: false + - name: Upload Release Asset + id: upload-zip + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: pdfs.zip + asset_name: pdfs.zip + asset_content_type: application/zip + - name: Upload UberPDF + id: upload-pdf + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: Lectures.pdf + asset_name: all_lectures.pdf + asset_content_type: application/pdf diff --git a/Lectures/10-ScalingUp.ipynb b/Lectures/10-ScalingUp.ipynb index e3f5964..f7170ec 100644 --- a/Lectures/10-ScalingUp.ipynb +++ b/Lectures/10-ScalingUp.ipynb @@ -1053,7 +1053,7 @@ "$$ \\rightarrow 0.975 $$\n", "\n", "We could have done these easily without SQL using Excel, Matlab or R\n", - "\n![image.png](attachment:image.png)" + "\n" ], "metadata": { "slideshow": { diff --git a/README.md b/README.md index b3b4d32..8a39e72 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![Build Status](https://travis-ci.org/kmader/Quantitative-Big-Imaging-2019.svg?branch=master)](https://travis-ci.org/kmader/Quantitative-Big-Imaging-2019) ![](https://github.com/kmader/Quantitative-Big-Imaging-2019/workflows/build_notebooks/badge.svg) +[![Make PDF](https://github.com/kmader/Quantitative-Big-Imaging-2019/workflows/make_pdfs/badge.svg)](https://github.com/kmader/Quantitative-Big-Imaging-2019/releases) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/kmader/Quantitative-Big-Imaging-2019.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/kmader/Quantitative-Big-Imaging-2019/context:python) [![Total alerts](https://img.shields.io/lgtm/alerts/g/kmader/Quantitative-Big-Imaging-2019.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/kmader/Quantitative-Big-Imaging-2019/alerts/) @@ -9,7 +10,7 @@ Here are the lectures, exercises, and additional course materials corresponding to the spring semester 2019 course at ETH Zurich, [227-0966-00L](http://www.vvz.ethz.ch/Vorlesungsverzeichnis/lerneinheit.view?lerneinheitId=128120&semkez=2019S&ansicht=KATALOGDATEN&lang=en): Quantitative Big Imaging. -The lectures have been prepared and given by Kevin Mader and associated guest lecturers. Please note the Lecture Slides and PDF do not contain source code, this is only available in the handout file. Some of the lectures will be recorded and placed on YouTube on the [QBI Playlist](https://www.youtube.com/playlist?list=PLTWuXgjdOrnmXVVQG5DRkVeOIGOcTmCIw). The lectures are meant to be followed in chronological order and each lecture has a corresponding hands-on exercises in the exercises section. +The lectures have been prepared and given by Kevin Mader and associated guest lecturers. Please note the Lecture Slides and PDF do not contain source code, this is only available in the handout file. Some of the lectures will be recorded and placed on YouTube on the [QBI Playlist](https://www.youtube.com/playlist?list=PLTWuXgjdOrnmXVVQG5DRkVeOIGOcTmCIw). The lectures are meant to be followed in chronological order and each lecture has a corresponding hands-on exercise. The entire lecture set is available as a single PDF file available in the [releases section](https://github.com/kmader/Quantitative-Big-Imaging-2019/releases) ## Learning Objectives @@ -61,7 +62,7 @@ For communicating, discussions, asking questions, and everything, we will be try - [Slides (static)](http://nbviewer.jupyter.org/format/slides/github/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/01-Introduction.ipynb) [![slides](https://img.shields.io/badge/interactive-slides-green.svg)](http://mybinder.org/v2/gh/kmader/quantitative-big-imaging-2019/master?filepath=Lectures/01-Introduction.ipynb) [Lecture Handout](http://nbviewer.jupyter.org/github/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/01-Introduction.ipynb) - [Lecture Video](https://www.youtube.com/watch?v=_3UCWECqIHY&list=PLTWuXgjdOrnmXVVQG5DRkVeOIGOcTmCIw&index=3&t=0s) - + #### Exercises - [Getting Started with KNIME](Exercises/01-Description.md) @@ -91,9 +92,9 @@ For communicating, discussions, asking questions, and everything, we will be try - [Slides (static)](http://nbviewer.jupyter.org/format/slides/github/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/04-BasicSegmentation.ipynb) [![slides](https://img.shields.io/badge/interactive-slides-green.svg)](http://mybinder.org/v2/gh/kmader/quantitative-big-imaging-2019/master?filepath=Lectures/04-BasicSegmentation.ipynb) [Lecture Handout](http://nbviewer.jupyter.org/github/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/04-BasicSegmentation.ipynb) - Part 2: [Slides (static)](http://nbviewer.jupyter.org/format/slides/github/kmader/Quantitative-Big-Imaging-2018/blob/master/Lectures/04-BasicSegmentation_Part2.ipynb) [![slides](https://img.shields.io/badge/interactive-slides-green.svg)](http://mybinder.org/v2/gh/kmader/quantitative-big-imaging-2019/master?filepath=Lectures/04-BasicSegmentation_Part2.ipynb) [Lecture Handout](http://nbviewer.jupyter.org/github/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/04-BasicSegmentation_Part2.ipynb) - + - [Lecture Video](https://www.youtube.com/watch?v=LFwHVO5zDzY&index=5&list=PLTWuXgjdOrnmXVVQG5DRkVeOIGOcTmCIw) - + #### Exercises - [Overview](Exercises/04-Overview.md) @@ -101,9 +102,9 @@ For communicating, discussions, asking questions, and everything, we will be try ### 21th March - Advanced Segmentation - Part 1: [Slides (static)](http://nbviewer.jupyter.org/format/slides/github/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/05-AdvancedSegmentation.ipynb) [![slides](https://img.shields.io/badge/interactive-slides-green.svg)](http://mybinder.org/v2/gh/kmader/quantitative-big-imaging-2019/master?filepath=Lectures/05-AdvancedSegmentation.ipynb) [Lecture Handout](http://nbviewer.jupyter.org/github/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/05-AdvancedSegmentation.ipynb) - -- Part 2: [Slides (static)](http://nbviewer.jupyter.org/format/slides/github/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/05-SupervisedSegmentation.ipynb) [![slides](https://img.shields.io/badge/interactive-slides-green.svg)](http://mybinder.org/v2/gh/kmader/quantitative-big-imaging-2019/master?filepath=Lectures/05-SupervisedSegmentation.ipynb) [Lecture Handout](http://nbviewer.jupyter.org/github/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/05-SupervisedSegmentation.ipynb) - + +- Part 2: [Slides (static)](http://nbviewer.jupyter.org/format/slides/github/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/05-SupervisedSegmentation.ipynb) [![slides](https://img.shields.io/badge/interactive-slides-green.svg)](http://mybinder.org/v2/gh/kmader/quantitative-big-imaging-2019/master?filepath=Lectures/05-SupervisedSegmentation.ipynb) [Lecture Handout](http://nbviewer.jupyter.org/github/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/05-SupervisedSegmentation.ipynb) + - [Lecture Video](https://www.youtube.com/watch?v=wIEstgKwEro&list=PLTWuXgjdOrnmXVVQG5DRkVeOIGOcTmCIw&index=8&t=0s) #### Exercises @@ -136,9 +137,9 @@ For communicating, discussions, asking questions, and everything, we will be try ### 11th April - Dynamic Experiments - [Slides (static)](http://nbviewer.jupyter.org/format/slides/github/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/08-DynamicExperiments.ipynb) [![slides](https://img.shields.io/badge/interactive-slides-green.svg)](http://mybinder.org/v2/gh/kmader/quantitative-big-imaging-2019/master?filepath=Lectures/08-DynamicExperiments.ipynb) [Lecture Handout](http://nbviewer.jupyter.org/github/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/08-DynamicExperiments.ipynb) - + - [Feature Points Slides](http://nbviewer.jupyter.org/format/slides/github/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/08-FeaturePoints.ipynb) - + - [Video](https://www.youtube.com/watch?v=RPHtLaUA1_I&list=PLTWuXgjdOrnmXVVQG5DRkVeOIGOcTmCIw&index=15&t=0s) #### Exercises @@ -155,7 +156,7 @@ For communicating, discussions, asking questions, and everything, we will be try ### 18th April - Statistics, Prediction, and Reproducibility - [Slides (static)](http://nbviewer.jupyter.org/format/slides/github/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/09-Statistics.ipynb) [![slides](https://img.shields.io/badge/interactive-slides-green.svg)](http://mybinder.org/v2/gh/kmader/quantitative-big-imaging-2019/master?filepath=Lectures/09-Statistics.ipynb) [Lecture Handout](http://nbviewer.jupyter.org/github/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/09-Statistics.ipynb) - + - [Video](https://www.youtube.com/watch?v=ky7tfHkkVd0&list=PLTWuXgjdOrnmXVVQG5DRkVeOIGOcTmCIw&index=17) @@ -165,11 +166,11 @@ For communicating, discussions, asking questions, and everything, we will be try - C. Elegans Dataset on Kaggle [R Notebook](https://www.kaggle.com/kmader/d/kmader/high-content-screening-celegans/qbi-statistics-and-reproducibility-in-r/) or [Python Notebook](https://www.kaggle.com/kmader/d/kmader/high-content-screening-celegans/image-overview) - Lung Segmentation [https://www.kaggle.com/kmader/dsb-lung-segmentation-algorithm/notebook](Rule-based Image Processing) and [Simple Neural Network](https://www.kaggle.com/kmader/simple-nn-with-keras) - + ### 2nd May - Scaling Up / Big Data - [Slides (static)](http://nbviewer.jupyter.org/format/slides/github/kmader/Quantitative-Big-Imaging-2018/blob/master/Lectures/11-ScalingUp.ipynb) [![slides](https://img.shields.io/badge/interactive-slides-green.svg)](http://mybinder.org/v2/gh/kmader/quantitative-big-imaging-2018/master?filepath=Lectures/11-ScalingUp.ipynb) [Lecture Handout](http://nbviewer.jupyter.org/github/kmader/Quantitative-Big-Imaging-2018/blob/master/Lectures/11-ScalingUp.ipynb) - + - [Lecture Video](https://www.youtube.com/watch?v=1cSkd2O9bYE&list=PLTWuXgjdOrnmXVVQG5DRkVeOIGOcTmCIw&index=20) #### Exercises @@ -184,7 +185,7 @@ For communicating, discussions, asking questions, and everything, we will be try ### 9th May - Guest Lecture - High Content Screening (M. Prummer) - [High Content Screening Slides](https://github.com/kmader/Quantitative-Big-Imaging-2019/blob/master/Lectures/11-HCSBigData.pdf) - Michael Prummer / Nexus / Roche - + #### Exercises - [High Content Screening with C. Elegans](https://www.kaggle.com/kmader/high-content-screening-celegans) @@ -320,4 +321,3 @@ Javier Montoya / Computer Vision / ScopeM Presented by Aurelien Lucchi in [Data Analytics Lab](http://www.da.inf.ethz.ch) in D-INFK at ETHZ - [Slides](https://rawgithub.com/kmader/Quantitative-Big-Imaging-2016/master/Lectures/12-DeepLearning.pdf) - diff --git a/binder/environment.yml b/binder/environment.yml index fd6491a..d66cef8 100755 --- a/binder/environment.yml +++ b/binder/environment.yml @@ -35,6 +35,7 @@ dependencies: - graphviz - python-graphviz - tornado + - pip - pip: - keras==2.2.5 - fsspec>=0.3.3