Skip to content

Commit 838a08f

Browse files
authored
Merge pull request #113 from SimonKindhauser/python-workshop
Python workshop
2 parents 406012b + ea9e467 commit 838a08f

16 files changed

Lines changed: 273 additions & 37 deletions

File tree

Makefile

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
1+
DOCKER=docker
2+
FLAGS=
3+
MOUNT_OPTION=
4+
# uncomment the following lines to use podman instead of docker
5+
#DOCKER=podman
6+
#FLAGS=--userns=keep-id
7+
#MOUNT_OPTION=:Z
8+
19
.PHONY: serve build default build-image deploy
210

311
default: buildimage serve
412

513
buildimage:
6-
docker build -t openhsr/www.openhsr.ch docker/
7-
docker run -i -t --rm --name www.openhsr.ch -v $(shell pwd):/src/ -p 4000:4000 openhsr/www.openhsr.ch bundle install --clean
14+
$(DOCKER) build -t openhsr/www.openhsr.ch docker/
15+
$(DOCKER) run -i -t --rm --name www.openhsr.ch -v $(shell pwd):/src/$(MOUNT_OPTION) -p 4000:4000 $(FLAGS) openhsr/www.openhsr.ch bundle install --clean
816

917
build:
10-
docker run -i -t --rm --name www.openhsr.ch -v $(shell pwd):/src/ -p 4000:4000 openhsr/www.openhsr.ch bundle exec jekyll build
18+
$(DOCKER) run -i -t --rm --name www.openhsr.ch -v $(shell pwd):/src/$(MOUNT_OPTION) -p 4000:4000 $(FLAGS) openhsr/www.openhsr.ch bundle exec jekyll build
19+
20+
enter:
21+
$(DOCKER) run -i -t --rm --name www.openhsr.ch -v $(shell pwd):/src/$(MOUNT_OPTION) -p 4000:4000 $(FLAGS) openhsr/www.openhsr.ch bash
1122

1223
serve:
13-
docker run -i -t --rm --name www.openhsr.ch -v $(shell pwd):/src/ -p 4000:4000 openhsr/www.openhsr.ch bundle exec jekyll serve
24+
$(DOCKER) run -i -t --rm --name www.openhsr.ch -v $(shell pwd):/src/$(MOUNT_OPTION) -p 4000:4000 $(FLAGS) openhsr/www.openhsr.ch bundle exec jekyll serve
1425

1526
updatedeps:
16-
docker run -i --rm --name www.openhsr.ch -v $(shell pwd):/src/ -p 4000:4000 openhsr/www.openhsr.ch bundle update
27+
$(DOCKER) run -i --rm --name www.openhsr.ch -v $(shell pwd):/src/$(MOUNT_OPTION) -p 4000:4000 $(FLAGS) openhsr/www.openhsr.ch bundle update

_config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ collections:
3737
output: true
3838
app:
3939
output: true
40+
events:
41+
output: true
4042

4143
defaults:
4244
- scope: # content pages
@@ -62,3 +64,9 @@ defaults:
6264
values:
6365
layout: "app"
6466
permalink: /app/:slug/
67+
- scope: # events
68+
type: events
69+
path: ""
70+
values:
71+
layout: "events"
72+
permalink: /events/:slug/

_events/python.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: Python-Kurse FS2021
3+
teaser_title: Python-Kurse
4+
teaser: Der open\OST organisiert gleich zwei Python-Kurse! Einen für Einsteiger und einen mit Best Practices. Es hat bestimmt für alle was dabei! Wir freuen uns darauf, dich im online-Kurs begrüssen zu dürfen. Melde dich jetzt an!
5+
teaser_image: /assets/events/python/python_teaser.png
6+
---
7+
8+
![flyer](/assets/events/python/python_teaser.png)
9+
10+
## Einführung
11+
Am 2021-04-27 von 19:00 bis 21:00
12+
Mit Raphael Das Gupta
13+
14+
### Zielgruppe
15+
* Programmiereinsteiger
16+
* aufs Programmieren "gwundrige" Studierende und andere interessierte OST-Angehörige
17+
18+
### Themen
19+
* 🧙‍♀️ Einführung in die Kommandozeile
20+
* 🐍 Python-Einführung:
21+
* 🔢 Python als Taschenrechner
22+
* ✍ Texte, 🗒 Listen und 📑 "Dictionaries"
23+
* ⚖ Bedingungen und 👩‍🏭 Fuktionen
24+
25+
## Best Practices
26+
Am 2021-04-29 von 19:00 bis 21:00
27+
Mit Florian Bruhin
28+
29+
### Zielgruppe
30+
* Python bereits genutzt
31+
* Erfahrung in mind. einer Programmiersprache
32+
* Studiengang Informatik, Elektrotechnik, Maschinenbau, ...
33+
34+
### Themen
35+
- Python-Versionen (Spoiler: Python 2 ist tot)
36+
- JupyterLab und Entwicklungsumgebungen (PyCharm, VS Code)
37+
- Code Style basics
38+
- Datenstrukturen
39+
- Virtualenvs
40+
- Iteration (Loop Like a Native)
41+
- Type-Annotationen
42+
- Automatisches Testen mit pytest
43+
- Häufige Fehler/Probleme
44+
45+
## Anmeldung
46+
Bitte meldet euch doch bei simon<punkt>kindhauser<at>ost<dot>ch, wenn ihr Teilnehmen wollt. Wir freuen uns auf dich!

_includes/header.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@
3737
{% endfor %}
3838
</ul>
3939
{% endif %}
40+
{% if my_page.title == "Events" %}
41+
<ul>
42+
<li><a{% if my_page.url == page.url %} class="active"{% endif %} href="/events/">Übersicht</a></li>
43+
{% for event_page in site.events %}
44+
<li><a{% if event_page.url == page.url %} class="active"{% endif %} href="{{ event_page.url }}">{{ event_page.title }}</a></li>
45+
{% endfor %}
46+
</ul>
47+
{% endif %}
4048
</li>
4149
{% endif %}
4250
{% endfor %}

_includes/nav_events.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<section>
2+
<h1>Events</h1>
3+
<ul>
4+
{% for event_page in site.events %}
5+
<li><a href="{{ event_page.url }}">{{ event_page.title }}</a></li>
6+
{% endfor %}
7+
</ul>
8+
</section>

_layouts/app.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ <h1>{{ page.title }}</h1>
2222
{% include nav_app.html %}
2323

2424
{% include nav_hsr.html %}
25+
26+
{% include nav_events.html%}
2527
</div>
2628

2729
</aside>

_layouts/events.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
layout: default
3+
---
4+
{% include header.html %}
5+
6+
<section id="content">
7+
<main role="main" class="wiki-content">
8+
<section>
9+
<h1>{{ page.title }}</h1>
10+
<article>
11+
{{ content }}
12+
</article>
13+
14+
</section>
15+
</main>
16+
17+
<aside id="sidebar">
18+
19+
{% include nav_toc.html %}
20+
21+
<div class="cross-references">
22+
{% include nav_app.html %}
23+
24+
{% include nav_hsr.html %}
25+
26+
{% include nav_events.html%}
27+
</div>
28+
29+
</aside>
30+
</section>
31+
32+
{% include footer.html %}

_layouts/hsr.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ <h1>{{ page.title }}</h1>
2222
{% include nav_app.html %}
2323

2424
{% include nav_hsr.html %}
25+
26+
{% include nav_events.html%}
2527
</div>
2628

2729
</aside>

_layouts/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
<section id="front">
1111
<h1>{{ page.title }}</h1>
1212
<p>Wir fördern die <strong>Open Source Community</strong> und unterstützen dich bei der Benutzung deines <strong>alternativen Betriebssystems</strong> an der HSR.</p>
13+
14+
{{ content }}
15+
1316
<div>
1417
<article>
1518
<i class="fa fa-rocket"></i>
1.98 MB
Loading

0 commit comments

Comments
 (0)