Skip to content

Commit

Permalink
Updates for 2021/22
Browse files Browse the repository at this point in the history
  • Loading branch information
Zbigniew-Kaleta committed Mar 10, 2022
1 parent 0e98078 commit 962cf66
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 55 deletions.
52 changes: 35 additions & 17 deletions Lab1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@
"4. c.d.\n",
"5. c.d.\n",
"6. Prezentacja \"gotowego\" systemu\n",
"7. Oddanie projektu, podsumowanie\n",
"\n",
"tydzień A (poniedziałek): 1 III, 15 III , 29 III, 19 IV, 17 V, 31 V, 14 VI\n",
"\n",
"tydzień B (poniedziałek): 8 III, 22 III, 12 IV, 26 IV, 10 V, 24 V, 7 VI"
"7. Oddanie projektu, podsumowanie"
]
},
{
Expand Down Expand Up @@ -80,9 +76,15 @@
}
},
"source": [
"## Git\n",
"## Tematy projektów\n",
"### Inspiracje:\n",
"https://docs.google.com/document/d/1iJwsxy6FwbkXB-x7WZSXyKtHUsh_3kMYGwd5qUfkzTM/edit\n",
"\n",
"https://try.github.io/"
"### Inne tematy:\n",
"- gry\n",
"- aplikacje webowe (Django/Flask)\n",
"- aplikacje narzędziowe\n",
"- biblioteki"
]
},
{
Expand All @@ -93,15 +95,13 @@
}
},
"source": [
"## Tematy projektów\n",
"### Inspiracje:\n",
"https://docs.google.com/document/d/1iJwsxy6FwbkXB-x7WZSXyKtHUsh_3kMYGwd5qUfkzTM/edit\n",
"## Git\n",
"\n",
"### Inne tematy:\n",
"- gry\n",
"- aplikacje webowe (Django/Flask)\n",
"- aplikacje narzędziowe\n",
"- biblioteki"
"https://try.github.io/\n",
"\n",
"https://www.youtube.com/watch?v=USjZcfj8yxE\n",
"\n",
".gitignore"
]
},
{
Expand Down Expand Up @@ -357,12 +357,30 @@
"\n",
"f()"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Błędy w programie"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Slajd celowo pozostawiony pusty"
]
}
],
"metadata": {
"celltoolbar": "Slideshow",
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -376,7 +394,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
"version": "3.9.5"
}
},
"nbformat": 4,
Expand Down
123 changes: 85 additions & 38 deletions Lecture1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,12 @@
" * mgr inż. Zbigniew Kaleta, [email protected]\n",
" * dr inż. Marek Gajęcki, [email protected]\n",
" \n",
"* Konsultacje: https://wiki.ki.agh.edu.pl/pages/viewpage.action?pageId=9502795\n",
"\n",
"* Współautorzy materiałów: \n",
" * dr inż. Krzysztof Dorosz, [@krzysztofdorosz](https://twitter.com/krzysztofdorosz)\n",
" * dr inż. Michał Korzycki, [@michalkorzycki](https://twitter.com/michalkorzycki)\n",
" * dr Leszek Grzanka, [@leszekgrzanka](https://twitter.com/leszekgrzanka)\n",
"* Slajdy udostępnione w formacie Jupyter Notebook na githubie https://github.com/agh-glk/python-lecture\n",
"* Na pewno nie unikniemy gdzieś błędu w materiałach wykładu, dlatego gorąco zachęcamy do zgłaszania poprawek na githubie (fork + pull request)\n",
"* Wykłady: 2 III, 9 III, 16 III, 23 III, 30 III, 13 IV, 1 VI \n",
"* Laboratoria na przemian"
"* Slajdy udostępnione w formacie Jupyter Notebook na githubie https://github.com/agh-glk/python-lecture (warto zainstalować rozszerzenie RISE)\n",
"* Na pewno nie unikniemy gdzieś błędu w materiałach wykładu, dlatego gorąco zachęcamy do zgłaszania poprawek na githubie (fork + pull request)"
]
},
{
Expand All @@ -65,11 +61,35 @@
"\n",
"### Terminy oddania projektu:\n",
"* podstawowy: ostatnie zajęcia własnej grupy w semestrze\n",
"* poprawkowy: koniec letniej sesji egzaminacyjnej (15 września)\n",
"* poprawkowy: koniec letniej sesji egzaminacyjnej (16 września)\n",
"\n",
"### Terminy kolokwiów:\n",
"* podstawowy: 1 VI\n",
"* poprawkowy: 15 czerwca **albo** 7 września o 14:00 (albo = xor)"
"* podstawowy: 6. laboratorium\n",
"* poprawkowy: 24 VI **ALBO** 9 IX (albo = xor)"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"Wykład co 2. tygodnie."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"source": [
"A co na laboratoriach?\n",
"\n",
"https://forms.gle/FzR25vXgqUJ3EDah6"
]
},
{
Expand Down Expand Up @@ -103,19 +123,16 @@
}
},
"source": [
"### Zalety:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Zalety:\n",
"\n",
" * zwięzły\n",
" * czytelny (duża ekspresja)\n",
" * bardzo dużo zasobów: frameworków, bibliotek, tutoriali\n",
" * bardzo popularny (3.~4. miejsce w rankingu TIOBE index, wg. GitHuba poniżej)\n",
" ![popularność języków wg. GitHuba](https://cdn-images-1.medium.com/max/800/0*wyH0Qr8K1HIePqhR)\n",
"za https://hackernoon.com/top-3-most-popular-programming-languages-in-2018-and-their-annual-salaries-51b4a7354e06"
" * bardzo popularny\n",
"\n",
"https://madnight.github.io/githut/#/\n",
"\n",
"https://www.tiobe.com/tiobe-index/"
]
},
{
Expand All @@ -126,13 +143,8 @@
}
},
"source": [
"### Wady:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Wady:\n",
"\n",
"* prędkość\n",
"* Global Interpreter Lock\n",
"* niekompatybilne linie 2.x i 3.x"
Expand Down Expand Up @@ -210,7 +222,7 @@
" * tylko Unicode\n",
" * nowy operator dzielenia /\n",
" * nowa składnia raise/except\n",
"* Na wykładzie korzystamy z linii 3.8.x"
"* Na wykładzie korzystamy z linii 3.9.x"
]
},
{
Expand Down Expand Up @@ -461,6 +473,43 @@
"wartosc1 if warunek else wartosc2"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"## MATCH-CASE\n",
"\n",
"dostępny od wersji 3.10\n",
"\n",
"https://towardsdatascience.com/the-match-case-in-python-3-10-is-not-that-simple-f65b350bb025"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"outputs": [],
"source": [
"def http_status(status):\n",
" match status:\n",
" case 400:\n",
" return \"Bad request\"\n",
" case 401 | 403:\n",
" return \"Authentication error\"\n",
" case 404:\n",
" return \"Not found\"\n",
" case _:\n",
" return \"Other error\""
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down Expand Up @@ -1076,9 +1125,7 @@
"metadata": {},
"outputs": [],
"source": [
"a = \"1\"\n",
"a = a + 3\n",
"a"
"\"1\" + 3"
]
},
{
Expand All @@ -1087,9 +1134,7 @@
"metadata": {},
"outputs": [],
"source": [
"a = \"1\"\n",
"a = a + str(3)\n",
"a"
"\"1\" + str(3)"
]
},
{
Expand All @@ -1098,9 +1143,7 @@
"metadata": {},
"outputs": [],
"source": [
"a = \"1\"\n",
"a = int(a) + 3\n",
"a"
"int(\"1\") + 3"
]
},
{
Expand Down Expand Up @@ -1277,7 +1320,7 @@
"- typ: `int`\n",
"- zakres: nieograniczony\n",
"- operatory: `+`, `-`, `*`, `/`, `//`, `%`, `**`, `&`, `|`, `^`, `~`, `<<`, `>>`\n",
"- sposoby zapisu: 100, 0b100, 0o100, 0x100"
"- sposoby zapisu: 100, 0b100, 0o100, 0x100, 1_000_000"
]
},
{
Expand Down Expand Up @@ -1704,7 +1747,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"def foo():\n",
Expand Down Expand Up @@ -2083,6 +2128,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true,
"slideshow": {
"slide_type": "subslide"
}
Expand Down Expand Up @@ -2334,6 +2380,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true,
"slideshow": {
"slide_type": "fragment"
}
Expand Down

0 comments on commit 962cf66

Please sign in to comment.