Skip to content

Instantly share code, notes, and snippets.

View EeeasyCode's full-sized avatar
🏠
Working from home

Khan / 이창민 EeeasyCode

🏠
Working from home
View GitHub Profile
@EeeasyCode
EeeasyCode / passport.custom.gaurd.ts
Created April 13, 2024 05:31
passport in nestjs use multiple strategy example
import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { PassportStrategy } from '@nestjs/passport';
import { Profile, Strategy } from 'passport-kakao';
export class KakaoProvider {
constructor(
public readonly clientID: string,
public readonly response_type: string,
public readonly clientSecret: string,
# 기본적인 μ§‘ν•© μ΄ˆκΈ°ν™”
S = set()
# μ›μ†Œλ₯Ό μΆ”κ°€
S.add(i)
# 집합을 κ³΅μ§‘ν•©μœΌλ‘œ λ§Œλ“€ 경우
S.clear()
# remove λ©”μ†Œλ“œλ„ μžˆμ§€λ§Œ, 집합에 μ—†λŠ” 수λ₯Ό μ œκ±°ν•˜λ €κ³  ν•  λ•Œ, removeλŠ” 였λ₯˜λ₯Ό λ°œμƒμ‹œν‚€λ―€λ‘œ
@EeeasyCode
EeeasyCode / import_sys.py
Created January 2, 2023 07:09
Enhanced I/O
import sys
input = sys.stdin.readline
print = sys.stdout.write
@EeeasyCode
EeeasyCode / prefix_sum.py
Last active January 2, 2023 07:08
ꡬ간합, λˆ„μ ν•© μ•Œκ³ λ¦¬μ¦˜
# κΈ°μ‘΄ λ°°μ—΄μ˜ 값을 μž…λ ₯λ°›λŠ”λ‹€.
n_arr = list(map(int, input().split()))
# λˆ„μ ν•© 배열을 μ΄ˆκΈ°ν™” ν•œλ‹€.
p_arr = [0]
# λˆ„μ ν•©μ„ ν•˜μ—¬ 배열에 값을 λ„£λŠ”λ‹€.
for i in n_arr:
p_arr.append(p_arr[-1] + i)
answers = []
🌞 Morning 32 commits β–ˆβ–Žβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 6.0%
πŸŒ† Daytime 275 commits β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Šβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 51.7%
πŸŒƒ Evening 160 commits β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 30.1%
πŸŒ™ Night 65 commits β–ˆβ–ˆβ–Œβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 12.2%