Commit d7c55612 authored by Manuel Guth's avatar Manuel Guth

Slides intro

parent d0a63469
......@@ -5,14 +5,23 @@ RUN \
apt-get -qq -y update && \
apt-get -qq -y upgrade && \
apt-get install -y jq git tree hdf5-tools bash-completion && \
apt-get install -y ffmpeg && \
apt-get clean && \
rm -rf /var/lib/apt-get/lists/* && \
true
# add repository to the image
# python installs
COPY requirements.txt .
RUN \
pip3 install --upgrade pip && \
pip3 install -r requirements.txt
RUN useradd -m grk
COPY . /home/grk
RUN chown -R grk:grk /home/grk
USER grk
WORKDIR /home/grk
CMD /bin/bash
# GRK Python Workshop
## Installation
The easiest way to run the code for the workshop is using a docker image via
```
docker run -it -p 8881:8881 gitlab-registry.cern.ch/fsauerbu/grk-python-workshop/base-python:latest bash
```
if you want to make the current folder accessible within the image you need to mount it via `-v $(pwd):<path-to-folder>`
To run a Jupyter Notebook within the Docker image, use the following command:
```
jupyter notebook --ip 0.0.0.0 --no-browser --port 8881
```
!TODO Add singularity command
cities = set(["London", "Paris", "Bern"]) # Unordered collection
def get_new_cities():
new_cities = []
new_cities.append("Oslo")
new_cities.append("Praque")
return set(new_cities)
cities.union(get_new_cities())
print(cities) # Does not include Oslo, Praque!
"""
Short script to test if the environment is correctly set up for the GRK Python
Workshop (14.10.-16.10.2019 in Freiburg).
"""
# Checking if the Python version is at least 3.7
import sys
python_version = sys.version_info
print("Your current python version is %i.%i.%i" % (python_version.major,
python_version.minor,
python_version.micro))
if python_version.major != 3:
print("You don't have Python 3 installed.\n\
Please install python 3.7 or higher.")
elif python_version.minor < 7:
print("You don't have the correct python 3 version installed.\n\
Please install python 3.7 or higher.")
import matplotlib
print("- matplotlib is available with version", matplotlib.__version__)
import pandas
print("- pandas is available with version", pandas.__version__)
import numpy
print("- numpy is available with version", numpy.__version__)
import scipy
print("- scipy is available with version", scipy.__version__)
import seaborn
print("- seaborn is available with version", seaborn.__version__)
import jupyter
print("- jupyter is available with version", jupyter.__version__)
import jupyterlab
print("- jupyterlab is available with version", jupyterlab.__version__)
import h5py
print("- h5py is available with version", h5py.__version__)
import mpld3
print("- mpld3 is available with version", mpld3.__version__)
import papermill
print("- papermill is available with version", papermill.__version__)
import pydot
print("- pydot is available with version", pydot.__version__)
import PIL
print("- pillow is available with version", PIL.__version__)
print("- matplotlib is available with version", matplotlib.__version__)
import ipywidgets
print("- ipywidgets is available with version", ipywidgets.__version__)
import tables
print("- tables is available with version", tables.__version__)
import tqdm
print("- tqdm is available with version", tqdm.__version__)
import pytest
print("- pytest is available with version", pytest.__version__)
import virtualenv
print("- virtualenv is available with version", virtualenv.__version__)
print("\nAll requirements are fullfilled.")
This diff is collapsed.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Welcome and Technical Setup \n",
"\n",
"### GRK Python Workshop, 14.10.2019\n",
"\n",
"### Frank Sauerburger, Manuel Guth"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Welcome to the GRK Python Workshop\n",
"<img style=\"float: right; width: 30%\" src=\"Registration-chart.png\" />\n",
"\n",
"* 45 registrations \n",
"\n",
"\n",
"* All lectures and tutorials will take place in HS1 (highrise)\n",
"* We always start at 10 s.t. (to not collide with FP)\n",
"* Lunch breaks from 12h30 to 14h00\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Timetable for the 3 Days Workshop\n",
"<img style=\"float: centre; width: 100%\" src=\"Timetable-Workshop.png\" />"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Speakers\n",
"\n",
"\n",
"<div style=\"display: flex\">\n",
" <div style=\"padding: 1em;flex: 1;\">\n",
" <img style=\"width: 10em; height: auto; margin: 0px auto;\" src=\"thiemann.jpg\" />\n",
" <b>Prof. Dr. Thiemann<br/>Uni Freiburg</b><br />\n",
" <ul>\n",
" <li>Testing</li>\n",
" <li>Continous Integration</li>\n",
" <li>Git(Hub)</li>\n",
" </ul>\n",
" </div>\n",
" <div style=\"padding: 1em;flex: 1;\">\n",
" <img style=\"width: 10em; height: auto; margin: 0px auto;\" src=\"max.jpeg\" />\n",
" <b>Maximilian Nöthe<br/>TU Dordmund</b><br />\n",
" <ul>\n",
" <li>Scientific Programming</li>\n",
" <li>Numpy</li>\n",
" <li>Matplotlib</li>\n",
" <li>Scipy</li>\n",
" </ul>\n",
" </div>\n",
" <div style=\"padding: 1em;flex: 1;\">\n",
" <img style=\"width: 10em; height: auto; margin: 0px auto;\" src=\"lukas.jpeg\" />\n",
" <b>Lukas Heinrich<br/>CERN</b><br />\n",
" <ul>\n",
" <li>Symbolic programming</li>\n",
" <li>Autodifferentiation</li>\n",
" <li>Cython/Numba</li>\n",
" <li>MPI</li>\n",
" </ul>\n",
" </div>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Social event\n",
"\n",
"<img src=\"goldener_sternen.png\" style=\"float: right; width: 10em; margin: 2em\" />\n",
"\n",
" - Common dinner\n",
" - Tuesday, 15. Oct, 18:45\n",
" - Goldender Sternen, Emmendinger Str. 1\n",
" - Need headcount for reserveration"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"print(int(sys.version[2])>=7)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"sys.version_info"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"celltoolbar": "Slideshow",
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="65mm"
height="33mm"
viewBox="0 0 65 33"
version="1.1"
id="svg5567"
inkscape:version="0.92.4 (unknown)"
sodipodi:docname="oop.svg">
<defs
id="defs5561" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.8343933"
inkscape:cx="157.8979"
inkscape:cy="51.602569"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1855"
inkscape:window-height="1056"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1" />
<metadata
id="metadata5564">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-264)">
<rect
style="opacity:1;fill:#0079ff;fill-opacity:1;stroke:none;stroke-width:0.26499999;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect10044"
width="64.970215"
height="32.69836"
x="-0.012000469"
y="264.66373" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:125%;font-family:Paprika;-inkscape-font-specification:Paprika;letter-spacing:-0.02910417px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="2.3986168"
y="269.86713"
id="text10048"><tspan
sodipodi:role="line"
id="tspan10046"
x="2.3986168"
y="269.86713"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:arial;-inkscape-font-specification:arial;fill:#ffffff;stroke-width:0.26458332px">Particle</tspan></text>
<path
style="fill:#ffffff;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.26458332px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 2.4600839,271.21614 H 62.785638"
id="path10054"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;line-height:125%;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:-0.02910417px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="3.1509991"
y="280.67465"
id="text10142"><tspan
sodipodi:role="line"
id="tspan10140"
x="3.1509991"
y="280.67465"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;fill:#ffffff;stroke-width:0.26458332px">- mass</tspan><tspan
sodipodi:role="line"
x="3.1509991"
y="284.20242"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;fill:#ffffff;stroke-width:0.26458332px"
id="tspan10146">- charge</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:125%;font-family:'CMU Sans Serif';-inkscape-font-specification:'CMU Sans Serif';letter-spacing:-0.02910417px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="29.337128"
y="276.43359"
id="text10152"><tspan
sodipodi:role="line"
id="tspan10150"
x="29.337128"
y="276.43359"
style="fill:#ffffff;stroke-width:0.26458332px">Actions/Methods</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52777767px;line-height:125%;font-family:'CMU Sans Serif';-inkscape-font-specification:'CMU Sans Serif';letter-spacing:-0.02910417px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="32.542629"
y="281.2211"
id="text10156"><tspan
sodipodi:role="line"
id="tspan10154"
x="32.542629"
y="281.2211"
style="fill:#ffffff;stroke-width:0.26458332px">- anti()</tspan><tspan
sodipodi:role="line"
x="32.542629"
y="285.63083"
style="fill:#e6e6e6;stroke-width:0.26458332px"
id="tspan10160" /></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.46944451px;line-height:125%;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:-0.02910417px;word-spacing:0px;fill:#cccccc;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="33.60421"
y="284.50052"
id="text10169"><tspan
sodipodi:role="line"
id="tspan10167"
x="33.60421"
y="284.50052"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;fill:#cccccc;stroke-width:0.26458332px"># returns the anti-</tspan><tspan
sodipodi:role="line"
x="33.60421"
y="287.58731"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;fill:#cccccc;stroke-width:0.26458332px"
id="tspan10171"># particle of itself</tspan></text>
<text
id="text10271"
y="276.43359"
x="2.3496375"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:125%;font-family:'CMU Sans Serif';-inkscape-font-specification:'CMU Sans Serif';letter-spacing:-0.02910417px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="fill:#ffffff;stroke-width:0.26458332px"
y="276.43359"
x="2.3496375"
id="tspan10269"
sodipodi:role="line">Properties</tspan></text>
</g>
</svg>
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