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
import { noop, safe_not_equal } from 'svelte/internal'; | |
/** Callback to inform of a value updates. */ | |
export type Subscriber<T> = (value: T) => void; | |
/** Unsubscribes from value updates. */ | |
export type Unsubscriber = () => void; | |
/** Callback to update a value. */ | |
export type Updater<T> = (value: T) => T; |
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
import re | |
from time import sleep | |
from typing import Any, Dict | |
import boto3 | |
from zappa.cli import ZappaCLI | |
PROVISIONED_CONCURRENCY = 5 | |
client = boto3.client("lambda") |
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
heroku config -s -a from-app > ~/Desktop/env.txt | |
cat ~/Desktop/env.txt | tr '\n' ' ' | xargs heroku config:set -a to-app |
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
function doSub() { | |
setTimeout(function() { | |
if ($('.subButtons a.add.active').length === 0) { | |
clearTimeout(doSub) | |
} else { | |
var el = $('.subButtons a.add.active:first') | |
console.log(el.parent().parent().parent().find('a:first').text()) | |
$(el).click() | |
doSub() |
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 flask import Flask | |
def create_app(): | |
app = Flask('testapp') | |
# omitted for brevity: load app config | |
# configure database | |
from app.lib.db import init_engine, db_session | |
init_engine(app.config['DATABASE_URI']) |
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 logstash:6.6.1 | |
ADD ./logstash.conf . | |
ADD ./logstash.yml . | |
ADD ./template.json . | |
ENV LS_JAVA_OPTS="-Dls.cgroup.cpuacct.path.override=/ -Dls.cgroup.cpu.path.override=/ -Djava.security.egd=file:/dev/urandom $LS_JAVA_OPTS" | |
CMD logstash -f ./logstash.conf --path.settings=. --verbose --log.level=debug |
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
library(RPostgreSQL) | |
library(pool) | |
library(dplyr) | |
library(dbplyr) | |
pool <- dbPool( | |
drv = PostgreSQL(), | |
host = Sys.getenv("DB_HOST"), | |
port = 5432, | |
dbname = Sys.getenv("DB_NAME"), |
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
library(dplyr) | |
library(tidyr) | |
library(stringr) | |
sort_course_codes <- function(course_codes) { | |
course_with_sorting <- data_frame(course_code = course_codes) %>% | |
mutate(course_code_cleaned = str_trim(tolower(str_replace_all( | |
course_code, "[(\\[\\{][^(\\[\\{]+[)\\]\\}]", "" | |
)))) %>% | |
separate( |
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
merged_fit <- alply(1:n_samp, 1, function(s) { | |
h_seg_dat_new$h.capseg.d[[merge_ixs[1]]] <- unlist(h_seg_dat_new$h.capseg.d[merge_ixs]) | |
h_seg_dat_new$h.capseg.raw[[merge_ixs[1]]] <- unlist(h_seg_dat_new$h.capseg.raw[merge_ixs]) | |
h_seg_dat_new$h.capseg.annot[[merge_ixs[1]]]$pos <- unlist(lapply(h_seg_dat_new$h.capseg.annot[merge_ixs], "[[", "pos")) | |
h_seg_dat_new$gh.wes.allele.d[[merge_ixs[1]]] <- do.call(cbind, h_seg_dat_new$gh.wes.allele.d[merge_ixs]) | |
h_seg_dat_new$gh.wes.allele.annot[[merge_ixs[1]]]$pos <- unlist(lapply(h_seg_dat_new$gh.wes.allele.annot[merge_ixs], "[[", "pos")) | |
if (n_merge_hets >= 2) h_seg_dat_new$seg_phase_pr[[merge_ixs[1]]] <- 0.5 | |
if (n_merge_hets >= 2) h_seg_dat_new$consensus_phase[[merge_ixs[1]]] <- init_merged_consensus_phase(log_het_phase_prob_list) | |
capture_em_fit_new$log.het.phase.prob[[merge_ixs[1]]] <- data_frame("x1" = rep(NA, n_merge_hets)) | |
capture_em_fit_new$het.phase.prob[[merge_ixs[1]]] <- capture_em_fit_new$log.het.phase.prob[[merge_ixs[1]]] |
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
17:13:34.819 INFO NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/xchip/scarter/dmccabe/software/gatk-protected_e54dac3/build/libs/gatk-protected-package-e54dac3-SNAPSHOT-local.jar!/com/intel/gkl/native/libgkl_compression.so | |
[April 12, 2017 5:13:34 PM EDT] org.broadinstitute.hellbender.tools.exome.convertbed.ConvertBedToTargetFile --input test2.bed --output test2.target --help false --version false --showHidden false --verbosity INFO --QUIET false --use_jdk_deflater false --use_jdk_inflater false | |
[April 12, 2017 5:13:34 PM EDT] Executing as dmccabe@ccpm.broadinstitute.org on Linux 2.6.32-642.13.1.el6.x86_64 amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_121-b13; Version: Version:e54dac3-SNAPSHOT | |
17:13:34.858 INFO ConvertBedToTargetFile - Defaults.BUFFER_SIZE : 131072 | |
17:13:34.858 INFO ConvertBedToTargetFile - Defaults.COMPRESSION_LEVEL : 5 | |
17:13:34.858 INFO ConvertBedToTargetFile - Defaults.CREATE_INDEX : false | |
17:13:34.858 INFO ConvertBedToTargetFile - Defaults.CREATE_MD5 : false | |
17 |
NewerOlder