Commit cc415292 authored by Daisy Wizda's avatar Daisy Wizda
Browse files

template commit

parents
File added
# ${COURSE TITLE}
![Powered by Jupyter Logo](https://cdn.oreillystatic.com/images/icons/powered_by_jupyter.png)
This project contains the Jupyter Notebooks and supporting files for _${COURSE TITLE}_ with ${INSTRUCTOR}.
These notebooks can be run on the O'Reilly Learning Platform [here](https://learning.oreilly.com/jupyter-notebooks/~/${NOTEBOOK_FPID}).
It contains both the exercises (/notebooks), possibly the solutions (/solutions), as well as any data or files needed (/data). If you are familiar with docker, there is also a dockerfile included for your convenience.
This is a public repository so there is no need to create an account to download its contents. To download the source code from this page, click the 'Cloud' icon on the top right hand, above where the latest commit is detailed.
To download via git from your preferred terminal application, type:
```git clone https://resources.oreilly.com/binderhub/${END OF URL}```
#!/bin/bash
CONTEXT_IDENTIFIER='666333TESTNTBK6633'
NOTEBOOK_FPID='666333TESTNTBK6633'
# timestamp to invalidate JupyterHub server cache
TIMESTAMP=`date +'%s'`
# add CodeMirror config
mkdir -p ~/.jupyter/nbconfig
echo '{"CodeCell":{"cm_config":{"lineNumbers":true,"theme":"oreillybat"}}}' \
> ~/.jupyter/nbconfig/notebook.json
# configure custom templates
mkdir -p ~/.jupyter/templates
echo "c.NotebookApp.extra_template_paths = ['~/.jupyter/templates']" \
> ~/.jupyter/jupyter_notebook_config.py
cat << EOF > ~/.jupyter/templates/page.html
{% extends "templates/page.html" %}
{% block stylesheet %}
{# stylesheets and any js that needs to load before everything else #}
<link rel="stylesheet" href="https://new-content.binderhub-prod.gcp.oreilly.com/extra_static/custom.css" type="text/css"/>
<script>
window.notebookIdentifier = '$NOTEBOOK_FPID';
window.contextIdentifier = '$CONTEXT_IDENTIFIER';
</script>
<script src="https://new-content.binderhub-prod.gcp.oreilly.com/extra_static/oreilly-notebooks-usage-meter.min.js?t=$TIMESTAMP"></script>
<script src="https://new-content.binderhub-prod.gcp.oreilly.com/extra_static/notebook-custom-vendor.js?t=$TIMESTAMP"></script>
<script src="https://new-content.binderhub-prod.gcp.oreilly.com/extra_static/notebook-custom-head.js?t=$TIMESTAMP"></script>
{{super()}}
{% endblock %}
{% block script %}
{{super()}}
{# js that should load after dom is ready #}
<script src="https://new-content.binderhub-prod.gcp.oreilly.com/extra_static/notebook-custom-body.js?t=$TIMESTAMP"></script>
{% endblock %}
EOF
BINDER_DIR=`dirname "${0}"`
rm "${0}"
if [ -f "${BINDER_DIR}/postBuild.original" ]
then
mv "${BINDER_DIR}/postBuild.original" "${BINDER_DIR}/postBuild"
fi
# vim: ft=sh
\ No newline at end of file
## Please list additional packages with version numbers
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment