Skip to content

Instantly share code, notes, and snippets.

View mazurov's full-sized avatar

Alexander Mazurov mazurov

View GitHub Profile
@mazurov
mazurov / HltCandidatesNoTmpl.cpp
Created November 17, 2010 10:26
HltCandidatesNoTmpl.hpp
typedef
LoKi::BasicFunctors<const LHCb::L0MuonCandidate*>::BooleanConstant
BoolL0Mc;
typedef
LoKi::BasicFunctors<const LHCb::L0CaloCandidate*>::BooleanConstant
BoolL0Cc;
typedef
LoKi::BasicFunctors<const LHCb::Track*>::BooleanConstant
BoolT;
typedef
# t.test() - segmentation fault. Using push_back(c1). cN local for __init__.
class Test():
def __init__(self):
c1 = Hlt.Candidate()
c2 = Hlt.Candidate()
c3 = Hlt.Candidate()
self.candidates = Hlt.Candidate.ConstVector()
self.candidates.push_back (c1)
self.candidates.push_back (c2)
{
"theme": "Soda Light.sublime-theme",
"ignored_packages":
[
"Vintage"
]
}
// Include files
// from Gaudi
#include "GaudiKernel/AlgFactory.h"
#include "Event/Track.h"
// local
#include "FastVeloTracking.h"
//-----------------------------------------------------------------------------
@mazurov
mazurov / xstartup
Created January 27, 2012 14:19
VNC server configuration
#!/bin/sh
# File should be executable: chmod +x ~/.vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -font -*-fixed-medium-r-*-*-20-*-*-*-*-*-iso8859-* -geometry 80x24+10+10 -ls -title "$VNCDESKTOP
Desktop" &
wm=`which icewm mwm twm | head -1`
@mazurov
mazurov / check_out_all.sh
Created February 3, 2012 09:25
Get all packages
#!/bin/bash
if [ $# -lt 2 ] ; then
echo Usage: $(basename $0) project version
exit 1
fi
project=$1
PROJECT=$(echo $1 | tr a-z A-Z)
version=$2
@mazurov
mazurov / localization.py
Created March 1, 2012 10:46
HW1.4 Localization Problem
colors = [['red', 'green', 'green', 'red' , 'red'],
['red', 'red', 'green', 'red', 'red'],
['red', 'red', 'green', 'green', 'red'],
['red', 'red', 'red', 'red', 'red']]
measurements = ['green', 'green', 'green' ,'green', 'green']
motions = [[0,0],[0,1],[1,0],[1,0],[0,1]]
@mazurov
mazurov / 3lines.py
Created March 14, 2012 11:37
3 lines options file
#!/usr/bin/env gaudirun.py
import sys, os
sys.path.append(os.path.dirname(sys.argv[1]))
import job1
job1.run(["Hlt1TrackAllL0", "Hlt1DiMuonHighMass", "Hlt1DiMuonLowMass"])
@mazurov
mazurov / moore.py
Created April 8, 2012 12:11
Check memory usage
#!/usr/bin/env gaudirun.py
##
## Configuration using environment variables
##
import os
##
## Hard coded configuration.
##
import Gaudi.Configuration
from Gaudi.Configuration import *
@mazurov
mazurov / ups.py
Created August 29, 2012 09:07
Upsilons
#!/usr/bin/env python
# =============================================================================
# $Id: Chib.py 140321 2012-05-20 15:54:20Z ibelyaev $
# =============================================================================
## @file BenderExample/Chib.py
# The simple Bender-based example to look for Chi_b-peak
#
# This file is a part of
# <a href="http://cern.ch/lhcb-comp/Analysis/Bender/index.html">Bender project</a>
# <b>``Python-based Interactive Environment for Smart and Friendly