1
const body = [
{
role: "system",
content:
"You are an assisstant in the position of a pastor advising a congregation.",
},
{
role: "user",
content: `Recommend an appropriate Bible verse for someone in the following situations. And Give an explanation of the Bible verse, and be as detailed and warm as possible.
And Write a message of encouragement.
SITUATION: ${situation}.
- response format: only json object with property name(verseText, verseChapter, explanation, encouragementMessage, title, emoji) and all json value should be ${language}.
- title is summary of content less than 20 characters.
- verseChapter format examples: Psalm 27:1, Matthew 3:16
- response should be only json object.
- Do not append another text.
- encourageMessage: Don't start with a greeting like My dear friend.
- write verseText with only text do not append chapter info.
- verseChapter property should be included in json object.
- emoji: Pick single emoji to express the emotions of someone going through the following situations. Don't pick 🙏. SITUATION: ${situation}.
- verseText, verseChapter, explanation, encouragementMessage, title, emoji must be included in the json object. Don't miss`,
},
];
시작
컴퓨터학부 졸업생으로 개발자 인생을 살다가
우여곡절 끝에 AI/데이터 세계에 입문한지 5년차에 접어들때쯤
이쪽 분야에 합격률 3%라는 간지 시험이 있다고 해서 찾아봄
NPV
1개년 50억, 2개년 60억, 3개년 70억의 예산을 가지고 NPV(순현재가치)가 가장 높아지는 안을 제시하시오
1개년
2개년
3개년
1안
10
20
15
2안
15
14
19
3안
12
11
30
4안
13
25
20
5안
16
30
24
from itertools import combinations
import pandas as pd
investment_df = pd.DataFrame([[10, 20, 15],
[15, 14, 19],
[12, 11, 30],
[13, 25, 20],
[16, 30, 24]], index=[1, 2, 3, 4, 5], columns=['yr1', 'yr2', 'yr3'])
investment_df
yr1
yr2
yr3
1
10
20
15
2
15
14
19
3
12
11
30
4
13
25
20
5
16
30
24
items = [1, 2, 3, 4, 5]
combination_list = list(combinations(items, 2))+list(combinations(items, 3))
result_df = pd.DataFrame()
for c in combination_list:
temp_df = pd.DataFrame()
for item in items:
if item in c:
temp_df = pd.concat([temp_df, investment_df.loc[item]], axis=1)
result_df = pd.concat([result_df, temp_df.sum(axis=1)], axis=1)
result_df.columns = combination_list
df_t = result_df.T
df_t = df_t[(df_t['yr1'] < 50) & (df_t['yr2'] < 60) & (df_t['yr3'] < 70)]
df_t['total'] = df_t.sum(axis=1)
df_t.sort_values(by='total', ascending=False)
yr1
yr2
yr3
total
(2, 3, 4)
40
50
69
159
(1, 3, 4)
35
56
65
156
(1, 2, 4)
38
59
54
151
(1, 2, 3)
37
45
64
146
(4, 5)
29
55
44
128
(3, 5)
28
41
54
123
(2, 5)
31
44
43
118
(1, 5)
26
50
39
115
(3, 4)
25
36
50
111
(2, 4)
28
39
39
106
(1, 4)
23
45
35
103
(2, 3)
27
25
49
101
(1, 3)
22
31
45
98
(1, 2)
25
34
34
93
쎄타 구하는 문제
import math
#빗변 외 입력 받음
AB, BC = int(input()), int(input())
#빗변 구하기
AC = math.hypot(AB, BC)
#역코사인 함수로 쎄타값 구하기(∠MBC = ∠ACB)
dACB = math.acos(BC/AC)
dACB = round(math.degrees(dACB)) #각도값으로 환산
print(f'{dACB}{chr(176)}')
자꾸 까먹어서 공식홈 튜토리얼 보고 그냥 따라쳤다.