Skip to content

Commit fb9c33a

Browse files
authored
Merge pull request #88 from hsf-training/fix_dataload_uproot5
Fix tutorials and transfer a few more to notebooks
2 parents c4accf6 + 2503a54 commit fb9c33a

File tree

77 files changed

+8027
-3248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+8027
-3248
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ _book/
33
node_modules/
44
*.pyc
55
*.swp
6+
67
book.pdf
78
analysis-essentials.pdf
89
shell/files/data-shell.zip
910
build
1011
.ipynb_checkpoints
11-
*~
12+
*~
13+
/.idea
14+

.pre-commit-config.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ repos:
33
rev: v5.0.0
44
hooks:
55
- id: check-added-large-files
6-
args: ['--maxkb=1000']
6+
args: [ '--maxkb=1000' ]
77
- id: check-merge-conflict
88
- id: check-case-conflict
99
- id: check-symlinks
@@ -21,16 +21,19 @@ repos:
2121

2222
- id: nbqa-pyupgrade
2323
additional_dependencies: [ pyupgrade ]
24-
args: [ --py38-plus ]
25-
#
26-
# - repo: https://github.com/ambv/black
27-
# rev: 21.9b0
28-
# hooks:
29-
# - id: black
30-
# args: [ --line-length=120 ]
31-
#
24+
args: [ --py39-plus ]
25+
3226
- repo: https://github.com/kynan/nbstripout
3327
rev: 0.8.1
3428
hooks:
3529
- id: nbstripout
30+
args: [ --extra-keys=metadata.language_info.codemirror_mode.version metadata.kernelspec metadata.language_info.pygments_lexer metadata.language_info.version ]
31+
32+
33+
# needs rust, only activate if needed
34+
# - repo: https://github.com/shssoichiro/oxipng
35+
# rev: v9.1.3
36+
# hooks:
37+
# - id: oxipng
38+
# args: [ "--", "--best", "--strip", "all", "--quiet" ]
3639

advanced-python/10Basics.ipynb

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@
391391
"metadata": {},
392392
"outputs": [],
393393
"source": [
394-
"{'a': 'b'}.get?"
394+
"get?"
395395
]
396396
},
397397
{
@@ -506,22 +506,14 @@
506506
}
507507
],
508508
"metadata": {
509-
"kernelspec": {
510-
"display_name": "Python 3 (ipykernel)",
511-
"language": "python",
512-
"name": "python3"
513-
},
514509
"language_info": {
515510
"codemirror_mode": {
516-
"name": "ipython",
517-
"version": 3
511+
"name": "ipython"
518512
},
519513
"file_extension": ".py",
520514
"mimetype": "text/x-python",
521515
"name": "python",
522-
"nbconvert_exporter": "python",
523-
"pygments_lexer": "ipython3",
524-
"version": "3.9.7"
516+
"nbconvert_exporter": "python"
525517
},
526518
"nbsphinx": {
527519
"execute": "auto"

advanced-python/11AdvancedPython.ipynb

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@
295295
"outputs": [],
296296
"source": [
297297
"# SOLUTION\n",
298+
"\n",
299+
"\n",
298300
"@contextlib.contextmanager\n",
299301
"def func(x):\n",
300302
" yield x\n",
@@ -479,6 +481,8 @@
479481
"outputs": [],
480482
"source": [
481483
"# SOLUTION\n",
484+
"\n",
485+
"\n",
482486
"def timed_func(func):\n",
483487
" def wrapped_func(*args, **kwargs):\n",
484488
" print(args)\n",
@@ -965,22 +969,14 @@
965969
}
966970
],
967971
"metadata": {
968-
"kernelspec": {
969-
"display_name": "Python 3 (ipykernel)",
970-
"language": "python",
971-
"name": "python3"
972-
},
973972
"language_info": {
974973
"codemirror_mode": {
975-
"name": "ipython",
976-
"version": 3
974+
"name": "ipython"
977975
},
978976
"file_extension": ".py",
979977
"mimetype": "text/x-python",
980978
"name": "python",
981-
"nbconvert_exporter": "python",
982-
"pygments_lexer": "ipython3",
983-
"version": "3.9.7"
979+
"nbconvert_exporter": "python"
984980
}
985981
},
986982
"nbformat": 4,

advanced-python/12AdvancedClasses.ipynb

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -503,22 +503,14 @@
503503
}
504504
],
505505
"metadata": {
506-
"kernelspec": {
507-
"display_name": "Python 3 (ipykernel)",
508-
"language": "python",
509-
"name": "python3"
510-
},
511506
"language_info": {
512507
"codemirror_mode": {
513-
"name": "ipython",
514-
"version": 3
508+
"name": "ipython"
515509
},
516510
"file_extension": ".py",
517511
"mimetype": "text/x-python",
518512
"name": "python",
519-
"nbconvert_exporter": "python",
520-
"pygments_lexer": "ipython3",
521-
"version": "3.9.7"
513+
"nbconvert_exporter": "python"
522514
}
523515
},
524516
"nbformat": 4,

0 commit comments

Comments
 (0)