This file contains hidden or 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
# Command line options parser | |
parser = ArgumentParser(description='TFile adding script') | |
add_arg = parser.add_argument | |
subparsers = parser.add_subparsers(dest='fileType', help='Specify files to sum, e.g. "ana", "fr", "mm"') | |
# ana files | |
ana_parser = subparsers.add_parser('ana', help='sum AnaHists files') | |
add_ana_arg = ana_parser.add_argument | |
add_ana_arg('-r', '--regions', nargs='*', default=[]) |
This file contains hidden or 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 datetime | |
from coolpeople import serhan | |
today = datetime.date.today() | |
if today == datetime.date(2014, 4, 30): | |
print 'HAPPY BIRTHDAY!' | |
serhan.age += 1 | |
serhan.ponder_inevitable_demise() |
This file contains hidden or 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 | |
# Set up ROOT and RootCore | |
import ROOT | |
ROOT.gROOT.Macro('$ROOTCOREDIR/scripts/load_packages.C') | |
# Initialize the xAOD infrastructure | |
ROOT.xAOD.Init() | |
# Set up the input files (PDSF) |
This file contains hidden or 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 | |
from ROOT import gROOT | |
gROOT.SetBatch() | |
from ROOT import gSystem | |
gSystem.Load('libPATInterfaces.so') | |
from ROOT import CP | |
from ROOT.CP import SystematicVariation | |
# Get the equality operator |
This file contains hidden or 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
// ///////////////////////////////////////////////////////////////////////////////////////// | |
// Initialise Overlap Removal Tool | |
if (m_orTool.empty()) { | |
std::string suffix = ""; | |
if (m_doTauOR) suffix += "Tau"; | |
if (m_doPhotonOR) suffix += "Gamma"; | |
std::string bJetLabel = ""; | |
if (m_doBjetOR) { | |
suffix += "Bjet"; | |
bJetLabel = "bjet_loose"; |
This file contains hidden or 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
from __future__ import print_function | |
import h5py | |
input_file = '/project/projectdirs/atlas/sfarrell/atlas_dl/hdf5/prod002_2016_11_10/GG_RPV10_1400_850.h5' | |
with h5py.File(input_file, 'r') as hf: | |
keys = hf.keys() | |
print('Loading %d events' % len(keys)) | |
print('Contents of the first event:') | |
event = hf.get(keys[0]) | |
print(event.keys()) |
This file contains hidden or 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
# Make a conda env | |
conda create -y --prefix $INSTALL_DIR python=3.6 | |
conda activate $INSTALL_DIR | |
conda install -y numpy pyyaml mkl mkl-include setuptools cmake cffi typing | |
conda install -y -c mingfeima mkldnn | |
# Configure the build using Cray compiler wrappers cc, CC | |
export CMAKE_PREFIX_PATH="$(dirname $(which conda))/../" | |
export CXX=CC | |
export CC=cc |
This file contains hidden or 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
conda activate $INSTALL_DIR | |
# Set compile flags | |
export CRAYPE_LINK_TYPE=dynamic | |
export CC=CC | |
export CXX=CC | |
export CFLAGS="-g" | |
export CXXFLAGS="-g" | |
export HOROVOD_MPICXX_SHOW="$PWD/showMPI.sh" | |
export HOROVOD_WITHOUT_TENSORFLOW=1 |
This file contains hidden or 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
Solving environment: ...working... done | |
## Package Plan ## | |
environment location: /global/cscratch1/sd/sfarrell/conda/pytorch-horovod/v0.4.0 | |
added / updated specs: | |
- python=3.6 | |
This file contains hidden or 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
+ cd /global/cscratch1/sd/sfarrell/pytorch-build/pytorch-horovod/v0.4.0 | |
+ git clone -b v0.13.11 [email protected]:uber/horovod.git | |
Cloning into 'horovod'... | |
Note: checking out '641a1dea212d81d15e28b07e1e4484b46150a53f'. | |
You are in 'detached HEAD' state. You can look around, make experimental | |
changes and commit them, and you can discard any commits you make in this | |
state without impacting any branches by performing another checkout. | |
If you want to create a new branch to retain commits you create, you may |
OlderNewer