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
  • 09:14 (UTC -05:00)
View GitHub Profile
@hisplan
hisplan / how-to-cite-chatgpt.md
Created May 29, 2023 12:30
How to Cite ChatGPT
View how-to-cite-chatgpt.md
@hisplan
hisplan / ensembl-gtf-file-diffs.md
Last active April 12, 2023 16:34
Ensembl GTF file differences
View ensembl-gtf-file-diffs.md
@hisplan
hisplan / add-rsync-to-git-bash.md
Created February 21, 2018 09:02
Add rsync to git bash for windows
View add-rsync-to-git-bash.md
@hisplan
hisplan / wsl2-installation-incomplete.md
Last active March 10, 2023 15:04
WSL 2 installation is incomplete.
View wsl2-installation-incomplete.md

Troubleshooting

WSL 2 installation is incomplete.

If you're getting the above error message while installing Docker on Windows, please follow the instructions below:

Press Windows logo key, type cmd, select Run as administrator to open a new terminal window.

@hisplan
hisplan / euc-kr-to-utf-8.sh
Created February 24, 2023 06:31
euc-kr to UTF-8
View euc-kr-to-utf-8.sh
iconv -c -f euc-kr -t utf-8 src.txt > dst.txt
@hisplan
hisplan / determine_python_32_or_64.py
Created December 6, 2022 06:41
Check if Python is running in 32-bit or 64-bit
View determine_python_32_or_64.py
# check if Python is running in 32-bit or 64-bit
#
# python -c "import struct;print(struct.calcsize('P')*8)"
#
import struct
# will return 32 for 32-bit, 64 for 64-bit
print(struct.calcsize("P") * 8)
@hisplan
hisplan / installing-samtools.md
Last active August 30, 2022 16:35
How to Install samtools on CentOS or Ubuntu
View installing-samtools.md

For CentOS

sudo yum group install "Development Tools"
sudo yum install ncurses-devel bzip2-devel xz-devel

cd /tmp
wget https://github.com/samtools/samtools/releases/download/1.9/samtools-1.9.tar.bz2
tar xvjf samtools-1.9.tar.bz2
cd samtools-1.9
@hisplan
hisplan / kafka-consumer.py
Created November 5, 2015 21:17
Python Kafka Consumer
View kafka-consumer.py
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')`
@hisplan
hisplan / jupyter-notebook-on-aws.md
Last active November 13, 2021 10:59
Setting up Jupyter Notebook on AWS
View jupyter-notebook-on-aws.md

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 / jupyter-notebook-wide-cell.md
Created March 15, 2019 21:25
jupyter notebook wide cell
View jupyter-notebook-wide-cell.md
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:95% !important; }</style>"))