Skip to content

Instantly share code, notes, and snippets.

View JunsikChoi's full-sized avatar
🎯
Focusing

Jun JunsikChoi

🎯
Focusing
  • Seoul, Korea
  • 13:58 (UTC +09:00)
View GitHub Profile
@JunsikChoi
JunsikChoi / otp.svelte
Created December 15, 2023 05:42
svelte otp input
<script lang="ts">
const digitStyle =
'w-12 h-12 text-xl font-bold text-center text-gray-800 bg-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-opacity-50';
const handleKeyup = (e: KeyboardEvent) => {
const target = e.target as HTMLInputElement;
const next = target.dataset.next;
const previous = target.dataset.previous;
const value = target.value;
export const deliveryProviderList = [
{name: 'CJ대한통운', code: 04},
{name: '한진택배', code: 05},
{name: '롯데택배', code: 08},
{name: '우체국택배', code: 01},
{name: '로젠택배', code: 06},
{name: '일양로지스', code: 11},
{name: '한덱스', code: 20},
{name: '대신택배', code: 22},
{name: '경동택배', code: 23},
@JunsikChoi
JunsikChoi / kakao_auth.py
Created May 28, 2021 08:01
Kakao Social Login with Django
class KakaoAuth:
REST_API_KEY = KAKAO_REST_API_KEY
REDIRECTION_URI = API_HOST_ADDRESS + "/users/signin/kakao/callback"
OAUTH_API_ENDPOINT = "https://kauth.kakao.com/oauth"
AUTH_API_ENDPOINT = OAUTH_API_ENDPOINT + "/authorize"
TOKEN_API_ENDPOINT = OAUTH_API_ENDPOINT + "/token"
@classmethod
def get_auth_redirection_url(cls):
USER_NUMBER = 100
NEW_RATE = 0.05
SALE_RATE = 0.1
SOLDOUT_RATE = 0.03
SET_RATE = 0.01
PICKED_RATE = 0.05
PRICE_VOLATILITY = 0.03
LIKED_PRODUCT_RATIO = 0.15
MAX_LIKE_COUNT = 125
@JunsikChoi
JunsikChoi / Monoid-def.hs
Created March 20, 2020 01:57
Definition of Monoid in Haskell
class Semigroup a => Monoid a where
mempty :: m -- 항등원
mappend :: m -> m -> m -- 이항연산
mconcat :: [m] -> m
mconcat :: foldr mappend mempty
@JunsikChoi
JunsikChoi / SHELLEY_HOWTO.md
Created December 21, 2019 16:35 — forked from ilap/SHELLEY_HOWTO.md
UnOfficial Shelley Cconfig

Introduction

This is a not official recommendations for Linux based pool nodes. This, is my node's config which runs on Ubuntu 18.04.3 LTS (Bionic Beaver) server (/w Jormungandr v0.8.4) and does not have any issues at all, since the changes.

Before the change of the settings to these below, my node was struggling and missed almost all of the leaders' time due to the forks that caused by not having the latest tip/blocks.

After, I changed the settings, I have not missed any schedule for creating blocks.

Keybase proof

I hereby claim:

  • I am junsikchoi on github.
  • I am junsikchoi (https://keybase.io/junsikchoi) on keybase.
  • I have a public key ASAqvhSdIm9NuoGVrQfO0ktyEc07MI0iMNCi6UCFx0e-LQo

To claim this, I am signing this object:

@JunsikChoi
JunsikChoi / mri_histogram_matching.py
Created October 20, 2017 10:14
histogram_matching in slice-wise manner.
def hist_match(im_src, im_tar, n_bins):
# normalize both images
src_max = im_src.max()
im_src_n = min_max_norm(im_src)
im_tar_n = min_max_norm(im_tar)
# Get histogram
hist_src, bins = np.histogram(im_src_n.flatten(), n_bins)
hist_tar, bins = np.histogram(im_tar_n.flatten(), n_bins)
@JunsikChoi
JunsikChoi / tmux-cheatsheet.markdown
Created August 25, 2017 02:26 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: