Skip to content

Instantly share code, notes, and snippets.

View kratsg's full-sized avatar

Giordon Stark kratsg

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import pyhf
import numpy as np
spec = {
"channels": [
{
"name": "ch",
"samples": [
{
"data": [100.0,100.0],
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from collections import defaultdict
import json
import pathlib
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pyhf
from pyhf.contrib.utils import download
Summary
------------------
channels 50
samples 3
parameters 174
modifiers 174
channels nbins
---------- -----
CRVV_MLL_hghmet_cuts 1
def make_dummy_event():
coords=[]
for i_eta in range(0,4):
coords.append([])
for i_phi in range(0,4):
coords[i_eta].append((i_eta,i_phi,0))
return coords
@kratsg
kratsg / .bashrc
Last active December 14, 2021 20:25
Instructions for migrating from cuda10.x/cudnn8.0.x to cuda11.2/cudnn8.2
# CUDA
export CUDA_VERSION="11.2"
export CUDA_HOME="/usr/local/cuda-${CUDA_VERSION}"
export LD_LIBRARY_PATH="/usr/local/cuda-${CUDA_VERSION}/include:/usr/local/cuda-${CUDA_VERSION}/lib64:$LD_LIBRARY_PATH"
export PATH="/usr/local/cuda-${CUDA_VERSION}/bin:$PATH"
export XLA_FLAGS=--xla_gpu_cuda_data_dir=${CUDA_HOME}
{"channels": [{"name": "channel_16", "samples": [{"name": "signal_16", "data": [1.849763110111948, 24.26908544490349, 46.60821935768439, 21.782658172059865, 13.184121362366241, 1.177164316285278, 36.50494855566237, 66.33316709338501, 44.689030631541975, 14.83557074675295, 9.730289028555408, 5.763029776175476, 1.9133947084432548, 25.92362450719514, 16.210703011457493, 13.624598257176098, 5.317980396467731, 7.074523065479319, 4.923709821136957, 6.976264223435254, 3.9887994154533195, 3.770084093834412, 2.004375117663123, 1.6574225351718939, 1.2340554709418696, 3.6152946429007358, 3.5560372406476146, 1.9386264780136828], "modifiers": [{"name": "mu", "type": "normfactor", "data": null}, {"name": "lumi", "type": "lumi", "data": null}, {"name": "weight_btag_FT_EFF_B_systematics__1", "type": "histosys", "data": {"lo_data": [1.6856801608408862, 22.63520093730531, 44.01075078697938, 20.710848965108756, 12.537157732408732, 1.1108430596350354, 34.108877107415196, 62.55480570948989, 42.36303167063709, 14.125343254303726,
{
"channels": [
{
"name": "CR_Gtt_1L_M2_cuts",
"samples": [
{
"data": [
785.9898681640625
],
"modifiers": [
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from chromedriver_py import binary_path
service = Service(binary_path)
url = 'https://twiki.cern.ch/twiki/bin/view/AtlasPublic'
with webdriver.Chrome(service=service) as driver:
driver.get(url)
driver.execute_script("addKeyword('Analysischaracteristics_Likelihood@available');")