Skip to content

Commit

Permalink
Merge pull request #88 from hsf-training/fix_dataload_uproot5
Browse files Browse the repository at this point in the history
Fix tutorials and transfer a few more to notebooks
  • Loading branch information
jonas-eschle authored Feb 10, 2025
2 parents c4accf6 + 2503a54 commit fb9c33a
Show file tree
Hide file tree
Showing 77 changed files with 8,027 additions and 3,248 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ _book/
node_modules/
*.pyc
*.swp

book.pdf
analysis-essentials.pdf
shell/files/data-shell.zip
build
.ipynb_checkpoints
*~
*~
/.idea

21 changes: 12 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ repos:
rev: v5.0.0
hooks:
- id: check-added-large-files
args: ['--maxkb=1000']
args: [ '--maxkb=1000' ]
- id: check-merge-conflict
- id: check-case-conflict
- id: check-symlinks
Expand All @@ -21,16 +21,19 @@ repos:

- id: nbqa-pyupgrade
additional_dependencies: [ pyupgrade ]
args: [ --py38-plus ]
#
# - repo: https://github.com/ambv/black
# rev: 21.9b0
# hooks:
# - id: black
# args: [ --line-length=120 ]
#
args: [ --py39-plus ]

- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
args: [ --extra-keys=metadata.language_info.codemirror_mode.version metadata.kernelspec metadata.language_info.pygments_lexer metadata.language_info.version ]


# needs rust, only activate if needed
# - repo: https://github.com/shssoichiro/oxipng
# rev: v9.1.3
# hooks:
# - id: oxipng
# args: [ "--", "--best", "--strip", "all", "--quiet" ]

14 changes: 3 additions & 11 deletions advanced-python/10Basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@
"metadata": {},
"outputs": [],
"source": [
"{'a': 'b'}.get?"
"get?"
]
},
{
Expand Down Expand Up @@ -506,22 +506,14 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
"name": "ipython"
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"nbconvert_exporter": "python"
},
"nbsphinx": {
"execute": "auto"
Expand Down
16 changes: 6 additions & 10 deletions advanced-python/11AdvancedPython.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@
"outputs": [],
"source": [
"# SOLUTION\n",
"\n",
"\n",
"@contextlib.contextmanager\n",
"def func(x):\n",
" yield x\n",
Expand Down Expand Up @@ -479,6 +481,8 @@
"outputs": [],
"source": [
"# SOLUTION\n",
"\n",
"\n",
"def timed_func(func):\n",
" def wrapped_func(*args, **kwargs):\n",
" print(args)\n",
Expand Down Expand Up @@ -965,22 +969,14 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
"name": "ipython"
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"nbconvert_exporter": "python"
}
},
"nbformat": 4,
Expand Down
12 changes: 2 additions & 10 deletions advanced-python/12AdvancedClasses.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -503,22 +503,14 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
"name": "ipython"
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"nbconvert_exporter": "python"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit fb9c33a

Please sign in to comment.