Skip to content

Instantly share code, notes, and snippets.

View muik's full-sized avatar
๐Ÿ 
Working from home

Ed Jeon (์ „๋ฌด์ต) muik

๐Ÿ 
Working from home
View GitHub Profile
@muik
muik / pingpong.py
Created July 21, 2016 16:25
Pingpong with some constraints
# 8ํผ์„ผํŠธ ๊ฐœ๋ฐœ ๋ฉด์ ‘๋ฌธ์ œ๋ฅผ ํ’€์–ด๋ณด์ž
# https://brunch.co.kr/@sunghokimnxag/5
#
# ํ•‘ํ ๊ฒŒ์ž„ (๋ฐ˜๋“œ์‹œ Python์œผ๋กœ ์ž‘์„ฑํ•  ๊ฒƒ)
# ์ผ๋ จ์˜ ์ˆซ์ž๊ฐ€ ์žˆ๊ณ , ์ด ์ˆซ์ž๋Š” 1์”ฉ ์ฆ๊ฐ€, ๋˜๋Š” ๊ฐ์†Œํ•œ๋‹ค. n๋ฒˆ์งธ์˜ ์ˆซ์ž๊ฐ€ ์žˆ์„ ์‹œ์—,
# ์ด ์ˆซ์ž๊ฐ€ 7์˜ ๋ฐฐ์ˆ˜(7, 14, 21,...)๊ฑฐ๋‚˜ 7์ด๋ž€ ์ˆซ์ž๋ฅผ ํฌํ•จํ•  ์‹œ์— (7, 17, 27,...) ๋ฐฉํ–ฅ์„ ๋ฐ”๊พผ๋‹ค.
# ์ฆ‰, 1, 2, 3, 4, 5, 6, [7], 6, 5, 4, 3, 2, 1, [0], 1, 2, [3], 2, 1, 0, [-1], 0, 1
# ๊ณผ ๊ฐ™์ด ์ˆซ์ž๋Š” ์ง„ํ–‰ํ•œ๋‹ค. (์ฒซ ๋ฒˆ์งธ 7์€ 7๋ฒˆ์งธ, ๋‘ ๋ฒˆ์งธ 0์€ 14๋ฒˆ์งธ, ์„ธ ๋ฒˆ์งธ 3์€ 17๋ฒˆ์งธ, ๋„ค ๋ฒˆ์งธ -1์€ 21๋ฒˆ์งธ)
# ๋‹ค์Œ์˜ ์ œ์•ฝ ํ•˜์— pingpong(x)์˜ ํ•จ์ˆ˜๋ฅผ ์ž‘์„ฑํ•˜๋ผ. ์˜ˆ์‹œ์˜ ์ธํ’‹๊ณผ ์•„์›ƒํ’‹์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.
# pingpong(8) = 6
@muik
muik / heatmaps.html
Last active August 29, 2015 14:14
Instagram Jeju tag Heatmaps
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Heatmaps</title>
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px
Hello