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 | |
format="%-12s %-5s %-11s %-10s %-11s %s\n" | |
printf "$format" host cpus phys_cores virt_cores total_cores lsf_cores | |
for host in $(lshosts -w | grep wustl | grep -v vm | awk -F. '{print $1}'); do | |
cpus=$(ssh $host "grep 'physical id' /proc/cpuinfo | sort -u | wc -l") | |
core_ids=$(ssh $host "grep 'core id' /proc/cpuinfo | sort -u | wc -l") | |
physical_cores=$(expr $cpus \* $core_ids) | |
total_cores=$(ssh $host "grep 'proc' /proc/cpuinfo | wc -l") | |
virtual_cores=$(expr $total_cores \- $physical_cores) |
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 strict; | |
use warnings 'FATAL'; | |
use IO::String; | |
use Text::CSV; | |
my $tcga_sample_type_csv = <<TCGA_SAMPLE_TYPE_CSV; | |
"Code","Definition","Short Letter Code" |
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 strict; | |
use warnings 'FATAL'; | |
use IO::String; | |
use List::MoreUtils; | |
use Text::CSV; | |
my $io = IO::String->new; |
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 strict; | |
use warnings; | |
use List::MoreUtils 'firstidx'; | |
my @months = map { qr/$_/ } (qw/ jan feb mar apr may jun jul aug sep oct nov dec /); | |
use Data::Dumper; | |
my %metrics = ( seen => 0, renamed => 0, ); |
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 ruby | |
def filename_for_pkg(filename) | |
filename.gsub!(/\//, '') | |
filename.gsub!(/([^A-Z])([A-Z])/,'\1_\2') | |
File.join('', %w{ gscuser ebelter dev genome genome etc genome spec }, 'lsf_resource_dv2_' + filename.downcase + '.yaml') | |
end | |
def cleanup_resource(resource) | |
resource.chomp! |
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
language: perl | |
perl: | |
- "5.12" | |
sudo: false | |
before_install: | |
- git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers | |
- source ~/travis-perl-helpers/init | |
- build-perl | |
- perl -V | |
install: |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 strict; | |
use warnings 'FATAL'; | |
use Net::LDAP; | |
use YAML; | |
my $ldap = Net::LDAP->new('ipa1.gsc.wustl.edu', version => 3); | |
my $mesg = $ldap->start_tls(verify => 'none'); |
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 ruby | |
file = ARGV[0] | |
if ! file or ! File.exists?(file) | |
raise "No file!" | |
end | |
things = Array.new | |
fh = File.open(file, 'r') | |
fh.each_line do |line| |
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
### INSTANCE SETUP | |
# create instance CLI - change the instance nmae and boot disk name as needed | |
$ NUM=1; export NUM # update for intance number | |
$ gcloud compute instances create supernova-${NUM} --zone=us-central1-c \ | |
--machine-type=custom-56-372736 --subnet=default --maintenance-policy=MIGRATE \ | |
--service-account=816609412860-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/cloud-platform \ | |
--min-cpu-platform=Intel\ Skylake --tags=mgi-accessible,supernova-ui --image=centos-7-v20180507 --image-project=centos-cloud \ | |
--boot-disk-size=200GB --boot-disk-type=pd-standard --boot-disk-device-name=supernova-${NUM} |
OlderNewer