- Obtaining credentials
- Getting permissions to use Batch
- Choosing a Compute Environment (for scicomp - how to create a new one, and document the default ones)
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
""" | |
Given the lines in a sessionInfo() that start (minus whitespace) with `[`, | |
this creates a dict of package name/version pairs. | |
""" | |
def get_pkgs(text): | |
""" | |
Get a dict of package/version pairs from the packages section | |
of R's sessionInfo() output. | |
""" |
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 python3 | |
""" | |
Permanently delete all "deleted" objects in a versioned S3 bucket. | |
In a versioned bucket, just deleting an object does not actually delete it | |
(though bucket lifecycle policies may eventually do so). Previous versions | |
will still be in the bucket. Deletions are recorded as "delete markers". | |
Use this script if you really really want to permanently delete all |
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/python3 | |
""" | |
Generate passphrases from this wordlist: | |
https://www.eff.org/files/2016/07/18/eff_large_wordlist.txt | |
This will generate 3 sets of 3 words separated by hyphens. | |
""" | |
import random |
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 python3 | |
from datetime import datetime, timedelta | |
import sys | |
import boto3 | |
cloudwatch = boto3.client('cloudwatch') | |
paginator = cloudwatch.get_paginator('list_metrics') | |
s3 = boto3.client("s3") |
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
diff --git a/sw2srv/views.py b/sw2srv/views.py | |
index e7a9002..18daef5 100644 | |
--- a/sw2srv/views.py | |
+++ b/sw2srv/views.py | |
@@ -75,11 +75,12 @@ def test(acct_name='test_a'): | |
r = jsonify( cred ) | |
return r | |
-def validate( username, acct_name, binddn, bindpw ): | |
+def validate( username, acct_name, binddn, bindpw, grp_suffix): |
Set up as follows:
Install virtualenvwrapper
if it isn't already installed:
pip install virtualenvwrapper
Create a virtualenv, using python 3:
mkvirtualenv --python $(which python3) flask-oauth
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 python3 | |
""" | |
Use this as a pipe to change proofpoint-mangled URLs like this: | |
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_bioc-2Ddevel&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=TF6f93hjWmgMzjqP9F3thRifibmFvfjc5Ae-bzNwDGo&m=oY-7oZ61w7BXE0OdDWKGHJBQVDfKclm7qIZa9Ax4MKo&s=2yq6rudFXxjoM851HucPcWoNvhH2RgPkAMcWOl7tRZc&e= | |
to 'unmangled' URLs like this: |
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
# two implementations of a function to bump an R package version, given the package name/directory | |
# implementation 1 uses read/write.dcf, but changes lines unnecessarily, even though | |
# we use the keep.white option. | |
bump0 <- function(pkg){ | |
print(pkg) | |
desc <- file.path(pkg, "DESCRIPTION") | |
dcf <- read.dcf(desc) # once without keeping whitespace | |
dcf <- read.dcf(desc, keep.white=colnames(dcf)) |
NewerOlder