Skip to content

Instantly share code, notes, and snippets.

View wookay's full-sized avatar
๐Ÿ“Ÿ
๊ฐ›๋‚ฒ๋‹ฝ๋ž”๋งŸ๋ฐช์ƒ์•—์žก์ฐธ์นผํƒ‡ํŒํ•™

WooKyoung Noh wookay

๐Ÿ“Ÿ
๊ฐ›๋‚ฒ๋‹ฝ๋ž”๋งŸ๋ฐช์ƒ์•—์žก์ฐธ์นผํƒ‡ํŒํ•™
View GitHub Profile
@wanbok
wanbok / CopyableLabel.swift
Last active May 23, 2017 03:39
Copyable UILabel
//
// CopyableLabel.swift
//
// Created by Wanbok Choi on 2016. 3. 17..
//
import UIKit
final class CopyableLabel: UILabel {
@jooyunghan
jooyunghan / monad-in-java.md
Last active November 17, 2023 04:54
ํ•œ๊ธ€๋ฒˆ์—ญ - Functor and monad examples in plain Java

Functor and monad examples in plain Java

์ด ๊ธ€์€ ์šฐ๋ฆฌ๊ฐ€ ์“ด ์ฑ…, 'Reactive Programming with RxJava' ์˜ ๋ถ€๋ก์ด์—ˆ๋‹ค. Reactive programming๊ณผ ๊ด€๋ จ์ด ๊นŠ์€ ์ฃผ์ œ๊ธด ํ•˜์ง€๋งŒ ๋ชจ๋‚˜๋“œ๋ฅผ ์†Œ๊ฐœํ•œ๋‹ค๋Š” ๊ฒŒ ์ฑ…๊ณผ ์ฉ ์–ด์šธ๋ฆฌ์ง€๋Š” ์•Š์•˜๋‹ค. ๊ทธ๋ž˜์„œ ๋‚˜๋Š” ๋”ฐ๋กœ ๋ธ”๋กœ๊ทธ์— ์˜ฌ๋ฆฌ๊ธฐ๋กœ ํ–ˆ๋‹ค. ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ๋‹ค๋ฃจ๋Š” ๋ธ”๋กœ๊ทธ์—์„œ *"๋ฐ˜์€ ๋งž๊ณ  ๋ฐ˜์€ ํ‹€๋ฆด ์ง€ ๋ชจ๋ฅด๋Š” ๋‚˜๋งŒ์˜ ๋ชจ๋‚˜๋“œ ์„ค๋ช…"*์ด๋ž€ ๊ฒƒ์ด ์ƒˆ๋กœ์šด *"Hello World"*๋ผ๋Š” ์ ์„ ๋‚˜๋„ ์ž˜ ์•ˆ๋‹ค. ํ•˜์ง€๋งŒ ์ด ๊ธ€์€ ํŽ‘ํ„ฐ(functor)์™€ ๋ชจ๋‚˜๋“œ(monad)๋ฅผ ์ž๋ฐ” ์ž๋ฃŒ ๊ตฌ์กฐ์™€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ผ๋Š” ๊ฐ๋„์—์„œ ๋ฐ”๋ผ๋ณด๊ณ  ์žˆ์œผ๋ฉฐ, ์ด๋Š” ๊ณต์œ ํ•  ์ •๋„์˜ ๊ฐ€์น˜๋Š” ์žˆ์„๊ฑฐ๋ผ ์ƒ๊ฐํ–ˆ๋‹ค.

import sys
from ctypes import *
from math import isfinite
'''
1) ์ˆ˜์‹์„ ํŒŒ์ด์ฌ ๋ฐ”์ดํŠธ์ฝ”๋“œ๋กœ ์ปดํŒŒ์ผ
์ˆ˜์‹์ด ๋ฐ”์ดํŠธ์ฝ”๋“œ๋กœ ์ปดํŒŒ์ผ ๋  ๋•Œ constant folding์ด ๋ผ์„œ ๋„ˆ๋ฌด ๊ฐ„๋‹จํ•ด์ ธ ๋ฒ„๋ฆฌ์ง€ ์•Š๋„๋ก ํ•จ
lineno table์—์„œ ์—ฐ์†๋œ ๋‘ ๋ฐ”์ดํŠธ์ฝ”๋“œ์˜ ์‹ค์ œ ์ฝ”๋“œ์ƒ ๋ผ์ธ ๋ฒˆํ˜ธ๊ฐ€ 255 ์ด์ƒ ์ฐจ์ด๋‚˜๋ฉด ์ตœ์ ํ™”ํ•˜์ง€ ์•Š๋Š” ๊ฒƒ์„ ์ด์šฉ
์ฐธ๊ณ : https://github.com/python/cpython/blob/e4091c77026088cb0611b6e896b1579805253f5b/Python/peephole.c#L403
anonymous
anonymous / 00comparison.diff
Created September 19, 2016 03:31
--- 0.5.0-rc4.summary 2016-09-18 23:28:56.830135058 -0400
+++ feb57e6109.summary 2016-09-18 23:28:37.318636959 -0400
@@ -73,3 +73,3 @@
BlossomV.json "tests_fail"
-BlsData.json "tests_fail"
+BlsData.json "tests_pass"
Bokeh.json "tests_fail"
@@ -247,3 +247,3 @@
DWARF.json "tests_pass"
-DynamicDiscreteModels.json "tests_pass"
using LibSndFile, Images, Colors
# Load and parse the viridis color scheme
viridis_data = "44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a9832
@SpaceManiac
SpaceManiac / hello.html
Created May 19, 2017 17:28
Hello World in raw WebAssembly
<meta charset="utf-8">
<script type="text/javascript" src="hello.js"></script>