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
private <T, U> Optional<U> foldOption(Optional<T> option, Function<T,U> f, Supplier<U> ifNone) { | |
return Optional.<U>of(option.map(f).orElse(ifNone.get())); | |
} |
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
41,226.449 | |
41,226.449 |
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
jdbc:mysql://google/cromwell?cloudSqlInstance=anichols-clone&socketFactory=com.google.cloud.sql.mysql.Socke | |
tFactory&user=asdf&password=asdf&useUnicode=true&characterEncoding=UTF-8 |
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
EMAIL=$(gcloud beta iam service-accounts create $1 --description "foo" --display-name "danb-perf-display-name" --format json | jq '.email' | sed -e 's/\"//g') | |
for i in storage.objectCreator storage.objectViewer genomics.pipelinesRunner genomics.admin iam.serviceAccountUser storage.objects.create | |
do | |
gcloud projects add-iam-policy-binding $2 --member serviceAccount:$EMAIL --role roles/$i | |
done | |
gcloud iam service-accounts keys create sa.json --iam-account $EMAIL |
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
//IMPORTANT | |
//to run on mac use JAVA_OPTS="-XstartOnFirstThread" amm -w swt.sc | |
interp.repositories() ++= Seq(coursier.maven.MavenRepository( | |
"http://maven-eclipse.github.io/maven/")) | |
import $ivy.`org.clapper::grizzled-scala:4.4.1` | |
import $ivy.`org.fusesource:sigar:1.6.4` | |
import grizzled.sys._ |
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
{ | |
"truncateLogContext": { | |
"kind": "sql#truncateLogContext", | |
"logType": "MYSQL_GENERAL_TABLE" | |
} | |
} |
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 | |
REPORT_BUCKET="cromwell-perf-test-reporting" | |
CROMWELL_OLD_VERSION=34-cfbe67f | |
CROMWELL_NEW_VERSION=34-bda9485 | |
TEST_CASES=$(gsutil ls -d gs://$REPORT_BUCKET | grep -e "/$") | |
TEST_CASES_URLS_LIST=(${TEST_CASES// / }) | |
docker \ |
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 $ivy.`org.http4s::http4s-dsl:0.18.17` | |
import $ivy.`org.http4s::http4s-blaze-server:0.18.17` | |
import $ivy.`org.http4s::http4s-blaze-client:0.18.17` | |
import $ivy.`io.circe::circe-core:0.9.3` | |
import $ivy.`io.circe::circe-parser:0.9.3` | |
import $ivy.`io.circe::circe-generic:0.9.3` | |
import io.circe._, io.circe.parser._ | |
import io.circe.generic.auto._ |
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
def scanState[F[_], S, A, B](init: S)(f: A => State[S, B]): Pipe[F, A, B] = | |
_.pull.scanSegments(init){ | |
case (previousState, segment: Segment[A, Unit]) => | |
segment.mapAccumulate(previousState)({ | |
case (state, o1) => | |
val stateFunc = f(o1) | |
(stateFunc run state).value | |
}).mapResult(_._2) | |
}.stream |
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
exports.helloWorld = (req, res) => { | |
// Example input: {"message": "Hello!"} | |
if (req.body.dosUrl === undefined) { | |
// This is an error case, as "message" is required. | |
res.status(400).send('No message defined!'); | |
} else { | |
// Everything is okay. | |
console.log(req.body.dosUrl); | |
var response = {}; | |
response["dos"] = req.body.dosUrl.replace("dos","gs"); |
NewerOlder