Skip to content

Instantly share code, notes, and snippets.

View JungTag's full-sized avatar

JungTag JungTag

View GitHub Profile
@JungTag
JungTag / semantic-commit-messages.md
Created February 27, 2023 15:30 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@JungTag
JungTag / 메뉴 리뉴얼_영택.py
Created November 17, 2021 14:29
메뉴 리뉴얼_영택
from itertools import combinations
from collections import defaultdict
def solution(orders, course):
answer = []
max_set = defaultdict(int) # {len: cnt}
course_dict = defaultdict(int)
for order in orders:
order = ''.join(sorted(order))
@JungTag
JungTag / 거리두기 확인하기_영택.py
Created November 3, 2021 14:47
거리두기 확인하기_영택
# https://programmers.co.kr/learn/courses/30/lessons/81302
from collections import defaultdict, deque
def solution(places):
SIZE = 5
answer = []
for place in places:
graph = place
@JungTag
JungTag / 다단계 칫솔 판매_영택.py
Created October 5, 2021 14:19
다단계 칫솔 판매_영택
# https://programmers.co.kr/learn/courses/30/lessons/77486
def solution(enroll, referral, seller, amount):
PRICE_OF_TOOTHBRUSH = 100
ANCESTOR_PROFIT_RATIO = 0.1
answer = []
parent_dict = dict(zip(enroll, referral))
profit_dict = {key: 0 for key in enroll}
@JungTag
JungTag / 6주차_복서정렬하기_영택.py
Created October 4, 2021 11:57
6주차_복서정렬하기 - 영택
# https://programmers.co.kr/learn/courses/30/lessons/85002
def solution(weights, head2head):
answer = []
record_list = get_record_list(weights, head2head)
record_list.sort(key = lambda x: (-x[0], -x[1], -x[2], x[3]))
answer = [record[3]+1 for record in record_list]
return answer
@JungTag
JungTag / 5주차_모음사전_영택.py
Created October 4, 2021 11:50
5주차_모음사전 - 영택
# https://programmers.co.kr/learn/courses/30/lessons/84512
import sys
sys.setrecursionlimit(10**6)
def solution(word):
global cnt
global answer
answer = 0
@JungTag
JungTag / 추석 트래픽 - 영택
Last active September 29, 2021 16:52
추석 트래픽 - 영택
from collections import defaultdict
def parse_to_sec(line):
T = 60
splitted_line = line.split(' ')
required_time = float(splitted_line[2][:-1])
h, m, s = splitted_line[1].split(':')
end = int(h) * T ** 2 + int(m) * T + float(s)
start = round(end - required_time + 0.001, 3)
@JungTag
JungTag / nvm_quick_start.md
Created April 6, 2021 01:04 — forked from falsy/nvm_quick_start.md
NVM(Node Version Manager) 맥OS에서 설치 & 사용하기

NVM(Node Version Manager) Quick Start

맥OS에서 NVM 사용하기

NVM 설치

1. 설치

$ sudo curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash