Skip to content

Instantly share code, notes, and snippets.

View smsharma's full-sized avatar

Siddharth Mishra-Sharma smsharma

View GitHub Profile
@smsharma
smsharma / kill_all_jobs.sh
Created October 15, 2015 15:38
Kill all jobs on a PBS scheduler. Need to specify username in file.
#!/bin/bash
USERNAME=smsharma
#to kill all the jobs
qstat -u$USERNAME | grep "$USERNAME" | cut -d"." -f1 | xargs qdel
#to kill all the running jobs
qstat -u$USERNAME | grep "R" | cut -d"." -f1 | xargs qdel
@smsharma
smsharma / Princeton.md
Last active August 12, 2019 18:40
Random notes on cluster-related stuff for Princeton clusters.

Useful tips and tricks for running on Princeton's computing clusters. (Adapted from https://gist.github.com/smsharma/c579c6563eed954f2283)

Feynman

feynman.princeton.edu

Feynman-hepheno has 3 nodes -- node022 with 16 cores and 128GB memory, and node040-node041 with 28 cores and 256GB memory.

  • Three areas -- home (~), group (/group/hepheno/) and group storage (/mnt/hepheno/)
  • Best to work from your user directory in /group/hepheno since ~ has very little storage space -- set a cd /group/hepheno/ in ~/.bashrc!
  • The contents of /group/hepheno/group-setup.sh are automatically sourced on cd into the group directory /group/hepheno/:
@smsharma
smsharma / tmux_local_install.sh
Last active May 9, 2024 15:09
Install tmux locally without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $INSTALL_DIR/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
#!/bin/sh
# create ssh connections without giving a password
if [ $# -lt 1 ]; then
echo Usage: $0 username@remotehost
exit
fi
remote="$1" # 1st command-line argument is the user@remotehost address
this=$HOST # name of client host
###############################################################################
# p3FGL.py
###############################################################################
#
# Plot Fermi 3FGL PS catalog histogram
# Usage:
#
# p = plot_3FGL()
# x_counts, y_counts, error_L, error_H, x_errors_L, x_errors_H = \
# p.return_counts(flux_min = 5e-11,
### MATPLOTLIBRC FORMAT
# This is a sample matplotlib configuration file - you can find a copy
# of it on your system in
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
# there, please note that it will be overwritten in your next install.
# If you want to keep a permanent local copy that will not be
# overwritten, place it in the following location:
# unix/linux:
# $HOME/.config/matplotlib/matplotlibrc or
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
######################################################################
## PARAM_CARD AUTOMATICALY GENERATED BY MG5 FOLLOWING UFO MODEL ####
######################################################################
## ##
## Width set on Auto will be computed following the information ##
## present in the decay.py files of the model. ##
## See arXiv:1402.1178 for more details. ##
## ##
######################################################################
<LesHouchesEvents version="3.0">
<header>
<!--
#*********************************************************************
# *
# MadGraph5_aMC@NLO *
# *
# Going Beyond *
# *
# http://madgraph.hep.uiuc.edu *
<LesHouchesEvents version="3.0">
<header>
<!--
#*********************************************************************
# *
# MadGraph5_aMC@NLO *
# *
# Going Beyond *
# *
# http://madgraph.hep.uiuc.edu *