Skip to content

Instantly share code, notes, and snippets.

View elipapa's full-sized avatar

Eliseo Papa elipapa

View GitHub Profile
{
"basics": {
"name": "Eliseo Papa",
"label": "Director AI Engineering at AstraZeneca",
"picture": "",
"email": "elipapa@noreply.users.github.com",
"phone": "",
"website": "",
"summary": "I trained as a biomedical engineer and then as a clinician. Now I use my background to connect the dots between medicine and engineering. I work on building AI and data science product that can speed up the drug development process and bring medicines in the hands of patients faster.",
"location": {
@elipapa
elipapa / recsys intro resources.md
Created April 17, 2019 12:45
recsys intro resources
@elipapa
elipapa / get_efo_labels.py
Created August 6, 2018 13:00
create a EFO code <=> labels mapping file
# pip install ontoma
from ontoma.interface import OnToma
ot = OnToma()
# the following will download the latest EFO OBO file from github
# and output a tab separated files of labels <=> codes to a file
for k,v in ot.efo_to_name.items():
print(k,v,file=open('efolabel.txt','a'),sep="\t")
@elipapa
elipapa / ensemblmysql2JSON.py
Created May 8, 2018 15:56
Build a JSON lookup table for all genes in ensembl
'''
standalone script to create a genes JSON object.
'''
#!/usr/bin/env python3
import os
import time
import pandas as pd
from sqlalchemy import create_engine
apiVersion: v1
kind: Service
metadata:
name: apiproxysvc-node
labels:
name: apiproxysvc-node
spec:
type: NodePort
ports:
- name: http
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: apiproxy-eu
spec:
replicas: 1
template:
metadata:
labels:
name: apiproxy-eu
@elipapa
elipapa / .bashrc
Last active November 28, 2017 15:47
# Sensible Bash - An attempt at saner Bash defaults
# Repository: https://github.com/mrzool/bash-sensible
## GENERAL OPTIONS ##
set -o noclobber
shopt -s checkwinsize
PROMPT_DIRTRIM=2
bind Space:magic-space
shopt -s globstar 2> /dev/null
shopt -s nocaseglob;
@elipapa
elipapa / register_http_repo.sh
Created September 11, 2017 11:02
restore open targets elasticsearch public snapshots
#!/usr/bin/env bash
# assuming your ES is at http://localhost:9200
# set all existing indices to 0 replicas
curl -XPUT "http://localhost:9200/_settings" --data '{"index":{"number_of_replicas": 0}}'
# set marvel index to default 0 replicas
curl -XPUT "http://localhost:9200/_template/custom_marvel" --data '{
"template": ".marvel*",
@elipapa
elipapa / .tmux.conf
Last active May 15, 2017 21:26 — forked from subfuzion/.tmux.conf
My .tmux.conf for tmux 2.1 (with fixes for mouse breakage)
# Inspirations:
# http://mutelight.org/practical-tmux
# http://zanshin.net/2013/09/05/my-tmux-configuration/
# http://files.floriancrouzat.net/dotfiles/.tmux.conf
# http://stackoverflow.com/questions/9628435/tmux-status-bar-configuration
# https://github.com/Lokaltog/powerline
# https://github.com/remiprev/teamocil
# http://superuser.com/questions/74492/whats-the-best-prefix-escape-sequence-for-screen-or-tmux
# http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiplexer-part-2/
#
@elipapa
elipapa / preemtible_kubernetes.md
Created October 14, 2016 21:34 — forked from tsuri/preemtible_kubernetes.md
kubernetes cluster w/ pre-emptible instances

Kubernetes clusters using preemtible instances

Motivation

People experimenting with kubernetes clusters on the GKE not necessarily have money to keep a full cluster on at all time. GKE clusters can be easily resized, but this still incurs in the full instance cost when the cluster is up.

Google has added preemptible instances that are ideal for many