Skip to content

Instantly share code, notes, and snippets.

View icaoberg's full-sized avatar

icaoberg icaoberg

View GitHub Profile
@icaoberg
icaoberg / getnodenames.sh
Last active December 12, 2015 03:38
[PBS] Get the names of the nodes that belong to a specific queue
#!/bin/bash
QUEUE_NAME=model1
pbsnodes | grep -B 3 "properties = $QUEUE_NAME" | grep "compute"
@icaoberg
icaoberg / getnodesthataredown.sh
Created February 4, 2013 17:40
[PBS] Retrieve the list of node names that are currently down
#!/bin/bash
pbsnodes | grep -B 1 "state = down" | grep "compute"
@icaoberg
icaoberg / getlistofrunning jobs
Created February 4, 2013 17:49
[PBS] Get a list of jobs for a specific user given a job state
#!/bin/bash
#Restricts job selection to those in the specified states
#E(xiting state)
#H(eld state)
#Q(ueued state)
#R(unning state)
#T(ransiting state)
#W(aiting state)
@icaoberg
icaoberg / scipy_install.sh
Created February 27, 2013 04:02
[MacOSX][Mountain Lion] Install scipy in MacOSX
#!/bin/bash
#http://stackoverflow.com/questions/12574604/scipy-install-on-mountain-lion-failing
mkdir -p build
cd build
git clone https://github.com/numpy/numpy.git
python build setup.py
python install setup.py
pip install scipy
@icaoberg
icaoberg / remove.sh
Created March 6, 2013 21:32
[Git] Remove all *.pyc files from your git repository
#!/bin/bash
find . -name "*.pyc" -exec git rm {} \;
git commit -m "Removed compiled python files in distribution left after last commit"
@icaoberg
icaoberg / getdata.sh
Created April 4, 2013 18:36
[Human Protein Atlas] Helper script that downloads images from the database given a file with accession ids
#!/bin/bash
# Author: Ivan E. Cao-Berg (icaoberg@scs.cmu.edu)
#
# Copyright (C) 2013 Murphy Lab
# Lane Center for Computational Biology
# School of Computer Science
# Carnegie Mellon University
#
# This program is free software; you can redistribute it and/or modify
@icaoberg
icaoberg / killthemall.sh
Last active May 6, 2024 16:37
[PBS] Delete all of the jobs associated to a specific user
#!/bin/bash
USERNAME=icaoberg
#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
@icaoberg
icaoberg / listgroups.sh
Created May 25, 2013 17:20
[OMERO.server][OMERO.searcher] List groups using the command line tools
#!/bin/bash
bin/omero group list
@icaoberg
icaoberg / addgroup.sh
Created May 25, 2013 17:23
[OMERO.server][OMERO.searcher] Add a group using the command line tools
#!/bin/bash
GROUPNAME=developers
bin/omero group add $GROUPNAME
@icaoberg
icaoberg / groupid.sh
Created May 25, 2013 17:27
[OMERO.server][OMERO.searcher] Get group id using the command line tools
#!/bin/bash
GROUPNAME=developers
omero group list | grep $GROUPNAME | cut -d"|" -f1