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
  • 17:58 (UTC -04:00)
View GitHub Profile
@hisplan
hisplan / upgrade-gcc.sh
Created March 15, 2017 14:27
Upgrade gcc on Linux
wget https://ftp.gnu.org/gnu/gcc/gcc-6.3.0/gcc-6.3.0.tar.gz
cd gcc-6.3.0
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-6.3.0/configure --prefix=$HOME/gcc-6.3.0 --enable-languages=c,c++ --disable-multilib
make
make install
@hisplan
hisplan / how-to-cite-chatgpt.md
Created May 29, 2023 12:30
How to Cite ChatGPT
@hisplan
hisplan / ensembl-gtf-file-diffs.md
Last active April 12, 2023 16:34
Ensembl GTF file differences
@hisplan
hisplan / add-rsync-to-git-bash.md
Created February 21, 2018 09:02
Add rsync to git bash for windows
@hisplan
hisplan / wsl2-installation-incomplete.md
Last active March 10, 2023 15:04
WSL 2 installation is incomplete.

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
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
# 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

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
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

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