This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| import requests | |
| from bs4 import BeautifulSoup | |
| import pandas as pd | |
| # ์์ธ๋ํ๊ต ํฌ๊ท์งํ์ผํฐ ์งํ ์ฃผ์ | |
| # ex: ["https://raredisease.snuh.org/[์งํ๋ช ]"] | |
| SITE_URL_ARR = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # To write log format, see https://github.com/kitabisa/teler#configuration | |
| log_format: | | |
| $remote_addr - [$remote_addr] $remote_user - [$time_local] | |
| "$request_method $request_uri $request_protocol" $status $body_bytes_sent | |
| "$http_referer" "$http_user_agent" $request_length $request_time | |
| [$proxy_upstream_name] $upstream_addr $upstream_response_length $upstream_response_time $upstream_status $req_id | |
| rules: | |
| cache: true | |
| threat: | |
| excludes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ์ฝ๋ฐฑ ๋ฆฌ์ค๋ ์ค์ฒฉ ์ | |
| fun main() { | |
| val result = object : CallBack1 { | |
| override fun callBack(x1: String): CallBack2 { | |
| return object : CallBack2 { | |
| override fun callBack(x2: String): CallBack3 { | |
| return object : CallBack3 { | |
| override fun callBack(x3: String): CallBack4 { | |
| return object : CallBack4 { | |
| override fun callBack(x4: String): CallBack5 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun main(args: Array<String>) { | |
| // compose๋ฅผ ์ฌ์ฉํ์ง ์์ ํฉ์ฑ | |
| val powerOfTwo = { x: Int -> power(x.toDouble(), 2).toInt() } | |
| val gcdPowerOfTwo = { x1: Int, x2: Int -> gcd(powerOfTwo(x1), powerOfTwo(x2)) } | |
| println(gcdPowerOfTwo(25, 5)) // 25 ์ถ๋ ฅ | |
| // ์๋ชป๋ ํฉ์ฑ | |
| val curriedGcd1 = ::gcd.curried() | |
| val composedGcdPowerOfTwo1 = curriedGcd1 compose powerOfTwo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val absolute = { i: List<Int> -> i.map { it -> abs(it) } } | |
| val negative = { i: List<Int> -> i.map { it -> -it } } | |
| val minimun = { i: List<Int> -> i.min() } | |
| // compose๋ฅผ ์ฌ์ฉํ์ง ์๊ณ ๊ตฌํ | |
| val result1 = minimun(negative(absolute(listOf(3, -1, 5, -2, -4, 8, 14)))) | |
| println(result1) // -14 ์ถ๋ ฅ | |
| // compose๋ฅผ ์ฌ์ฉํ์ฌ ํ์ ์ ์ธ ์์ด ๊ตฌํ => ํฌ์ธํธ ํ๋ฆฌ ์คํ์ผ ํ๋ก๊ทธ๋๋ฐ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun main(args: Array<String>) { | |
| val addThree = { i: Int -> i + 3 } | |
| val twice = { i: Int -> i * 2 } | |
| val composedFunc = addThree compose twice | |
| println(composedFunc(3)) // 9 ์ถ๋ ฅ | |
| } | |
| infix fun <F, G, R> ((F) -> R).compose(g: (G) -> F): (G) -> R { | |
| return { gInput: G -> this(g(gInput))} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun main(args: Array<String>) { | |
| println(composed(3)) // 9 ์ถ๋ ฅ | |
| } | |
| fun composed(i: Int) = addThree(twice(i)) | |
| fun addThree(i: Int) = i + 3 | |
| fun twice(i: Int) = i * 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // curried, uncurried ํจ์ | |
| fun <P1, P2, P3, R> ((P1, P2, P3) -> R).curried(): (P1) -> (P2) -> (P3) -> R = | |
| {p1: P1 -> {p2: P2 -> {p3:P3 -> this(p1, p2, p3)}}} | |
| fun <P1, P2, P3, R> ((P1) -> (P2) -> (P3) -> R).uncurried(): (P1, P2, P3) -> R = | |
| {p1: P1, p2: P2, p3: P3 -> this(p1)(p2)(p3)} | |
| // curried, uncurried ํจ์ ์ฌ์ฉ ์์ | |
| fun main(args: Array<String>) { | |
| val multiThree = { a: Int, b: Int, c: Int -> a * b * c } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun multiThree(a: Int, b: Int, c: Int): Int = a * b * c | |
| // ์ปค๋ง ํจ์ | |
| fun multiThree(a: Int) = {b: Int -> {c: Int -> a * b * c } } | |
| fun main(args: Array<String>) { | |
| println(multiThree(1, 2, 3)) // 6 ์ถ๋ ฅ | |
| val partial1 = multiThree(1) | |
| val partial2 = partial1(2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const express = require('express'); | |
| const app = express(); | |
| app.use(express.json()); | |
| app.get('/', function (req, res) { | |
| console.log('headers', req.headers); | |
| console.log('req', req.body); | |
| }); | |
| app.listen(3000, function () { |
NewerOlder