Skip to content

Instantly share code, notes, and snippets.

View parksunwoo's full-sized avatar
🎣
Focusing

Sunwoo Park parksunwoo

🎣
Focusing
View GitHub Profile
@parksunwoo
parksunwoo / openai-chatgpt-dalle-slack-bot-python.py
Last active February 13, 2023 14:12
openai-chatgpt-dalle-slack-bot-python.py
import logging
import openai
import requests
from django.http import JsonResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework import status
from rest_framework.decorators import api_view, permission_classes
from rest_framework.permissions import AllowAny
@parksunwoo
parksunwoo / ms_teams_webhook_notification_with_table.py
Created May 3, 2022 22:43
ms_teams_webhook_notification_with_table_python
import os
from datetime import timedelta
import logging
import json
import urllib3
from django.core.management.base import BaseCommand
from django.utils import timezone
from core.models import NodeProgrs, NodeSchedule, User
@parksunwoo
parksunwoo / environment.yml
Created January 17, 2020 03:19
lecture1_code_test
channels:
- defaults
dependencies:
- ipython
- ipywidgets
- matplotlib
- numpy
- scipy
@parksunwoo
parksunwoo / show_attend_tell_model.py
Last active December 25, 2018 06:56
show_attend_tell_model
'''
Source code for an attention based image caption generation system described
in:
Show, Attend and Tell: Neural Image Caption Generation with Visual Attention
International Conference for Machine Learning (2015)
http://arxiv.org/abs/1502.03044
'''
import torch
import torch.nn as nn
@parksunwoo
parksunwoo / QA_baseline_ko.py
Last active December 8, 2018 03:21
QA_baseline_ko
##!pip3 install textrankr
# Step1. 문서요약으로 중요문장 찾기 (여기선 3문장)
from __future__ import print_function
from textrankr import TextRank
f = open("wiki/chosun.txt", 'r')
data = f.read()
textrank = TextRank(data)
@parksunwoo
parksunwoo / QA_baseline.py
Created December 8, 2018 03:09
QA_baseline
##!pip3 install summa
#Step1. textrank를 활용 문서에서 중요문장 추출
from summa.summarizer import summarize
f = open("wiki_en/chosun.txt", 'r')
data = f.read()
summary = summarize(data, ratio=0.2)
f = open("wiki_en/chosun_min.txt", "w")
@parksunwoo
parksunwoo / ConvexHull.java
Last active November 10, 2018 11:25
convexHull_grahamScan_java
package ssw;
import java.util.*;
/**
* Created by sunu.park on 2018. 11. 10.
*/
class Point{
int x, y;
@parksunwoo
parksunwoo / supplement_preprocessing.ipynb
Created August 23, 2018 11:38
supplement_preprocessing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@parksunwoo
parksunwoo / basic_encoding_code.ipynb
Created August 8, 2018 02:05
basic encoding code
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.