Skip to content

Instantly share code, notes, and snippets.

@mkarmona
mkarmona / GetAdverseEventsForOTdrugs.py
Created December 7, 2018 12:06 — forked from MichaelaEBI/GetAdverseEventsForOTdrugs.py
Get side effects for all drugs in ChEMBL evidence strings
# 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
@mkarmona
mkarmona / build.gradle
Created June 5, 2017 07:44 — forked from t-kashima/build.gradle
Kotlin on Google App Engine
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:+"
@mkarmona
mkarmona / prepare-commit-msg.sh
Last active April 27, 2017 08:24 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@mkarmona
mkarmona / replace.sh
Created April 25, 2017 10:44 — forked from hlissner/replace.sh
Bulk search & replace with ag (the_silver_searcher)
# ag <https://github.com/ggreer/the_silver_searcher>
# usage: ag-replace.sh [search] [replace]
# caveats: will choke if either arguments contain a forward slash
# notes: will back up changed files to *.bak files
ag -l $1 | xargs perl -pi.bak -e "s/$1/$2/g"
# or if you prefer sed's regex syntax:
ag -l $1 | xargs sed -ri.bak -e "s/$1/$2/g"
@mkarmona
mkarmona / debian-8-jessie-lenovo-x1-carbon-4th-gen.md
Created April 25, 2017 07:42 — forked from jjmalina/debian-8-jessie-lenovo-x1-carbon-4th-gen.md
Installing Debian 8.5 "jessie" on a Lenovo X1 Carbon 4th generation

Installing Debian 8.5 "jessie" on a Lenovo X1 Carbon 4th generation (20FB)

I've had my mind on switching my development machine from a 13" MacBook Pro Retina to a Lenovo X1 Carbon running Linux for a while. The main reason is getting more familiar with Linux itself and also to have a more stable and minimal dev environment. So I finally got the machine and decided to install Debian 8.5 "jessie". Why Debian? Well, I tried installing Arch Linux once and couldn't get past getting wifi to work, and Ubuntu seemed like it added too much stuff. The choice was either Debian or Linux Mint. I went with Debian because it seems like it's the most stable.

Create a bootable USB stick

I followed the instructions at https://www.debian.org/releases/jessie/amd64/ch04s03.html.en which explicitly say to not use unetbootin which is a tool that makes bootable USBs for you.

  1. Download the ISO image from the downloads page: `wget http://cdimage.debian.org/debian