Skip to content

Instantly share code, notes, and snippets.

View jpivarski's full-sized avatar

Jim Pivarski jpivarski

  • Princeton, IRIS-HEP, PyHEP, Scikit-HEP
View GitHub Profile
@jpivarski
jpivarski / python-skills-survey-list.ipynb
Created April 23, 2024 02:00
python-skills-survey-list
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jpivarski
jpivarski / extra-stuff-2.ipynb
Last active April 3, 2024 02:17
Plan for SciPy Teen Track
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jpivarski
jpivarski / computer-breaking-probability.ipynb
Last active November 16, 2023 17:28
Computer breaking probability
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jpivarski
jpivarski / static-analysis.py
Last active November 15, 2023 21:37
Analysis of repos that use Numba
# see https://gist.github.com/jpivarski/001867b9da51a47b93913a0b9809db3a
import concurrent.futures
import time
import glob
import tarfile
import json
import ast
import re
import gzip
@jpivarski
jpivarski / static-analysis.py
Last active November 11, 2023 11:02
Static analysis of GitHub repos
# see https://gist.github.com/jpivarski/001867b9da51a47b93913a0b9809db3a
import concurrent.futures
import time
import glob
import tarfile
import json
import ast
import re
import gzip
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jpivarski
jpivarski / life-numba.py
Last active February 6, 2023 19:43
For https://youtu.be/lhqP50YVT-I (Game of Life in Python and Numba)
import time
import numpy as np
import numba as nb
# This could also be done without a class, using @nb.jit directly.
# It just seems natural to use a class. (That *might* slow it down a little; haven't tested it.)
spec = [
("width", nb.int32),
("height", nb.int32),

Uproot version 5.0.0

Uproot version 5 has a few major new features, one removal (uproot.lazy), and is based on Awkward Array version 2 instead of version 1.

uproot.lazy → uproot.dask

@kkothari2001 upgraded Uproot from Awkward version 1 to version 2, the major part of which was replacing uproot.lazy, which is based on Awkward 1's virtual and partitioned lazy arrays, with the new Dask collection, dask-awkward. The entry point for this function is uproot.dask.

@kkothari2001 also simplified Uproot's Pandas backend, which used to "explode" ragged arrays from ROOT into Pandas DataFrames with a non-trivial MultiIndex. Now, it takes advantage of awkward-pandas to put ragged (and more complex) Awkward Arrays directly into Pandas columns.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.