-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_aliases
94 lines (83 loc) · 2.38 KB
/
.bash_aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# some more ls aliases
alias ls='ls --color=auto'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias l.='ls -d .* --color=auto'
# make dotfiles command available everywhere
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
# rscreen: diretly jump into ssh sessions screen
rscreen() {
ssh $1 -Yt screen -D -RR $2
}
rtmux() {
ssh $1 -Yt tmux new-session -A -s $2
}
ssh_perlmutter() {
~/tools/perlmutter/sshproxy.sh -u dnoll
}
ssh_lxplus() {
kinit -f [email protected]
}
# Commands on Perlmutter
work_doubleaecwola () {
module load python
conda activate perlmutterdnoll
cd ~/projects/anomaly_detection/doublecwola/DoubleAECWOLA/
source setup.sh
}
work_recast_demo () {
module load python
conda activate perlmutterdnoll
cd ~/projects/recast/lhco_cwola/CWoLa-Hunting
source setup.sh
}
work_haxad () {
cd ~/projects/anomaly_detection/atlas_analysis_new/code/haxad_demonstrator
source setup.sh
}
work_eventgen () {
cd ~/projects/anomaly_detection/atlas_analysis_new/code/EventGenDelphes
source setup.sh
}
# Commands on lxplus
work_mlpf () {
cd ~/projects/agpf/CalibrationHitStudies/build
setupATLAS
asetup --restore
source ../build/x86*/*setup.sh
cd ../run/
echo "Now copy: cp ../athena/GlobalParticleFlow/SubstructureStudies/python/PFRunCalibHitDecorator_PFlowReco_ESDtoAOD_addCPData_mc21.py ."
echo "Then start: python PFRunCalibHitDecorator_PFlowReco_ESDtoAOD_addCPData_mc21.py"
}
work_mcjoboptions () {
cd ~/projects/GlobalParticleFlowStudies/
setupATLAS
cd build
asetup 23.6.32,AthGeneration # For Derivation: Athena,main,latest
cd ~/projects/mcjoboptions/generation
source setup.sh
}
kscreen(){
if [[ -z "$1" ]]; then #if no argument passed
k5reauth -f -i 3600 -p dnoll -k /afs/cern.ch/user/d/dnoll/tokens/dnoll.keytab -- screen -D -RR hh
else #pass the argument as the tmux session name
k5reauth -f -i 3600 -p dnoll -k /afs/cern.ch/user/d/dnoll/tokens/dnoll.keytab -- screen -D -RR $1
fi
}
tunnel () {
./tools/vscode/code tunnel
}
show() {
if [ -z "$1" ]; then
echo "Usage: show <process_id>"
return 1
fi
PID=$1
LOG_FILE="/proc/$PID/fd/1"
if [ ! -e "$LOG_FILE" ]; then
echo "Error: Process ID $PID does not exist or does not have a file descriptor 1."
return 1
fi
tail -f "$LOG_FILE"
}