Skip to content

Instantly share code, notes, and snippets.

View su79eu7k's full-sized avatar
๐ŸŽฏ
Focusing

su79eu7k su79eu7k

๐ŸŽฏ
Focusing
  • Seoul, Korea
View GitHub Profile
@LeoHeo
LeoHeo / var-let-const.md
Last active August 23, 2025 01:25
javascript var, let, const ์ฐจ์ด์ 

var, let, const ์ฐจ์ด์ ์€?

  • var๋Š” function-scoped์ด๊ณ , let, const๋Š” block-scoped์ž…๋‹ˆ๋‹ค.

  • function-scoped์™€ block-scoped๊ฐ€ ๋ฌด์Šจ๋ง์ด๋ƒ?

var(function-scoped)

jsfiddle ์ฐธ๊ณ ์ฃผ์†Œ

@satra
satra / distcorr.py
Created October 16, 2014 15:40
Distance Correlation in Python
from scipy.spatial.distance import pdist, squareform
import numpy as np
from numbapro import jit, float32
def distcorr(X, Y):
""" Compute the distance correlation function
>>> a = [1,2,3,4,5]
>>> b = np.array([1,2,9,4,4])
@hrldcpr
hrldcpr / tree.md
Last active June 19, 2025 08:17
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!