From e7a0c57c123748fd55852a33ae1545ad0f9f3c67 Mon Sep 17 00:00:00 2001 From: randomkj <64251469+randomkj@users.noreply.github.com> Date: Thu, 9 Mar 2023 14:39:28 +0900 Subject: [PATCH 1/5] Create brc_test1 --- brc_test1 | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 brc_test1 diff --git a/brc_test1 b/brc_test1 new file mode 100644 index 0000000..b744beb --- /dev/null +++ b/brc_test1 @@ -0,0 +1,35 @@ +from random import randint +import time + +# 배열에 10,000개의 정수를 삽입 +array = [] +for _ in range(10000): + array.append(randint(1, 100)) # 1부터 100 사이의 랜덤한 정수 + +# 선택 정렬 프로그램 성능 측정 +start_time = time.time() + +# 선택 정렬 프로그램 소스코드 +for i in range(len(array)): + min_index = i # 가장 작은 원소의 인덱스 + for j in range(i + 1, len(array)): + if array[min_index] > array[j]: + min_index = j + array[i], array[min_index] = array[min_index], array[i] # 스와프 + +end_time = time.time() # 측정 종료 +print("선택 정렬 성능 측정:", end_time - start_time) # 수행 시간 출력 + +# 배열을 다시 무작위 데이터로 초기화 +array = [] +for _ in range(10000): + array.append(randint(1, 100)) # 1부터 100 사이의 랜덤한 정수 + +# 기본 정렬 라이브러리 성능 측정 +start_time = time.time() + +# 기본 정렬 라이브러리 사용 +array.sort() + +end_time = time.time() # 측정 종료 +print("기본 정렬 라이브러리 성능 측정:", end_time - start_time) # 수행 시간 출력 From 1331b44621da60926120762779fe6b98bacef1b0 Mon Sep 17 00:00:00 2001 From: fustat21 <127377746+fustat21@users.noreply.github.com> Date: Thu, 9 Mar 2023 14:55:28 +0900 Subject: [PATCH 2/5] Create fustat2.1_test_01 --- fustat2.1_test_01 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 fustat2.1_test_01 diff --git a/fustat2.1_test_01 b/fustat2.1_test_01 new file mode 100644 index 0000000..67449bc --- /dev/null +++ b/fustat2.1_test_01 @@ -0,0 +1,18 @@ +@@ -59,12 +59,12 @@ + now = q.popleft() + result.append(now) + # 해당 원소와 연결된 노드들의 진입차수에서 1 빼기 + for i in range(1, n + 1): + if graph[now][i]: + indegree[i] -= 1 + for j in range(1, n + 1): + if graph[now][j]: + indegree[j] -= 1 + # 새롭게 진입차수가 0이 되는 노드를 큐에 삽입 + if indegree[i] == 0: + q.append(i) + if indegree[j] == 0: + q.append(j) + + # 사이클이 발생하는 경우(일관성이 없는 경우) + if cycle: From e1b217b40510b38a7ad4d7cd32b07f824ec8d569 Mon Sep 17 00:00:00 2001 From: randomkj <64251469+randomkj@users.noreply.github.com> Date: Mon, 10 Apr 2023 14:55:15 +0900 Subject: [PATCH 3/5] Add files via upload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 네용 쓰는 듯한 방식입니다. 내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요. 여기까지 두줄 엔터입니다. 내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요. --- fustat23.py.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 fustat23.py.py diff --git a/fustat23.py.py b/fustat23.py.py new file mode 100644 index 0000000..099ccb6 --- /dev/null +++ b/fustat23.py.py @@ -0,0 +1,20 @@ +import csv + +file_name1 = "weather.csv" +file_name2 = "weather2.csv" +f1 = open(file_name1, "r", encoding="utf-8") +f2 = open(file_name2, "w", encoding="utf-8", newline="") + +lines = csv.reader(f1) +wr = csv.writer(f2) + +header = next(lines) + +for i in range(5) : + line = next(lines) + wr.writerow(line) + +print("파일쓰기 종료!") + +f1.close() +f2.close() From d91f1374ef7d17420907a17dc1c045bab52ec631 Mon Sep 17 00:00:00 2001 From: fustat21 <127377746+fustat21@users.noreply.github.com> Date: Wed, 12 Apr 2023 16:01:01 +0900 Subject: [PATCH 4/5] =?UTF-8?q?21=200421=20=EC=97=85=EB=A1=9C=EB=93=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 21 0421 업로드 21 0421 업로드 --- fustat21_0412.py.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 fustat21_0412.py.py diff --git a/fustat21_0412.py.py b/fustat21_0412.py.py new file mode 100644 index 0000000..099ccb6 --- /dev/null +++ b/fustat21_0412.py.py @@ -0,0 +1,20 @@ +import csv + +file_name1 = "weather.csv" +file_name2 = "weather2.csv" +f1 = open(file_name1, "r", encoding="utf-8") +f2 = open(file_name2, "w", encoding="utf-8", newline="") + +lines = csv.reader(f1) +wr = csv.writer(f2) + +header = next(lines) + +for i in range(5) : + line = next(lines) + wr.writerow(line) + +print("파일쓰기 종료!") + +f1.close() +f2.close() From 8102615bb9ad45f777417f1ef648d6090ed27121 Mon Sep 17 00:00:00 2001 From: fustat21 <127377746+fustat21@users.noreply.github.com> Date: Wed, 12 Apr 2023 16:04:50 +0900 Subject: [PATCH 5/5] Delete fustat21_0412.py.py --- fustat21_0412.py.py | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 fustat21_0412.py.py diff --git a/fustat21_0412.py.py b/fustat21_0412.py.py deleted file mode 100644 index 099ccb6..0000000 --- a/fustat21_0412.py.py +++ /dev/null @@ -1,20 +0,0 @@ -import csv - -file_name1 = "weather.csv" -file_name2 = "weather2.csv" -f1 = open(file_name1, "r", encoding="utf-8") -f2 = open(file_name2, "w", encoding="utf-8", newline="") - -lines = csv.reader(f1) -wr = csv.writer(f2) - -header = next(lines) - -for i in range(5) : - line = next(lines) - wr.writerow(line) - -print("파일쓰기 종료!") - -f1.close() -f2.close()