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 numpy as np | |
import matplotlib.pyplot as plt | |
def normfactor(hist, edges): | |
a = np.sum(hist)*(edges[1:] - edges[:-1]) | |
return a | |
def gauss(xs, loc=0.0, scale=1.0): |
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
#!/bin/sh | |
echo 'Provisioning acron VM' | |
# Install what we'll need | |
sudo yum install -y cern-config-users cern-get-keytab arc-server | |
# Make sure we ready for Kerberos-authenticated jobs | |
sudo cern-get-keytab --force |
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
// Asymmetrical Gaussian with exponential tails | |
// parameters: | |
// mean - position at maximum | |
// sigma - sigma of the Gaussian | |
// asym - asymmetry of the Gaussian ( sigmaLeft = sigma * (1 - asym), sigmaRight = sigma * (1 + asym) ) | |
// rhoL - number of sigmas from mean where left tail starts: mean - rhoL * sigmaLeft | |
// rhoR - number of sigmas from mean where right tail starts: mean + rhoR * sigmaRight | |
// | |
// Allowed values of parameters: sigma > 0, -1 < asym < 1, rhoL > 0, rhoR > 0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 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
def pdf_probabilities(xs, dependents, yields, pdfs): | |
"""Return an array of normalised PDF probabilities. | |
For a list of N yields, each y_i, and a list of N PDFs f_i, the probability | |
for the ith PDF at the (possibly vector) point x is defined as | |
p_{i} = \frac{N_{i}f_{i}}{\sum_{i}^{N} N_{i}f_{i}} | |
Keyword arguments: | |
xs -- List of values at which to evaluate the PDFs |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 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
#!/bin/bash | |
# Run commands in the Docker container with a particular UID and GID. | |
# The idea is to run the container like | |
# docker run -i \ | |
# -v `pwd`:/work \ | |
# -e LOCAL_USER_ID=`id -u $USER` \ | |
# -e LOCAL_GROUP_ID=`id -g $USER` \ | |
# image-name bash | |
# where the -e flags pass the env vars to the container, which are read by this script. | |
# By setting copying this script to the container and setting it to the |