Toggle navigation
Toggle navigation
This project
Loading...
Sign in
박하늘
/
stock_chatbot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Ubuntu
2021-06-07 17:23:59 +0000
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
95447879b10c47267ab0080cf0e460af595879e1
95447879
2 parents
3e5b407c
f1c2d34f
update files
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
7 deletions
server/app.js
server/basic.py
server/optimizer.py
server/app.js
View file @
9544787
This diff is collapsed. Click to expand it.
server/basic.py
View file @
9544787
...
...
@@ -10,7 +10,12 @@ def get_matches(query, choices, limit=3):
return
result
def
basicinform
(
input
):
<<<<<<<
HEAD
stocks
=
pd
.
read_csv
(
'stockcodename.csv'
,
index_col
=
0
)
=======
stocks
=
pd
.
read_csv
(
'stockcodename.csv'
,
names
=
[
'Symbol'
,
'Market'
,
'Name'
,
'Sector'
,
'Industry'
,
'ListingDate'
,
'SettleMonth'
,
'Represetitive'
,
'HomePage'
,
'Region'
],
index_col
=
0
)
>>>>>>>
f1c2d34f3272bc7cfebf6e887b72493185c4c57c
symbol
=
''
for
i
in
enumerate
(
stocks
.
Name
):
...
...
@@ -23,8 +28,8 @@ def basicinform(input):
cand
=
''
for
i
in
fuzzy
:
cand
+=
i
[
0
]
cand
+=
"
"
cand
+=
"중 찾는게 있으신가요?
\n
다시 입력해주세요."
cand
+=
"
\n
"
cand
+=
"중 찾는게 있으신가요? 다시 입력해주세요."
return
cand
df
=
fdr
.
DataReader
(
symbol
)
...
...
@@ -33,13 +38,22 @@ def basicinform(input):
price
=
df
.
Close
.
iloc
[
-
1
]
ror
=
ror_df
[
-
1
]
value
=
{
"현재가"
:
price
,
"거래랑"
:
volume
,
"전일 대비 수익률:"
:
ror
}
ror
=
round
(
ror
,
4
)
ror
=
ror
*
100
value
=
''
value
=
"1현재가: "
+
str
(
price
)
+
"원
\n
거래랑: "
+
str
(
volume
)
+
"건
\n
전일대비: "
+
str
(
ror
)
+
"
%
"
# value = {
# "현재가": price,
# "거래랑": volume,
# "전일 대비 수익률:": ror
# }
return
value
<<<<<<<
HEAD
=======
# print(basicinform('호텔신라'))
>>>>>>>
f1c2d34f3272bc7cfebf6e887b72493185c4c57c
args
=
sys
.
argv
print
(
basicinform
(
args
[
0
]))
...
...
server/optimizer.py
0 → 100644
View file @
9544787
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment