Skip to content

Instantly share code, notes, and snippets.

# Apache server configuration for apssotest.
# This sets up a Flask application over SSL with CERN SSO authentication via
# Shibboleth.
# Load the SSL and Shibboleth modules
LoadModule ssl_module modules/mod_ssl.so
LoadModule mod_shib /usr/lib64/shibboleth/mod_shib_22.so
# Disable TRACE HTTP requests on CERN advice
TraceEnable Off
@lukasheinrich
lukasheinrich / gist:bf4baa94a410bfdec093
Created February 3, 2015 20:04
repo spec to install shibboleth from yum. save in /etc/yum.repos.d/shibboleth.repo
[security_shibboleth]
name=Shibboleth (RHEL_6)
type=rpm-md
baseurl=http://download.opensuse.org/repositories/security:/shibboleth/RHEL_6/
gpgcheck=1
gpgkey=http://download.opensuse.org/repositories/security:/shibboleth/RHEL_6/repodata/repomd.xml.key
enabled=1
@lukasheinrich
lukasheinrich / compose.yml
Created March 28, 2016 07:33
recast worker compose tesst
version: '2'
services:
plugin:
image: lukasheinrich/recast-cap-demo
command: bash -c 'cd /workdirsdata && celery worker -A recastbackend.fromenvapp:app -l debug -Q $$RECAST_QUEUE'
environment:
- C_FORCE_ROOT=yes
- CELERY_REDIS_HOST=lheinric-newcc
- CELERY_REDIS_PORT=6379
- CELERY_REDIS_DB=0
#!/bin/sh
hostname=$1
cern-get-certificate --autoenroll --grid
echo "$(date) ::::RECAST:::: done setting up cern keytab/cert"
usermod -aG docker recast
def generate_prodconf_file(optionsAr,argdata,outputfile,eventtype = None):
templ = '''\
from Gaudi.Configuration import importOptions
{options}
{eventtype}
from ProdConf import ProdConf
ProdConf(
{args}
)
'''
import requests
import urllib
import datetime
event = '443176'
sessionid = 175282
date = '2016-07-05'
time = '08:30:00'
sessiondata = requests.get('https://indico.cern.ch/export/event/{}/session/{}.json'.format(event,sessionid)).json()
#!/usr/bin/env python
import ROOT
ROOT.gROOT.SetBatch(True)
import yaml
import click
import os
from xml.etree import ElementTree as etree
def get_path(basedir,relpath):
Reco_tf.py \
--asetup 20.7.5.1.1 \
--AMI r7772 \
--inputHitsFile lukas.HITS.pool.root \
--outputAODFile lukas.AOD.pool.root \
--jobNumber=1 \
--maxEvents=25 \
--inputHighPtMinbiasHitsFile \
'../mc15_13TeV.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2195/*' \
--inputLowPtMinbiasHitsFile \
Sim_tf.py \
--asetup AtlasProduction,19.2.3.5 \
--AMI s2586 \
--inputEVNTFile mc.EJModelB.1400.20.EVNT.pool.root \
--outputHITSFile lukas.hits.pool.root --maxEvents 2
import ROOT
import ROOT.RooStats
import json
import sys
def main():
workspace_file = sys.argv[1]
plotfile = sys.argv[2]
resultsfile = sys.argv[3]