We deploy root-owned conda environments which are the basis of the data collection and analysis environments. On one hand because these are owned by root they are write-protected and ensure that users can not accidentally break the environment, on the other hand because they are write-protected they can not be upgraded or extended. While we want to run with a stable, standard, well understood software environment, we do need this
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
// Place your key bindings in this file to override the defaults | |
[ | |
// Toggle between terminal and editor focus | |
{ | |
"key": "ctrl+`", | |
"command": "workbench.action.terminal.focus" | |
}, | |
{ | |
"key": "ctrl+`", | |
"command": "workbench.action.focusActiveEditorGroup", |
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
import json | |
import pyhf | |
from pyhf.contrib.utils import download | |
import cabinetry | |
download("https://www.hepdata.net/record/resource/1935437?view=true", "bottom-squarks") | |
ws = pyhf.Workspace(json.load(open("bottom-squarks/RegionC/BkgOnly.json"))) | |
patchset = pyhf.PatchSet(json.load(open("bottom-squarks/RegionC/patchset.json"))) | |
ws = patchset.apply(ws, "sbottom_600_280_150") | |
cabinetry.workspace.save(ws, "bottom-squarks.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
#!/bin/bash -e | |
# check for CMSSW environment | |
if [ -z "$CMSSW_BASE" ]; then | |
echo '$CMSSW_BASE not set' | |
exit 1 | |
fi | |
# check for python3 in actual CMSSW area | |
if ! (cd $CMSSW_BASE && scram tool info python3 >& /dev/null); then |
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
import numpy as np | |
# create dummy two-dimensional (3x3) data that represents | |
# per-pixel measured quantities taken at various "time steps" | |
# (say, 4 of such steps): | |
pixel_maps = np.asarray([ | |
[ | |
[0, 0, 0], | |
[2, 2, 2], | |
[3, 3, 3], |
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
#!/bin/bash | |
# This is an example showing how to update a value of a specified key | |
# (that is potentially nested) in a JSON file using shell variables | |
# in some shell script. For example, some utility for updatiing in-place | |
# a common set of fields in a JSON configuration file. | |
# In the snippet below, we assume that the input is a key ("register_name") | |
# in some nested JSON object whose path is "RD53B.GlobalConfig". | |
filename=${1} |
- Is UV the FUTURE of Python PACKAGING? 🐍📦, by Hynek Schlawack
- Which Python Package Manager Should You Use?
- How virtual environments work by Brett Cannon
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 | |
import pytest | |
import some_lib | |
@pytest.fixture | |
def not_a_day_over(): | |
return 29 | |
def test_current_age(not_a_day_over): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder