Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
# python imports | |
import os | |
import cherrypy | |
class Server(object): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
universe = vanilla | |
executable = job.sh | |
log = /dev/null | |
should_transfer_files = YES | |
transfer_input_files = job.sh | |
when_to_transfer_output = ON_EXIT | |
output = out.txt | |
error = err.txt | |
notification = Never | |
initialdir = /afs/cern.ch/user/m/mrieger/htctest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
""" | |
Setup via | |
> pip install torch torchvision | |
""" | |
from __future__ import annotations | |
from contextlib import contextmanager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import law | |
class LongRunning(law.Task): | |
def output(self): | |
return law.LocalFileTarget("$PWD/data/long_running.json") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
from __future__ import annotations | |
import os | |
from fnmatch import fnmatch | |
from multiprocessing import Pool as ProcessPool | |
from typing import Any | |
from tqdm import tqdm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# coding: utf-8 | |
""" | |
Script that merges the events tree of two NanoAOD files, removing duplicates identified | |
by event number, run number and luminosity block. | |
> nano_unique.py in1.root in2.root out.root | |
NOTE: This is just a first draft whose performance could surely be improved |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import dask_awkward as dak | |
import awkward as ak | |
# located at https://cernbox.cern.ch/remote.php/dav/public-files/rvipIIozKQAypwu/calib.parquet | |
input_path = "calib.parquet" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
""" | |
Lightweight Python implementation of the Run 2 MET phi (type II) correction, following | |
https://lathomas.web.cern.ch/lathomas/METStuff/XYCorrections/XYMETCorrection_withUL17andUL18andUL16.h, | |
taken from https://twiki.cern.ch/twiki/bin/view/CMS/MissingETRun2Corrections?rev=72. | |
Downloadable source at https://mrieger.web.cern.ch/snippets/met_phi_correction.py, | |
gist at https://gist.github.com/riga/951076bcde6ea7cb4da2bf7c7417379a. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INC = -I${TF_INSTALL_PATH}/include | |
LIB = -L${TF_INSTALL_PATH}/xla_aot_runtime_src | |
LIBS = -lpthread -ltf_xla_runtime | |
CXXFLAGS = -D_GLIBCXX_USE_CXX11_ABI=0 | |
.phony: all clean | |
all: test_model | |
test_model: test_model.cc my_model.o |
NewerOlder