|
1 | | -## Aimed at: |
2 | | -Anyone interested in using Python for Biomodelling. The material in |
3 | | -this workshop will help you get the most out of the other workshops |
4 | | -run during the week. |
| 1 | +# CCPBioSim Basic Python Workshop |
5 | 2 |
|
6 | | -## Requirements: |
7 | | -Basic knowledge of Python e.g. as in [https://chryswoods.com/beginning_python](https://chryswoods.com/beginning_python) |
| 3 | +[](https://github.com/ccpbiosim/python-workshop/actions/workflows/build.yaml) |
8 | 4 |
|
9 | | -## Abstract: |
10 | | -This workshop will introduce more intermediate features of Python that |
11 | | -are useful for biomolecular modellers. This will include the use of |
12 | | -Jupyter notebooks, how to write Python functions and classes, and |
13 | | -how to properly structure, document and test code. The second |
14 | | -part will introduce you to data analysis tools such as Pandas, |
15 | | -NumPy and MatplotLib. |
| 5 | +## Docker |
16 | 6 |
|
17 | | -## Training Material |
| 7 | +This container is derived from the CCPBioSim JupyterHub image. This container |
| 8 | +adds the necessary software packages and notebook content to form a deployable |
| 9 | +course container. The source content for this course can be found at |
| 10 | +https://github.com/CCPBioSim/python-and-data-workshop |
18 | 11 |
|
19 | | -The workshop consists of a series of Jupyter notebooks. These are available |
20 | | -below, and can be run using the |
21 | | -<a href="https://notebook.biosimspace.org" target="_blank">workshop Jupyter server</a>. |
| 12 | +## How to Use |
22 | 13 |
|
23 | | -Once you have started the server, navigate to the `python_and_data` directory |
24 | | -and you will find all workshop material there. |
| 14 | +In our containers we are using the JupyterHub default port 8888, so you should |
| 15 | +forward this port when deploying locally:: |
25 | 16 |
|
26 | | -The workshops are numbered sequentially from `01_jupyter_howto.ipynb` to |
27 | | -`17_regular_expressions.ipynb`. They cover a variety of useful Python topics, |
28 | | -and are *mostly* independent. Feel free to go through them in the order you |
29 | | -prefer, and to skip topics that you feel you are already comfortable with. |
30 | | - |
31 | | -There are exercises in many of the topics. You can find answers in the |
32 | | -equivalent notebook in the `answers` directory. |
33 | | - |
34 | | -Below is a summary of each topic, together with links to view html versions |
35 | | -of the notebooks the their answers, and to download the notebooks. |
36 | | - |
37 | | -## Contents |
38 | | - |
39 | | -### [01_jupyter_howto.ipynb](html/01_jupyter_howto.html) ([answers](html/answers/01_jupyter_howto.html)) |
40 | | - |
41 | | -Introduction to Jupyter notebooks, including how to use the interface, |
42 | | -how to view molecules, draw graphs, download files, and start a bash |
43 | | -terminal. |
44 | | - |
45 | | -[download](01_jupyter_howto.ipynb) | [download answers](answers/01_jupyter_howto.ipynb) |
46 | | - |
47 | | -### [02_lists.ipynb](html/02_lists.html) ([answers](html/answers/02_lists.html)) |
48 | | - |
49 | | -Learn how to use Python Lists |
50 | | - |
51 | | -[download](02_lists.ipynb) | [download answers](answers/02_lists.ipynb) |
52 | | - |
53 | | -### [03_dictionaries.ipynb](html/03_dictionaries.html) ([answers](html/answers/03_dictionaries.html)) |
54 | | - |
55 | | -Learn how to use Python dictionaries |
56 | | - |
57 | | -[download](03_dictionaries.ipynb) | [download answers](answers/03_dictionaries.ipynb) |
58 | | - |
59 | | -### [04_functions.ipynb](html/04_functions.html) ([answers](html/answers/04_functions.html)) |
60 | | - |
61 | | -Learn how to write a function in Python |
62 | | - |
63 | | -[download](04_functions.ipynb) | [download answers](answers/04_functions.ipynb) |
64 | | - |
65 | | -### [05_objects.ipynb](html/05_objects.html) ([answers](html/answers/05_objects.html)) |
66 | | - |
67 | | -Learn about objects and object orientated programming |
68 | | - |
69 | | -[download](05_objects.ipynb) | [download answers](answers/05_objects.ipynb) |
70 | | - |
71 | | -### [06_classes.ipynb](html/06_classes.html) ([answers](html/answers/06_classes.html)) |
72 | | - |
73 | | -Learn how to write your own Python classes |
74 | | - |
75 | | -[download](06_classes.ipynb) | [download answers](answers/06_classes.ipynb) |
76 | | - |
77 | | -### [07_documentation.ipynb](html/07_documentation.html) ([answers](html/answers/07_documentation.html)) |
78 | | - |
79 | | -Learn how to add documentation to your code |
80 | | - |
81 | | -[download](07_documentation.ipynb) | [download answers](answers/07_documentation.ipynb) |
82 | | - |
83 | | -### [08_class_documentation.ipynb](html/08_class_documentation.html) ([answers](html/answers/08_class_documentation.html)) |
84 | | - |
85 | | -Learn how to document Python classes, and protect hidden (private) functions |
86 | | -and data from view. |
87 | | - |
88 | | -[download](08_class_documentation.ipynb) | [download answers](answers/08_class_documentation.ipynb) |
89 | | - |
90 | | -### [09_exceptions.ipynb](html/09_exceptions.html) ([answers](html/answers/09_exceptions.html)) |
91 | | - |
92 | | -Learn about exceptions, and how they can be used to signify errors. |
93 | | - |
94 | | -[download](09_exceptions.ipynb) | [download answers](answers/09_exceptions.ipynb) |
95 | | - |
96 | | -### [10_error_handling.ipynb](html/10_error_handling.html) ([answers](html/answers/10_error_handling.html)) |
97 | | - |
98 | | -Learn how to handle errors by catching exceptions |
99 | | - |
100 | | -[download](10_error_handling.ipynb) | [download answers](answers/10_error_handling.ipynb) |
101 | | - |
102 | | -### [11_modules.ipynb](html/11_modules.html) ([answers](html/answers/11_modules.html)) |
103 | | - |
104 | | -Learn how to package and share your code as a module |
105 | | - |
106 | | -[download](11_modules.ipynb) | [download answers](answers/11_modules.ipynb) |
107 | | - |
108 | | -### [12_pandas.ipynb](html/12_pandas.html) ([answers](html/answers/12_pandas.html)) |
109 | | - |
110 | | -Learn how to use the pandas library for data analysis |
111 | | - |
112 | | -[download](12_pandas.ipynb) | [download answers](answers/12_pandas.ipynb) |
113 | | - |
114 | | -### [13_basic_numpy.ipynb](html/13_basic_numpy.html) ([answers](html/answers/13_basic_numpy.html)) |
115 | | - |
116 | | -Learn how to use the NumPy library for numeric calculation |
117 | | - |
118 | | -[download](13_basic_numpy.ipynb) | [download answers](answers/13_basic_numpy.ipynb) |
119 | | - |
120 | | -### [14_more_numpy.ipynb](html/14_more_numpy.html) ([answers](html/answers/14_more_numpy.html)) |
121 | | - |
122 | | -Learn more about how to use NumPy, including understanding copies and views |
123 | | - |
124 | | -[download](14_more_numpy.ipynb) | [download answers](answers/14_more_numpy.ipynb) |
125 | | - |
126 | | -### [15_matplotlib.ipynb](html/15_matplotlib.html) ([answers](html/answers/15_matplotlib.html)) |
127 | | - |
128 | | -Learn how to use the pandas with the MatPlotLib library to draw graphs |
129 | | - |
130 | | -[download](15_matplotlib.ipynb) | [download answers](answers/15_matplotlib.ipynb) |
131 | | - |
132 | | -### [16_viewing_molecules.ipynb](html/16_viewing_molecules.html) ([answers](html/answers/16_viewing_molecules.html)) |
133 | | - |
134 | | -Learn how to use the nglview and BioSimSpace libraries to create 3D |
135 | | -views of molecules. |
136 | | - |
137 | | -[download](16_viewing_molecules.ipynb) | [download answers](answers/16_viewing_molecules.ipynb) |
138 | | - |
139 | | -### [17_regular_expressions.ipynb](html/17_regular_expressions.html) ([answers](html/answers/17_regular_expressions.html)) |
140 | | - |
141 | | -Learn how to understand and write regular expressions for text/pattern matching. |
142 | | - |
143 | | -[download](17_regular_expressions.ipynb) | [download answers](answers/17_regular_expressions.ipynb) |
| 17 | + docker run -p 8888:8888 ghcr.io/jimboid/biosim-python-workshop:latest |
0 commit comments