<commit_before>FROM alpine
MAINTAINER <EMAIL>

# TODO: combine steps
RUN \
  apk update && apk upgrade && \
  apk add --no-cache --virtual=build-dependencies gcc python3 python3-dev && \
  apk add --no-cache --virtual=ca-certificates glibc-dev musl-dev linux-headers g++ wget && \
  apk add --no-cache musl-dev linux-headers g++ && \
  wget "https://bootstrap.pypa.io/get-pip.py" -O /dev/stdout | python3 && \
  pip3 install --no-cache-dir notebook ipywidgets && \
  apk add --no-cache --virtual=curl

# RUN  apk del build-dependencies gcc ca-certificates g++ python3-dev   linux-headers g++ glibc-dev

RUN \
  # Notebook - TOC
  mkdir -p $(ipython locate)/profile_default/static/custom && \
  touch $(ipython locate)/profile_default/static/custom/custom.js && \
  touch $(ipython locate)/profile_default/static/custom/custom.css && \
  curl -L https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/toc.js > $(ipython locate)/nbextensions/toc.js && \
  curl -L https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/toc.css > $(ipython locate)/nbextensions/toc.css && \
  echo '$([IPython.events]).on("app_initialized.NotebookApp", function () { IPython.load_extensions("toc"); });' >> $(ipython locate)/profile_default/static/custom/custom.js && \
  echo 'require(["components/codemirror/addon/display/rulers"]); var clsname = "ipynb_ruler"; var rulers = [{column: 79, className: clsname},               {column: 99, className: clsname}]; IPython.Cell.options_default.cm_config.rulers = rulers;' >> $(ipython locate)/profile_default/static/custom/custom.js

RUN \
  # Notebook - Notify
  curl -L https://raw.github.com/sjpfenninger/ipython-extensions/master/nbextensions/notify.js > $(ipython locate)/nbextensions/notify.js && \
  echo '$([IPython.events]).on("app_initialized.NotebookApp", function () { IPython.load_extensions('notify'); });' >> $(ipython locate)/profile_default/static/custom/custom.js

RUN \
  ipython install-nbextension https://raw.githubusercontent.com/ipython-contrib/IPython-notebook-extensions/master/nbextensions/usability/dragdrop/main.js

ADD examples /notebook

RUN apk add --no-cache --virtual=git

RUN \
  git clone https://github.com/ipython/ipython.git /examples && \
  mv /examples/examples /notebook/examples && \<commit_msg>added live_reveal extension as it seems not to work prepackaged with notebook<commit_after>FROM alpine
MAINTAINER <EMAIL>

# TODO: combine steps
RUN \
  apk update && apk upgrade && \
  apk add --no-cache --virtual=build-dependencies gcc python3 python3-dev && \
  apk add --no-cache --virtual=ca-certificates glibc-dev musl-dev linux-headers g++ wget && \
  apk add --no-cache musl-dev linux-headers g++ && \
  wget "https://bootstrap.pypa.io/get-pip.py" -O /dev/stdout | python3 && \
  pip3 install --no-cache-dir notebook ipywidgets && \
  apk add --no-cache --virtual=curl

# RUN  apk del build-dependencies gcc ca-certificates g++ python3-dev   linux-headers g++ glibc-dev

RUN \
  # Notebook - TOC
  mkdir -p $(ipython locate)/profile_default/static/custom && \
  touch $(ipython locate)/profile_default/static/custom/custom.js && \
  touch $(ipython locate)/profile_default/static/custom/custom.css && \
  curl -L https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/toc.js > $(ipython locate)/nbextensions/toc.js && \
  curl -L https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/toc.css > $(ipython locate)/nbextensions/toc.css && \
  echo '$([IPython.events]).on("app_initialized.NotebookApp", function () { IPython.load_extensions("toc"); });' >> $(ipython locate)/profile_default/static/custom/custom.js && \
  echo 'require(["components/codemirror/addon/display/rulers"]); var clsname = "ipynb_ruler"; var rulers = [{column: 79, className: clsname},               {column: 99, className: clsname}]; IPython.Cell.options_default.cm_config.rulers = rulers;' >> $(ipython locate)/profile_default/static/custom/custom.js

RUN \
  # Notebook - Notify
  curl -L https://raw.github.com/sjpfenninger/ipython-extensions/master/nbextensions/notify.js > $(ipython locate)/nbextensions/notify.js && \
  echo '$([IPython.events]).on("app_initialized.NotebookApp", function () { IPython.load_extensions('notify'); });' >> $(ipython locate)/profile_default/static/custom/custom.js

RUN \
  apk add --no-cache git && \
  mkdir -p ~/.jupyter && ipython profile create default && \
  git clone https://github.com/damianavila/RISE.git && \
  cd RISE && python3 setup.py install && cd .. && rm -rf RISE

RUN \
  ipython install-nbextension https://raw.githubusercontent.com/ipython-contrib/IPython-notebook-extensions/master/nbextensions/usability/dragdrop/main.js

ADD examples /notebook

RUN apk add --no-cache --virtual=git

RUN \
  git clone https://github.com/ipython/ipython.git /examples && \
  mv /examples/examples /notebook/examples && \
{'fraction_non_alphanumeric': 0.15523985999588225, 'fraction_numerical': 0.003911879761169446, 'mean_word_length': 3.96220633299285, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 13, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3887537', 'n_tokens_mistral': 1719, 'n_tokens_neox': 1648, 'n_words': 317}