Skip to main content

๐Ÿšฉ Github Console๋กœ Pull request ํ•˜๋Š” ๋ฒ•


Repo โ†’ Add file โ†’ Create new file

1

main์—๋‹ค๊ฐ€ โ€œcheck_stem.pyโ€œ โ†’ Commit changes

2 3

๊ทธ ์ดํ›„์— main โ†’ View all branches โ†’ New branch

4 5

New branch name โ€œtest_stemโ€ โ†’ Create new branch

6

๋‹ค์‹œ ๋ฉ”์ธ ํ™”๋ฉด์œผ๋กœ ๋Œ์•„๊ฐ€์„œ โ†’ Code โ†’ main โ†’ test_stem ํด๋ฆญ

7

check_stem.py ํด๋ฆญ โ†’ ์˜ค๋ฅธ์ชฝ์— ์žˆ๋Š” Edit this file ํด๋ฆญ

8

๋ฐ‘์— ์ œ๊ณต ๋œ ์ฝ”๋“œ ์ž‘์„ฑ โ†’ Commit changes โ†’ Commit changes

9

def word_count(file_path: str) -> dict:
"""
Count the frequency of each word in a file.
"""
counts = {}
with open(file_path, 'r') as f:
for line in f:
words = line.split()
for w in words:
word = w.lower()
counts[word] = counts.get(word, 0) + 1
return counts

์ด์ œ Pull requests โ†’ ์—์„œ ์ƒˆ๋กœ ์ƒ๊ธด Compare & pull request ์ด๋‚˜ New pull request ๋‘˜ ์ค‘์— ํ•˜๋‚˜ ์„ ํƒ

10

New pull request ๋ˆŒ๋ €์„ ๋•Œ โ†’ compare: main ํด๋ฆญ โ†’ test_stem ํด๋ฆญ โ†’ Create pull request โ†’ Create pull requests

11 12