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
🌞 Morning 32 commits █▎░░░░░░░░░░░░░░░░░░░ 6.0%
🌆 Daytime 275 commits ██████████▊░░░░░░░░░░ 51.7%
🌃 Evening 160 commits ██████▎░░░░░░░░░░░░░░ 30.1%
🌙 Night 65 commits ██▌░░░░░░░░░░░░░░░░░░ 12.2%
@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 = []
@EeeasyCode
EeeasyCode / import_sys.py
Created January 2, 2023 07:09
Enhanced I/O
import sys
input = sys.stdin.readline
print = sys.stdout.write
# 기본적인 집합 초기화
S = set()
# 원소를 추가
S.add(i)
# 집합을 공집합으로 만들 경우
S.clear()
# remove 메소드도 있지만, 집합에 없는 수를 제거하려고 할 때, remove는 오류를 발생시키므로
@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,