Skip to content

Instantly share code, notes, and snippets.

View therne's full-sized avatar
🎯
Focusing

Jun Kim therne

🎯
Focusing
View GitHub Profile
@therne
therne / chainlink-vrf-experiment.md
Created March 15, 2022 02:56
Testing Chainlink VRF on Polygon Blockchain
#!/bin/bash
aws ecr describe-repositories --repository-names $1 > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo Creating $1
aws ecr create-repository --repository-name $1
fi
@therne
therne / airbloc-token-economy.md
Created June 10, 2018 18:01
Airbloc의 토큰 이코노미에 λŒ€ν•œ μ„€λͺ…, 그리고 ν•„μš”μ„± 정리

Why Token Economy?

μ™œ μš°λ¦¬κ°€ 토큰 이코노미λ₯Ό κ³ λ―Όν•΄μ•Ό ν• κΉŒμš”? 토큰 μ΄μ½”λ…Έλ―ΈλŠ” μ–΄λ–€ 것이고, μ™œ κ³ λ €ν•΄μ•Ό ν•˜λŠ” κ²ƒμΈκ°€μš”?

References

νƒˆμ€‘μ•™ν™”λœ μ‹œμŠ€ν…œμ€ μ€‘μ•™ν™”λœ μ‹œμŠ€ν…œμ²˜λŸΌ μ€‘κ°„μ—μ„œ μ€‘μž¬ν•΄μ€„ μ€‘μž¬μžκ°€ μ—†κ³  μ—΄λ¦° ν™˜κ²½μ„ κ°€μ§€κ³  있기 λ•Œλ¬Έμ—, κ²½μ œν•™μ μΈ μΈμ„Όν‹°λΈŒ / νŒ¨λ„ν‹°λ₯Ό 톡해 μ‹œμŠ€ν…œμ΄ μ˜¬λ°”λ₯΄κ²Œ μž‘λ™ν•˜λ„λ‘ μ°Έμ—¬μžλ“€μ˜ 행동을 섀계해야 ν•©λ‹ˆλ‹€. 뿐만 μ•„λ‹ˆλΌ, μ°Έμ—¬μžλ“€μ΄ 이읡을 μ–»κΈ° μœ„ν•΄ 토큰 자체의 μˆ˜μš”μ™€ 곡급을 ν†΅ν•œ 가격 μ‘°μ • λ˜ν•œ κ³ λ―Όν•΄μ•Ό ν•©λ‹ˆλ‹€.

@therne
therne / Airbloc Technical Whitepaper 2.md
Last active March 23, 2018 08:17
κΈ°μˆ λ°±μ„œ μ΄ˆμ•ˆ

Airbloc Technical Whitepaper

Candidate 1 First published on March 23, 2018.

μš”μ•½ : 에어블둝은 νƒˆμ€‘μ•™ν™”λœ κ΄‘κ³  데이터 거래 λ„€νŠΈμ›Œν¬μž…λ‹ˆλ‹€. 에어블둝을 톡해 μˆ˜μ§‘μžκ°€ 개인 μ‚¬μš©μžμ—κ²Œμ„œ DAuthλ₯Ό 톡해 λ™μ˜ν•œ κ°„μ ‘ 데이터λ₯Ό μˆ˜μ§‘ν•˜κ±°λ‚˜, 데이터 μΊ νŽ˜μΈμ„ 톡해 μ‚¬μš©μžμ˜ 관심사λ₯Ό 직접 μ§ˆλ¬Έν•˜λŠ” λ°©μ‹μœΌλ‘œ 직접 데이터λ₯Ό μˆ˜μ§‘ν•©λ‹ˆλ‹€. μ΄λ ‡κ²Œ μˆ˜μ§‘λœ λ°μ΄ν„°λŠ” κ°€κ³΅μžλ₯Ό 톡해 관심 λ°μ΄ν„°μ˜ ν˜•νƒœλ‘œ κ°€κ³΅λ˜μ–΄ κ΄‘κ³ μ£Όμ—κ²Œ 판맀되게 되며, 개인 μ‚¬μš©μžμ—κ²Œ 보상이 μ§€κΈ‰λ©λ‹ˆλ‹€. 개인 μ‚¬μš©μžλŠ” 데이터에 λŒ€ν•œ μ •λ‹Ήν•œ 보상 뿐만이 μ•„λ‹ˆλΌ ν†΅μ œκΆŒκΉŒμ§€ μ–»κ²Œ λ˜μ–΄ 데이터에 λŒ€ν•œ μ£ΌκΆŒμ„ κ°€μ§ˆ 수 있고, μ•±μ‚¬λŠ” μ •λ‹Ήν•˜κ²Œ μˆ˜μ§‘ν•œ 데이터λ₯Ό μˆ˜μ΅ν™”ν•΄ μ‚¬μš©μžμ™€ 보상을 λ‚˜λˆ κ°€μ§ˆ 수 있고, κ΄‘κ³ μ£ΌλŠ” κ°œμΈμ— λŒ€ν•œ μ •ν™•ν•œ 관심 데이터λ₯Ό 톡해 κ³ ν’ˆμ§ˆμ˜ νƒ€κ²ŸνŒ… κ΄‘κ³ λ₯Ό μ§‘ν–‰ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

Copyright Β© 2018 Airbloc Foundation. All rights are reserved.

Without permission, anyone may use, reproduce or distribute any material in this paper for non-commercial and educational use (i.e., other than for a fee or for commercial purposes) provided that the original source and the applicable copyright notice are cited.

@therne
therne / word-sphere.js
Last active April 20, 2021 02:30
WordSphere - A rotating sphere of words. (NOTE: fuck IE support)
/**
* WordSphere
* Written by Hyojun Kim in 2017. Licensed in MIT.
*/
function wordSphere(canvas, texts, counts, options) {
const Ο€ = Math.PI; // happy math!
const {
width = 500,
height = 500,
radius = 150,
@therne
therne / dataset.py
Created July 9, 2016 13:31
Batch data loader for minibatch training
import copy
import numpy as np
class DataSet:
def __init__(self, data, batch_size=1, shuffle=True, name="dataset"):
assert batch_size <= len(data), "batch size cannot be greater than data size."
self.name = name
self.data = data
self.batch_size = batch_size
self.shuffle = shuffle
@therne
therne / 1. Type Checking.md
Last active March 23, 2018 06:56
20160313 μ–Έμ–΄λ‘  μŠ€ν„°λ”” 자료 (Lecture 4-2)

Type and Type Checking

였늘의 PPT 자료 링크

Type

μ •μ˜ : μ–΄λ– ν•œ ν•­ (Term)에 λŒ€ν•΄μ„œ, κ·Έ 항은 νƒ€μž…μ„ κ°€μ§€κ³  있고 κ·Έ ν•­μ˜ μž…λ ₯κ³Ό κ²°κ³ΌλŠ” κ·Έ νƒ€μž…μœΌλ‘œ μ œν•œλœλ‹€.
ν‘œκΈ° M : A λŠ”, M이 AλΌλŠ” νƒ€μž…μ„ κ°€μ§€κ³  μžˆλ‹€λŠ” μ˜λ―Έμ΄λ‹€.

예λ₯Ό λ“€μ–΄, Integer ListλΌλŠ” νƒ€μž…μ€ λ‹€μŒκ³Ό 같이 κ·€λ‚©μ μœΌλ‘œ μ •μ˜ν•  수 μžˆλ‹€ : type IntList = Empty | Int ** IntList.

@therne
therne / kNN.md
Last active March 18, 2016 02:02

k-NN Algorithm

k-NN (k-Nearest Neighbors) μ•Œκ³ λ¦¬μ¦˜μ€ 지도 ν•™μŠ΅ μ•Œκ³ λ¦¬μ¦˜μ˜ μΌμ’…μœΌλ‘œ, 이미 νŠΉμ •ν•œ ν•­λͺ© (라벨)둜 λΆ„λ₯˜λ˜μ–΄ μžˆλŠ” 데이터듀을 κ°€μ§€κ³  아직 λΆ„λ₯˜λ˜μ§€ μ•Šμ€ μƒˆλ‘œμš΄ 데이터λ₯Ό μžλ™μœΌλ‘œ λΆ„λ₯˜ν•˜λŠ” μ•Œκ³ λ¦¬μ¦˜μ΄λ‹€.

Regression ? Classification?

이 μ•Œκ³ λ¦¬μ¦˜μ€ νšŒκ·€ (Regression)λ³΄λ‹€λŠ” λΆ„λ₯˜ (Classification)라고 λ³Ό 수 μžˆλ‹€. νšŒκ·€μ˜ κ²½μš°μ—λŠ” μ—°μ†λœ 데이터에 κ΄€ν•΄μ„œ λ‹€μŒ λ°μ΄ν„°μ˜ 값을 μ˜ˆμΈ‘ν•˜κ³ , λ”°λΌμ„œ 예츑 κ²°κ³ΌλŠ” μ—°μ†λ³€μˆ˜ (continuous variable)이 될 것이닀. ν•˜μ§€λ§Œ 이 κ²½μš°μ—λŠ” λΆˆμ—°μ†μ μΈ λ°μ΄ν„°λ“€μ˜ 집합에 λŒ€ν•΄μ„œ λΆ„λ₯˜λ₯Ό μˆ˜ν–‰ν•˜κ³ , 예츑 κ²°κ³ΌλŠ” μΉ΄ν…Œκ³ λ¦¬ 라벨이 될 κ²ƒμ΄λ―€λ‘œ λΆ„λ₯˜κ°€ μ ν•©ν•˜λ‹€.

(ν—ˆλ‚˜ νšŒκ·€ μ•Œκ³ λ¦¬μ¦˜κ³Ό λΆ„λ₯˜ μ•Œκ³ λ¦¬μ¦˜μ€ μ™„μ „νžˆ μš©λ„κ°€ κ΅¬λ³„λœ 것이 μ•„λ‹ˆλ‹€. 예λ₯Ό λ“€μ–΄ μ„ ν˜•νšŒκ·€λ₯Ό μ΄μš©ν•΄ 경계면을 λ§Œλ“œλŠ” λ°©μ‹μœΌλ‘œ λΆ„λ₯˜λ₯Ό ν•  μˆ˜λ„ 있고, k-NN을 μ΄μš©ν•΄ νšŒκ·€λ₯Ό ν•  μˆ˜λ„ μžˆλ‹€.)

κ°„λ‹¨ν•œ 이둠적 원리

@therne
therne / GeneratorFunctionBuilder.js
Last active August 29, 2015 14:26
GeneratorFunctionBuilder - Builds new generator function with code.
'use strict';
var util = require('util');
var GeneratorFunction = (function*(){}).constructor;
module.exports = GeneratorFunctionBuilder;
/**
* Builds new generator function with code.
*/