Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
rawr

Vanessasaurus vsoch

💭
rawr
View GitHub Profile
@vsoch
vsoch / gls.py
Last active Sep 2, 2020
Testing Google Life Sciences updated download / upload script (will be put into version control)
View gls.py
#!/usr/bin/env python
# This is a helper script for the Google Life Sciences instance to be able to:
# 1. download a blob from storage, which is required at the onset of the Snakemake
# gls.py download <bucket> <source> <destination>
# workflow step to obtain the working directory.
# 2. Upload logs back to storage (or some specified directory of files)
# gls.py save <bucket> <source-dir> <destination-dir>
# gls.py save <bucket> /google/logs/output source/logs
@vsoch
vsoch / Dockerfile
Last active Aug 25, 2020
Dolmades Files
View Dockerfile
FROM ubuntu:16.04
LABEL version="1.0"
ENTRYPOINT [ "/singularity" ]
RUN mkdir -p /APPS /PROFILES
RUN chmod 0777 /APPS /PROFILES
RUN dpkg --add-architecture i386
RUN apt-get update && apt-get -y install wget less vim software-properties-common python3-software-properties apt-transport-https winbind
RUN wget https://dl.winehq.org/wine-builds/Release.key
@vsoch
vsoch / AIRFLOW_FEEDBACK.md
Last active Jan 22, 2020
Apache Airflow Feedback 1/22/2020
View AIRFLOW_FEEDBACK.md

Airflow Feedback

This is feedback about contribution to Apache Airflow.

Background

I first opened up a pull request in early March 2019 to add a Singularity operator to airflow. I am fairly experienced with Singularity (but not Airflow) so largely my strategy was to use an existing operator (Docker) as an example, and go from there. The interaction felt more controlled than usual because I was required to open a JIRA issue, but this wasn't terrible and is understandable for a larger community. A reviewer was very quick

@vsoch
vsoch / pull_request.sh
Last active Nov 20, 2019
A supporting script for a GitHub action to open a pull request
View pull_request.sh
#!/bin/bash
# Suggested by Github actions to be strict
# Taken from https://www.github.com/vsoch/pull-request-action
set -e
set -o pipefail
################################################################################
# Global Variables (we can't use GITHUB_ prefix)
################################################################################
@vsoch
vsoch / run.sh
Last active Nov 4, 2019
Testing run.sh script for Snakemake
View run.sh
#!/bin/bash
BUCKET="${1}"
BLOB="${2}"
JOBSCRIPT="${3}"
mkdir -p /workdir
cd /workdir
echo "bucket: $BUCKET"
echo "blob: $BLOB"
@vsoch
vsoch / download.py
Created Nov 2, 2019
Provides a wrapper script to download a Snakemake Blob, and then extract to a location. This should be moved to be packaged alongside snakemake
View download.py
#!/usr/bin/env python
import argparse
import datetime
from google.cloud import storage
def download_blob(bucket_name, source_blob_name, destination_file_name):
"""Downloads a blob from the bucket."""
storage_client = storage.Client()
@vsoch
vsoch / backup.sh
Created Oct 21, 2019
An example of using rsync to backup three folders in Documents to an external drive, checking that it's mounted first
View backup.sh
#!/bin/bash
output=/media/$USER/My\ Passport/vubuntu/
if [ ! -d "$output" ]; then
echo "$output not found, is drive connected to computer?"
exit 1
fi
for folder in "Personal" "Transcripts" "Resume"; do
rsync -avzh /home/$USER/Documents/$folder $output
@vsoch
vsoch / cargo-debstatus-nu-0.3.0_10-17-2019.txt
Last active Dec 7, 2019
nu 0.3.0 dependency output from running cargo-debstatus in the root of the repository, and commenting out #default-run = "nu" in Cargo.toml. Do a find for (outdated) to highlight all the packages that were highlighted in yellow on the terminal (that I cannot show here)
View cargo-debstatus-nu-0.3.0_10-17-2019.txt
nu v0.3.0 (/home/vanessa/Documents/Dropbox/Code/rust/nushell-debian/nushell-0.3.0)
├── ansi_term v0.12.1 (in debian)
├── app_dirs v1.2.1
│ ├── ole32-sys v0.2.0
│ │ ├── winapi v0.2.8 (outdated)
│ │ └── winapi-build v0.1.1 (in debian)
│ ├── shell32-sys v0.1.2
│ │ ├── winapi v0.2.8 (outdated)
│ │ └── winapi-build v0.1.1 (in debian)
│ ├── winapi v0.2.8 (outdated)
@vsoch
vsoch / Dockerfile
Created Jul 19, 2019
An example Dockerfile using MicroSecurity scanner from AquaSec. You need to first get a token, and replace variables in the file.
View Dockerfile
FROM YOURCONTAINERHERE
# docker run --rm -it aquasec/microscanner --register <email address>
# docker build -t dirty-container .
RUN apk add --no-cache ca-certificates && update-ca-certificates
ADD https://get.aquasec.com/microscanner .
RUN chmod +x microscanner
RUN ./microscanner YOURTOKENHERE
@vsoch
vsoch / README.md
Created Jul 11, 2019
Apache with Singularity and without sudo
View README.md

Apache with Singularity

Start with this recipe

Bootstrap: docker
From:httpd:2.4.37
%startscript
httpd-foreground
You can’t perform that action at this time.