View main.go
This file contains 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
package main | |
import ( | |
"fmt" | |
) | |
type Fruit struct { | |
Name string | |
Color string | |
} |
View latex-jekyll-site.yaml
This file contains 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
name: generate-site | |
on: | |
pull_request: [] | |
push: | |
branches: | |
- "main" | |
jobs: | |
Update: |
View dinosaur.lp
This file contains 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
% clingo dinosaur.lp | |
% These are blanket facts, statements that each of these is living | |
% I think these are called atoms | |
living(vanessa). | |
living(fernando). | |
living(maria). | |
% This tells use size of arms for each living thing | |
armsize(vanessa, "small"). | |
armsize(fernando, "large"). |
View decorators.py
This file contains 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
from django.contrib.auth import REDIRECT_FIELD_NAME | |
from django.shortcuts import render, resolve_url | |
from myapp.settings import cfg | |
from myapp import settings | |
from urllib.parse import urlparse | |
import uuid | |
def login_is_required( |
View snakemake-debugging.sh
This file contains 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
# This is a small script (that typically I copy paste) on a Google Cloud instance | |
# to set up an environment to mimic a worker. It includes installing snakemake, | |
# retrieving a package with the working directory (which typically has the | |
# version of snakemake I aim to develop or debug, and then interactively debugging | |
# or doing this. | |
sudo apt-get install -y wget bzip2 ca-certificates gnupg2 git | |
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
sudo chown -R $USER /opt | |
bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda |
View gls.py
This file contains 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 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 |
View Dockerfile
This file contains 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
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 |
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
View pull_request.sh
This file contains 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 | |
# 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) | |
################################################################################ |
NewerOlder