Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 8 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,16 @@
dist: xenial
language: python
python:
# We don't actually use the Travis Python, but this keeps it organized.
- "3.6"

before_install: cd tools
- 3.7

install:
- sudo apt-get update
# We do this conditionally because it saves us some downloading if the
# version is the same.
#- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
# wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
# else
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
# fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a

# Replace dep1 dep2 ... with your dependencies
- conda create -q -n test-environment python=3.6 jupyter
- source activate test-environment

- pip install nbfancy
- pip install --upgrade nbfancy

script:
- make html
- nbfancy configure -y all_magic
- nbfancy render
- nbfancy html

deploy:
provider: pages
Expand All @@ -39,3 +21,4 @@ deploy:
skip-cleanup: true
on:
branch: master
python: 3.7
32 changes: 32 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## Instructional Material

This work is Copyright © Jack Betteridge and contains material derived from sources.
This material is made available under the Creative Commons Attribution license.
The following is a human-readable summary of (and not a substitute for) the full legal text of the CC BY 4.0 license.

You are free:

- to **Share**---copy and redistribute the material in any medium or format
- to **Adapt**---remix, transform, and build upon the material for any purpose, even commercially.

The licensor cannot revoke these freedoms as long as you follow the license terms.

Under the following terms:

- **Attribution** --- You must give appropriate credit (mentioning that your work is derived from work that is Copyright © James Grant), [the material from which it was derived](https://github.com/arc-lessons/intro-data-plotting/blob/master/README.md), and, where practical linking to https://github.com/arc-lessons/intro-python), provide a [link to the license][cc-by-human], and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- **No additional restrictions** --- You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. With the understanding that:

Notices:

You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.
Software

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

[cc-by-human]: https://creativecommons.org/licenses/by/4.0/
[cc-by-legal]: https://creativecommons.org/licenses/by/4.0/legalcode
21 changes: 4 additions & 17 deletions notebooks_plain/00_schedule.ipynb → nbplain/00_schedule.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}
},
"source": [
"## Prerequisites\n",
"## Prerequisites:\n",
"\n",
"In order to complete the lesson you should be familar with the content of the course:\n",
"* Introduction to Python"
Expand All @@ -39,7 +39,7 @@
}
},
"source": [
"## Schedule\n",
"## Schedule:\n",
"Approximate timings for the lesson:\n",
"\n",
"| Time | Episode | Description |\n",
Expand All @@ -66,20 +66,7 @@
"source": [
"## Setup:\n",
"\n",
"Log on to the server for today's course at https://rss.jupyterhub.bath.ac.uk. Data and files for the research software courses is available in the folder `RS50001`. We will need to tale copy the `data-plotting` folder, which will also use for the notebooks we will generate during the lesson. You can do this by creating a new notebook and executing the cell:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [],
"source": [
"!cp -r -n RS50001/data-plotting ."
"Log on to the server for today's course at https://rss.jupyterhub.bath.ac.uk. We will need to make copy the `data-plotting` folder, which will also use for the notebooks we will generate during the lesson. DO this by opening the Welcome.ipynb notebook and following the set up for Data and plotting. Data and files for the research software courses is available in the folder `data-plotting`."
]
}
],
Expand All @@ -100,7 +87,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
"version": "3.8.3"
}
},
"nbformat": 4,
Expand Down
22 changes: 14 additions & 8 deletions notebooks_plain/01_jupyter.ipynb → nbplain/01_jupyter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Overview\n",
"## Overview:\n",
"- **Teaching:** 10 min\n",
"- **Exercises:** 10 min\n",
"\n",
Expand All @@ -36,7 +36,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Info: Trying things out\n",
"## Information: Trying things out\n",
"In this lesson you can have a Python 3 jupyter notebook open to try out any of the commands you see here and reproduce the results."
]
},
Expand Down Expand Up @@ -132,7 +132,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Info: Out of order execution\n",
"## Information: Out of order execution\n",
"The ability to go back and change only small snippets of code is very useful, but also very dangerous form a coding point of view. If you edit a code cell and don't run _all_ the code cells after it, then any cell that isn't re-executed is still using the old code. Jupyter allows you to keep track of this by numbering its input, `In [3]` for instance means this block was executed third.\n",
"\n",
"If you get in a complete mess you can also clear all output, without removing the input and re-execute the code blocks in order."
Expand Down Expand Up @@ -204,7 +204,9 @@
"\n",
"Execute the cells. This should print out `Hello Notebook!`.\n",
"\n",
"Now go back and change the values of `a` and `b` to `Goodbye` and `Everyone`. Re-execute your cells. This should now print out `Goodbye Everyone`."
"Now go back and change the values of `a` and `b` to `Goodbye` and `Everyone`. Re-execute your cells. This should now print out `Goodbye Everyone`.\n",
"\n",
"[Solution]()"
]
},
{
Expand All @@ -221,7 +223,9 @@
"source": [
"## Exercise: Getting help\n",
"\n",
"Use the interactive Python help to get help about the `open` function for reading and writing files."
"Use the interactive Python help to get help about the `open` function for reading and writing files.\n",
"\n",
"[Solution]()"
]
},
{
Expand Down Expand Up @@ -278,7 +282,9 @@
"source": [
"## Exercise: Mastering markdown\n",
"\n",
"Now change the type of the cell in your notebook to markdown. Type in some markdown in the cell and experiment with adding in headings and hyperlinks. Take a look through the [markdown cheat sheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) and see if you can add bullet point lists, images, or code blocks to your cell."
"Now change the type of the cell in your notebook to markdown. Type in some markdown in the cell and experiment with adding in headings and hyperlinks. Take a look through the [markdown cheat sheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) and see if you can add bullet point lists, images, or code blocks to your cell.\n",
"\n",
"[Solution]()"
]
},
{
Expand Down Expand Up @@ -314,7 +320,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Key Points\n",
"## Key Points:\n",
"* Jupyter notebooks allow you to write any Python code into a web interface.\n",
"* Cell contents can be easily modified.\n",
"* You need to be wary of out of order execution.\n",
Expand All @@ -338,7 +344,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.8.3"
}
},
"nbformat": 4,
Expand Down
Loading