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
| import $ivy.`com.github.pathikrit::better-files:3.9.1` | |
| import better.files._ | |
| object OpenTargets { | |
| case class Timestamp(h: Int, m: Int, s: Int, mm: Int) { | |
| override def toString: String = f"$h%02d:$m%02d:$s%02d,$mm%03d" | |
| } | |
| object SRTTransformer { | |
| def transformTime(s: String): Seq[Timestamp] = | |
| s.split("-").map(t => t.trim.split(":").map(_.toInt).toList match { |
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
| import coursierapi._ | |
| interp.repositories() ++= Seq( | |
| MavenRepository | |
| .of("http://dl.bintray.com/spark-packages/maven") | |
| ) |
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
| #!/bin/bash | |
| mkdir ~/.ammonite | |
| git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm | |
| wget https://raw.githubusercontent.com/mkarmona/rc/master/.tmux.conf -O ~/.tmux.conf | |
| wget https://raw.githubusercontent.com/mkarmona/rc/master/.ammonite/resolvers.sc -O ~/.ammonite/resolvers.sc | |
| wget https://raw.githubusercontent.com/mkarmona/rc/master/.ammonite/shell.sc -O ~/.ammonite/shell.sc | |
| wget https://raw.githubusercontent.com/mkarmona/rc/master/.ammonite/spark.sc -O ~/.ammonite/spark.sc | |
| wget https://raw.githubusercontent.com/mkarmona/rc/master/.ammonite/spark-cluster.sc -O ~/.ammonite/spark-cluster.sc | |
| wget https://raw.githubusercontent.com/mkarmona/rc/master/.ammonite/spark-nlp.sc -O ~/.ammonite/spark-nlp.sc |
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
| import graph; | |
| usepackage("kpfonts"); | |
| size(10cm, 7cm, IgnoreAspect); | |
| scale(Linear, Log); | |
| real [] x1={32,48,64,80,96, 112, 128}; | |
| real [] y1={1451,532,504,343,288,271,250}; | |
| real [] x2={16,32,64,96}; | |
| real [] y2={1304,797,543,343}; |
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
| curl http://r2.finngen.fi/api/phenos | jq -r '.[]| @json' > r2_finngen.json |
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
| directive @cacheControl(maxAge: Int, scope: CacheControlScope) on FIELD_DEFINITION | OBJECT | INTERFACE | |
| type Abstract { | |
| title: String! | |
| } | |
| type AdverseEventRow { | |
| event: String! | |
| count: Int! | |
| llr: Float! |
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
| # exec(open('GetAdverseEventsForOTdrugs.py').read()) | |
| import requests | |
| import json | |
| # Drug names are keys in all three dictionaries | |
| Drugs = {} # Count of the different adverse events per drug | |
| DrugsAE = {} # The adverse events for each drug | |
| Drugs_ChEMBLID = {} # Drug name to ChEMBL ID mapping |
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
| #!/bin/bash | |
| apt-get update && DEBIAN_FRONTEND=noninteractive \ | |
| apt-get \ | |
| -o Dpkg::Options::="--force-confnew" \ | |
| --force-yes \ | |
| -fuy \ | |
| dist-upgrade && \ | |
| DEBIAN_FRONTEND=noninteractive \ | |
| apt-get \ |
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
| # This tmux statusbar config was created based on gruvbox colorscheme | |
| set -g status "on" | |
| # remap prefix from 'C-b' to 'C-a' | |
| unbind C-b | |
| # set-option -g prefix C-a | |
| set-option -g prefix M-x | |
| # bind-key C-a send-prefix | |
| bind-key M-x send-prefix |
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
| buildscript { | |
| ext.kotlin_version = '1.0.5' | |
| repositories { | |
| mavenCentral() | |
| } | |
| dependencies { | |
| classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | |
| classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.4.2.RELEASE' | |
| classpath "com.google.cloud.tools:appengine-gradle-plugin:+" |
NewerOlder