From 44d2c3036d017c963238ebc1a598c7e3efe4907d Mon Sep 17 00:00:00 2001 From: ShinHeeEul <83682424+ShinHeeEul@users.noreply.github.com> Date: Thu, 27 Jun 2024 15:23:58 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=E2=9C=A8feat:=20get=5Fsimilar=5Fwords.py?= =?UTF-8?q?=20-=20similarity=20=ED=95=98=EB=93=9C=EC=BD=94=EB=94=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scripts/get_similar_words.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/scripts/get_similar_words.py b/src/scripts/get_similar_words.py index 300c534..1ab4021 100644 --- a/src/scripts/get_similar_words.py +++ b/src/scripts/get_similar_words.py @@ -42,11 +42,12 @@ model = Word2Vec.load('src/scripts/word2vec_model.model') results = [] - + shinhan = ['신한', '신한투자증권', 'SOL', '신한투자'] for index, row in df.iterrows(): # 각 행에 대해 반복 name = row['name'] code = row['code'] + try: similarity = model.wv.similarity(word, name) results.append({"name": name, "code": code, "similarity": similarity}) @@ -54,6 +55,11 @@ results.append({"name": name, "code": code, "similarity": 0}) + if word in shinhan: + for result in results: + if result["name"] == "신한지주": + result["similarity"] = 1 + results = sorted(results, key=lambda x: x['similarity'], reverse=True) for result in results: result['similarity'] = str(result['similarity']) From d87e5badef9850edec0eebe4961863cfa0af1bce Mon Sep 17 00:00:00 2001 From: ShinHeeEul <83682424+ShinHeeEul@users.noreply.github.com> Date: Thu, 27 Jun 2024 15:24:24 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=E2=99=BB=EF=B8=8Frefactor:=20instagram-new?= =?UTF-8?q?s=20-=20=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20=EC=BD=98?= =?UTF-8?q?=EC=86=94=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/instagram-news.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/routes/instagram-news.js b/src/routes/instagram-news.js index 81ff3a4..83a9dcb 100644 --- a/src/routes/instagram-news.js +++ b/src/routes/instagram-news.js @@ -19,7 +19,6 @@ const fetchData = async (url) => { thumbnail_url: null, url: `https://www.instagram.com/p/${post.postCode}`, })); - console.log(formattedData); return formattedData; } catch (error) { console.error(error); @@ -49,7 +48,6 @@ router.get("/", async (req, res) => { cache = await cacheController.getCache(keyword, social, 0); } posts = JSON.parse(cache.dataValues.data); - console.log("fff", posts); res.json(posts); } catch (err) { console.error("Error fetching Instagram posts:", err); From eb6c54bf5fc70878fc108a400784132328fa7aef Mon Sep 17 00:00:00 2001 From: ShinHeeEul <83682424+ShinHeeEul@users.noreply.github.com> Date: Thu, 27 Jun 2024 15:26:48 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E2=9C=A8feat:=20main.yml=20-CICD=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2ce104a..91214c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,6 +43,12 @@ jobs: echo "KIS_APP_KEY=${{ secrets.KIS_APP_KEY}}" >> .env echo "KIS_SECRECT_KEY=${{ secrets.KIS_SECRECT_KEY }}" >> .env echo "PORT=${{ secrets.PORT }}" >> .env + echo "INSTA_UID_KEY=${{ secrets.INSTA_UID_KEY }}" >> .env + echo "INSTA_KEY=${{ secrets.INSTA_KEY }}" >> .env + echo "NAVER_ID=${{ secrets.NAVER_ID }}" >> .env + echo "NAVER_SECRET=${{ secrets.NAVER_SECRET }}" >> .env + echo "YOUTUBE_KEY=${{ secrets.YOUTUBE_KEY }}" >> .env + echo "INSTA_IP=${{ secrets.INSTA_IP }}" >> .env # Build step removed since there is no build script