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
// This lives in user/ | |
/////////////////////////////////////////////////////////////////////////////// | |
/// \file TestUser.cc | |
/// \brief An example User Processor | |
/// | |
/// This example demonstrates how to write a User Processor. MyUserProc | |
/// (declared and defined below) just creates a 1-D histogram of the number of | |
/// photoelectrons in each event, filled it as events are generated and writes | |
/// it to a file called "numpe.root". |
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
#include <cmath> | |
#include <TH2F.h> | |
#include <TVector3.h> | |
#include <QEvent.h> | |
#include <QGlobals.h> | |
#include <QPMTxyz.h> | |
TH2F* hough(const QEvent* event, TVector3& vfit, float tres_cut, bool qweight) { | |
// Calculate Cherenkov angle using FTK energy | |
float beta = sqrt(1.0 - (0.511 / (0.511 + e)) * (0.511 / (0.511 + e))); |
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 | |
echo "`date` Resume invoked $0 $*" >> /var/log/slurm-llnl/power_save.log | |
hosts=`scontrol show hostnames $1` | |
for host in $hosts | |
do | |
docker run --rm \ | |
--name $host \ | |
-h $host \ | |
-v /home:/home \ |
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
FROM ubuntu:14.04 | |
RUN apt-get update && apt-get -y install munge slurm-llnl | |
RUN mkdir -p /var/run/munge && \ | |
chown munge:munge /var/run/munge && \ | |
chmod 0700 /etc/munge && \ | |
chmod 0711 /var/lib/munge && \ | |
chmod 0700 /var/log/munge && \ | |
chmod 0755 /var/run/munge && \ |
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
# Example /etc/slurm-llnl/slurm.conf | |
ControlMachine=master | |
ControlAddr=192.168.57.100 | |
Proctracktype=proctrack/linuxproc | |
SlurmctldPort=6819 | |
SlurmdPort=6818 | |
SlurmdSpoolDir=/tmp/slurmd | |
SlurmUser=slurm | |
StateSaveLocation=/tmp/slurmd | |
SwitchType=switch/none |
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 | |
# Collect the Markdown. Webpage it. | |
# | |
# Searches subdirectories for Markdown files and creates a static webpage | |
# with frames for navigation in a new directory _notebook/. Also copies | |
# over any images referenced in the md source. | |
# | |
# A. Mastbaum <[email protected]>, 10/2015 | |
# |
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
from datetime import datetime | |
import pytz # Probably need to install this one on your system | |
import dateutil.parser | |
# An example timestamp string | |
timestamp = "2014-12-12T08:51:06.082327-05:00" | |
# Convert the string to a datetime object | |
timestamp_obj = dateutil.parser.parse(timestamp) |
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
/** | |
* Example script for drawing MCPhoton information from RAT-PAC ROOT files. | |
* | |
* Usage: | |
* | |
* root[0] .L mcphoton.cpp+ | |
* root[1] plotMCData("myfile.root"); | |
* | |
* A. Mastbaum <[email protected]>, June 2015 | |
*/ |
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
'''Make the "lobster plot." | |
That is, the possible values of the Majorana mass given the mixing parameters | |
and assuming standard three-neutrino mixing, for the normal and inverted | |
mass hierarchy. | |
By the way, the current global best fit parameters from NuFit are: | |
sin(t12)^2 = 0.304 +/- 0.012 | |
sin(t23)^2 = 0.451 +/- 0.002 (first quadrant) |
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 | |
'''Check to make sure that all the replications on the local CouchDB server | |
are actually running.''' | |
import argparse | |
from datetime import datetime, timedelta | |
from operator import itemgetter | |
import requests | |
import sys | |
import tempfile |
NewerOlder