Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mark Chiew
pytreat-practicals-2020
Commits
0732c073
Commit
0732c073
authored
Feb 10, 2018
by
Paul McCarthy
🚵
Browse files
Tweak readme and add advanced/readme
parent
5740668f
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
0732c073
...
...
@@ -2,6 +2,62 @@
This repository contains Jupyter notebooks and data for the 2018 WIN PyTreat.
It contains two sets of practicals:
-
The
`getting_started`
directory contains a series of practicals intended
for those of you who are new to the Python programming language, or need
a refresher.
-
The
`advanced_topics`
directory contains a series of practicals on various
aspects of the Python programming language - these are intended for those
of you who are familiar with the basics of Python, and want to learn more
about the language.
These practicals have been written under the assumption that FSL 5.0.10 is
installed.
## For attendees
To run these notebooks in the
`fslpython`
environment, you must first install
jupyter:
```
# If your FSL installation requires administrative privileges to modify, then
# you MUST run these commands as root - don't just prefix each individual
# command with sudo, or you will probably install jupyter into the wrong
# location!
#
# One further complication - once you have become root, $FSLDIR may not be set,
# so either set it as we have ione below, or make sure that it is set, before
# proceeding.
sudo su
export FSLDIR=/usr/local/fsl
source $FSLDIR/fslpython/bin/activate fslpython
conda install jupyter
source deactivate
ln -s $FSLDIR/fslpython/envs/fslpython/bin/jupyter $FSLDIR/bin/fsljupyter
```
Then, clone this repository on your local machine, and run
`fsljupyter notebook`
:
```
git clone git@git.fmrib.ox.ac.uk:fsl/pytreat-2018-practicals.git
cd pytreat-2018-practicals
fsljupyter notebook
```
Have fun!
## For contributors
The upstream repository can be found at:
...
...
@@ -39,44 +95,27 @@ To contribute to the practicals:
repository.
To run these notebooks in the
`fslpython`
environment, you must first install
jupyter:
When you install
`jupyter`
above, you may also wish to install
[
`notedown`
](
https://github.com/aaren/notedown
)
:
```
# If your FSL installation requires administrative privileges to modify, then
# you MUST run these commands as root - don't just prefix each individual
# command with sudo, or you will probably install jupyter into the wrong
# location!
#
# One further complication - once you have become root, $FSLDIR may not be set,
# so either set it as we have ione below, or make sure that it is set, before
# proceeding.
sudo su
export FSLDIR=/usr/local/fsl
source $FSLDIR/fslpython/bin/activate fslpython
# .
# see instructions above
# .
conda install jupyter
pip install notedown
source deactivate
ln -s $FSLDIR/fslpython/envs/fslpython/bin/jupyter $FSLDIR/bin/fsljupyter
ln -s $FSLDIR/fslpython/envs/fslpython/bin/jupyter
$FSLDIR/bin/fsljupyter
ln -s $FSLDIR/fslpython/envs/fslpython/bin/notedown $FSLDIR/bin/fslnotedown
```
`notedown`
is a handy tool which allows you to convert a markdown (
`.md`
) file
to a Jupyter notebook (
`.ipynb`
) file. So you can write your practical in your
text editor of choice, and then convert it into a notebook, instead of writing
the practical in the web browser interface. If you install notedown as
suggested in the code block above, you can run it on a markdown file like so:
> [`notedown`](https://github.com/aaren/notedown) is a handy tool which allows
> you to convert a markdown (`.md`) file to a Jupyter notebook (`.ipynb`)
> file. So you can write your practical in your text editor of choice, and
> then convert it into a notebook, instead of writing the practical in the web
> browser interface. If you install notedown as suggested in the code block
> above, you can run it on a markdown file like so:
>
> ```
> fslnotedown my_markdown_file.md > my_notebook.ipynb
> ```
Now you can start the notebook server from the repository root:
```
fsl
jupyter
notebook
fsl
notedown my_markdown_file.md > my_
notebook
.ipynb
```
advanced_topics/README.md
0 → 100644
View file @
0732c073
Advanced Python
===============
This directory contains a collection of practicals, each of which covers a
particular feature of the Python Programming language. They are intended for
people who are familiar with the basics of Python, and want to learn about
some of the more advanced features of the language.
Practicals on the following topics are available:
*
Function inputs and outputs
*
Modules and packages
*
Object-oriented programming
*
Operator overloading
*
Decorators
*
Context managers
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment