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
# run instrument emulations | |
gnome-terminal --tab -- /bin/bash -c '. env/bin/activate; python -m comet.emulator.keithley.k707 -p 11001' | |
gnome-terminal --tab -- /bin/bash -c '. env/bin/activate; python -m comet.emulator.keithley.k2410 -p 11002' | |
gnome-terminal --tab -- /bin/bash -c '. env/bin/activate; python -m comet.emulator.keithley.k2657a -p 11003' | |
gnome-terminal --tab -- /bin/bash -c '. env/bin/activate; python -m comet.emulator.keithley.k6517b -p 11004' | |
gnome-terminal --tab -- /bin/bash -c '. env/bin/activate; python -m comet_pqc.emulator.e4980a -p 11005' | |
gnome-terminal --tab -- /bin/bash -c '. env/bin/activate; python -m comet_pqc.emulator.environmentbox -p 11006' | |
gnome-terminal --tab -- /bin/bash -c '. env/bin/activate; python -m comet.emulator.corvus.venus1 -p 11007' |
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 perl | |
use File::Basename; | |
# get the complete list of class names for replacement: | |
my @src = (); | |
my @rep = (); | |
open FILELIST, "L1Trigger/L1TGlobal/scripts/files.txt"; | |
while($fullfile = <FILELIST>){ |
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
set -e | |
version="$1" | |
if [ -z "$1" ] | |
then | |
echo "usage: build-longterm <version>" | |
exit 1 | |
fi |
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 re | |
import sys | |
import tmGrammar | |
import tmTable | |
def parse(expression): | |
tmGrammar.Algorithm_Logic.clear() | |
if not tmGrammar.Algorithm_parser(expression): | |
raise ValueError("Failed to parse algorithm expression") |
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
# Parsing XML menu to JSON | |
# | |
# Usage: | |
# python xml2json.py sample.xml | |
# | |
# Example data: | |
# https://raw.githubusercontent.com/cms-l1-globaltrigger/cms-l1-menu/master/2019/L1Menu_Collisions2018_v2_1_0-d2/xml/L1Menu_Collisions2018_v2_1_0-d2.xml | |
# | |
import json |
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
// gcc -DLINUX -I/opt/xdaq/include -L/opt/xdaq/lib -lCAENVME firmware.c -o firmware | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <CAENVMElib.h> | |
int main() | |
{ | |
char version[256]; |
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 | |
# | |
# An example workflow for setting up a virtual environment for UTM Python bindings. | |
# | |
# Select UTM version | |
UTM_VERSION="0.7.3" | |
# Select Python version | |
PYTHON_MAJOR=3 |
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
# | |
# Build script for distribution independent binary Python wheels | |
# for utm library on Linux. | |
# | |
# Install Docker | |
# | |
# sudo apt install docker | |
# sudo usermod -a -G docker $USER # logout required | |
# | |
# Pull manylinux image |
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
# Fixed point fractional prescale calculation using add and sub | |
# Proposed by Andrea Bocci, Sept. 2019 | |
import argparse | |
class PrescaleCounter(object): | |
precision = 1 | |
def __init__(self, prescale): |
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 sys | |
import time | |
import traceback | |
from PyQt5 import QtCore, QtGui, QtWidgets | |
class WorkerSignals(QtCore.QObject): | |
"""Signals provided by class `Worker`.""" | |
finished = QtCore.pyqtSignal() |