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
/* | |
Interface for accessing Numpy's random number generators and configurable | |
bit generators via its C API. Usage example in main.cpp below. | |
Author: Marcel Rieger | |
*/ | |
#include <string> | |
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION |
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 | |
""" | |
Pseudo code for generating deterministic event and jet seeds, | |
to be used in random number generators with consistent output. | |
The seeds use the entire uint64 space and are proven to be | |
uniformly distributed using bijective hashing. | |
It requires a list of the first 200 primes plus some event |
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" |
NewerOlder