Skip to content

Instantly share code, notes, and snippets.

View Jongbhin's full-sized avatar

Jongbhin Park Jongbhin

  • SK Planet
  • Pangyo
View GitHub Profile
@Jongbhin
Jongbhin / python2_3.md
Created January 21, 2021 05:38
[python 2 to 3] #python
pip install modernize
python -m modernize -w *.py
@Jongbhin
Jongbhin / linux_performance.md
Created September 11, 2020 00:05
[Linux nw performance] #linux
watch -n 1 "netstat -nt | grep TIME_WAIT | wc -l"
cat /etc/sysctl.conf 

net.ipv4.tcp_tw_reuse = 1 으로 수정

@Jongbhin
Jongbhin / utils.py
Last active July 6, 2020 06:22
[Util functions with product] #python #11st #product #util
def get_prd_no(image_path):
prd_no = image_path.split('/')[-1].split('_')[0]
return prd_no
@Jongbhin
Jongbhin / slack.md
Created July 1, 2020 23:10
[Slack reference] #slack
@Jongbhin
Jongbhin / kafka.md
Last active July 6, 2020 23:58
[kafak reference] #kafka

Reference

session.timeout.ms

Install

wget https://www.apache.org/dyn/closer.cgi?path=/kafka/2.5.0/kafka_2.12-2.5.0.tgz
tar -xzf kafka_2.12-2.5.0.tgz
cd kafka_2.12-2.5.0
@Jongbhin
Jongbhin / delimiter.md
Last active June 22, 2020 08:14
[search delimeter] #delimiter

command line ctrl + v + k

vi ctrl + shift + kkk

@Jongbhin
Jongbhin / kafka_reference.md
Created June 19, 2020 02:17
[kafka] kafka reference

Zookeeper and Kafka start

nohup ./bin/zookeeper-server-start.sh ./config/zookeeper.properties &
nohup ./bin/kafka-server-start.sh ./config/server.properties &

Create a topic

./bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 20 --topic test
@Jongbhin
Jongbhin / img_test.py
Created April 26, 2020 23:21
[PIL open cv image open and convert to numpy array] #pil, #cv2, #numpy
# -*- coding:utf-8 -*-
import sys
import os
from tqdm import tqdm
import cv2
from collections import defaultdict
import numpy as np
from PIL import Image