Skip to content

Instantly share code, notes, and snippets.

View hisplan's full-sized avatar
🎯
Focusing

Jaeyoung Chun hisplan

🎯
Focusing
  • Memorial Sloan Kettering Cancer Center
  • New York, NY
  • 20:45 (UTC -04:00)
View GitHub Profile
@hisplan
hisplan / install-pysam.md
Created July 29, 2019 19:38
Installing pysam on AWS Instance
conda create -n pysam python=3.6.5 pip

sudo yum install -y openssl-devel

wget https://github.com/pysam-developers/pysam/archive/v0.15.3.tar.gz
tar xvzf v0.15.3.tar.gz

cd pysam-0.15.3
@hisplan
hisplan / cleanup.sh
Created January 25, 2020 21:58
Resolve Docker no space left issue
docker rm $(docker ps -q -f 'status=exited')
docker rmi $(docker images -q -f "dangling=true")
docker volume rm $(docker volume ls -qf dangling=true)
@hisplan
hisplan / install-tree.sh
Created February 20, 2020 14:32
Install tree on Linux
#!/bin/bash -e
# http://mama.indstate.edu/users/ice/tree/
wget http://mama.indstate.edu/users/ice/tree/src/tree-1.8.0.tgz
tar xvzf tree-1.8.0.tgz
cd tree-1.8.0
make
make install prefix=$HOME
@hisplan
hisplan / install-htop.sh
Last active February 20, 2020 14:33
Install htop
#!/bin/bash -e
# http://hisham.hm/htop/
yum groupinstall "Development Tools"
yum install ncurses ncurses-devel
wget http://hisham.hm/htop/releases/2.0.2/htop-2.0.2.tar.gz
tar xvfvz htop-2.0.2.tar.gz
cd htop-2.0.2
@hisplan
hisplan / hgnc-rest-service-via-wget.md
Last active June 10, 2020 10:35
HGNC REST Service

HGNC REST Service

HGNC: Hugo Gene Nomenclature Committee

https://www.genenames.org/help/rest/

tl;dr;

  • fetch: returns all the fields, does not accept wild cards or multiple queries)
  • search: returns all possible entries with only the fields hgnc_id, symbol and score.
@hisplan
hisplan / resolving-conda-install-samtools.md
Created July 24, 2019 15:27
Resolving conda install samtools
conda install -c bioconda samtools=1.9=h8ee4bcc_1 openssl=1.0
@hisplan
hisplan / jupyter-notebook-wide-cell.md
Created March 15, 2019 21:25
jupyter notebook wide cell
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:95% !important; }</style>"))
@hisplan
hisplan / jupyter-notebook-on-aws.md
Last active November 13, 2021 10:59
Setting up Jupyter Notebook on AWS

Setting up Jupyter Notebook on AWS

Launch an AWS EC2 instance.

Install Miniconda:

wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh
bash Miniconda3-py38_4.10.3-Linux-x86_64.sh
@hisplan
hisplan / kafka-consumer.py
Created November 5, 2015 21:17
Python Kafka Consumer
from kafka import KafkaConsumer
# To consume messages
consumer = KafkaConsumer('my-topic',
group_id='my_group',
bootstrap_servers=['localhost:9092'])
for message in consumer:
# message value is raw byte string -- decode if necessary!
# e.g., for unicode: `message.value.decode('utf-8')`