Skip to content

Commit

Permalink
Merge branch 'master' into goi42-ktmux
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-eschle committed Nov 9, 2023
2 parents 5e530f8 + 277d642 commit 0f4f81f
Show file tree
Hide file tree
Showing 16 changed files with 1,803 additions and 363 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
args: ['--maxkb=1000']
Expand Down
164 changes: 140 additions & 24 deletions advanced-python/10Basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:55.162938280Z",
"start_time": "2023-11-09T18:21:54.591214759Z"
}
},
"outputs": [],
"source": [
"a = ['a', 'b', 'c']\n",
Expand All @@ -66,7 +71,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:55.164206324Z",
"start_time": "2023-11-09T18:21:54.591634409Z"
}
},
"outputs": [],
"source": [
"a = {'a': '0', 'b': '1', 'c': '2'}\n",
Expand All @@ -80,7 +90,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:55.165379338Z",
"start_time": "2023-11-09T18:21:54.592201956Z"
}
},
"outputs": [],
"source": [
"a = 'foo'\n",
Expand All @@ -102,7 +117,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:55.174086165Z",
"start_time": "2023-11-09T18:21:54.592801793Z"
}
},
"outputs": [],
"source": [
"N = 10\n",
Expand All @@ -123,7 +143,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:55.174961405Z",
"start_time": "2023-11-09T18:21:54.639862013Z"
}
},
"outputs": [],
"source": [
"squares = {i: i**2 for i in range(10)}\n",
Expand All @@ -133,7 +158,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:55.177083872Z",
"start_time": "2023-11-09T18:21:54.640208754Z"
}
},
"outputs": [],
"source": [
"N = 5\n",
Expand Down Expand Up @@ -202,7 +232,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:55.178900927Z",
"start_time": "2023-11-09T18:21:54.640684978Z"
}
},
"outputs": [],
"source": [
"pt_cut = 1789.234567890987654\n",
Expand Down Expand Up @@ -232,7 +267,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:55.179761160Z",
"start_time": "2023-11-09T18:21:54.683193413Z"
}
},
"outputs": [],
"source": [
"\"Hello starterkitters\""
Expand All @@ -241,7 +281,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:55.180074403Z",
"start_time": "2023-11-09T18:21:54.683507163Z"
}
},
"outputs": [],
"source": [
"None"
Expand All @@ -257,7 +302,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:55.708097724Z",
"start_time": "2023-11-09T18:21:54.683700759Z"
}
},
"outputs": [],
"source": [
"!ls"
Expand All @@ -266,7 +316,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:57.188240198Z",
"start_time": "2023-11-09T18:21:55.712286379Z"
}
},
"outputs": [],
"source": [
"!wget https://example.com/index.html"
Expand All @@ -282,7 +337,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:57.209109687Z",
"start_time": "2023-11-09T18:21:57.194328587Z"
}
},
"outputs": [],
"source": [
"%time sum([i**2 for i in range(10000)])"
Expand All @@ -298,7 +358,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:57.268821159Z",
"start_time": "2023-11-09T18:21:57.208320012Z"
}
},
"outputs": [],
"source": [
"%%time\n",
Expand Down Expand Up @@ -337,7 +402,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:57.269768775Z",
"start_time": "2023-11-09T18:21:57.263045210Z"
}
},
"outputs": [],
"source": [
"def my_print(my_string):\n",
Expand All @@ -347,7 +417,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:58.320620623Z",
"start_time": "2023-11-09T18:21:57.263292639Z"
}
},
"outputs": [],
"source": [
"my_print?"
Expand All @@ -363,7 +438,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:58.324026004Z",
"start_time": "2023-11-09T18:21:57.541042260Z"
}
},
"outputs": [],
"source": [
"my_print??"
Expand All @@ -372,7 +452,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:58.357805971Z",
"start_time": "2023-11-09T18:21:57.552034854Z"
}
},
"outputs": [],
"source": [
"range?"
Expand All @@ -388,7 +473,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:58.396066090Z",
"start_time": "2023-11-09T18:21:57.647040419Z"
}
},
"outputs": [],
"source": [
"{'a': 'b'}.get?"
Expand All @@ -397,7 +487,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:58.398964659Z",
"start_time": "2023-11-09T18:21:57.695017046Z"
}
},
"outputs": [],
"source": [
"{'a': 'b'}.get"
Expand All @@ -406,7 +501,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:58.401053224Z",
"start_time": "2023-11-09T18:21:57.695273312Z"
}
},
"outputs": [],
"source": [
"junk = {'a': 'b'}.get\n",
Expand All @@ -432,7 +532,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-09T18:21:58.404008533Z",
"start_time": "2023-11-09T18:21:57.695446136Z"
}
},
"outputs": [],
"source": [
"max(10, 15)"
Expand All @@ -444,7 +549,11 @@
"metadata": {
"tags": [
"raises-exception"
]
],
"ExecuteTime": {
"end_time": "2023-11-09T18:21:59.040701073Z",
"start_time": "2023-11-09T18:21:57.695622001Z"
}
},
"outputs": [],
"source": [
Expand All @@ -463,7 +572,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"ExecuteTime": {
"start_time": "2023-11-09T18:21:58.564441476Z"
}
},
"outputs": [],
"source": [
"import numpy as np\n",
Expand Down Expand Up @@ -497,7 +610,10 @@
"metadata": {
"tags": [
"raises-exception"
]
],
"ExecuteTime": {
"start_time": "2023-11-09T18:21:58.606952947Z"
}
},
"outputs": [],
"source": [
Expand Down
Loading

0 comments on commit 0f4f81f

Please sign in to comment.