Showing
105 changed files
with
122 additions
and
36 deletions
| 1 | +{ | ||
| 2 | + "cells": [ | ||
| 3 | + { | ||
| 4 | + "cell_type": "code", | ||
| 5 | + "execution_count": 6, | ||
| 6 | + "metadata": {}, | ||
| 7 | + "outputs": [ | ||
| 8 | + { | ||
| 9 | + "ename": "ModuleNotFoundError", | ||
| 10 | + "evalue": "No module named 'cv2'", | ||
| 11 | + "output_type": "error", | ||
| 12 | + "traceback": [ | ||
| 13 | + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", | ||
| 14 | + "\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", | ||
| 15 | + "\u001b[1;32m<ipython-input-6-c9d5b88864a0>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;32mimport\u001b[0m \u001b[0mcv2\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mos\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mPIL\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mImage\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n", | ||
| 16 | + "\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'cv2'" | ||
| 17 | + ] | ||
| 18 | + } | ||
| 19 | + ], | ||
| 20 | + "source": [ | ||
| 21 | + "import cv2\n", | ||
| 22 | + "import os\n", | ||
| 23 | + "import numpy as np\n", | ||
| 24 | + "from PIL import Image\n", | ||
| 25 | + " \n", | ||
| 26 | + "path = 'Kang'\n", | ||
| 27 | + "imagePaths = [os.path.join(path,file_name) for file_name in os.listdir(path)]\n", | ||
| 28 | + "for imagePath in imagePaths:\n", | ||
| 29 | + " img = Image.open(imagePath).convert('L')\n", | ||
| 30 | + " img_numpy = np.array(img, 'uint8')\n", | ||
| 31 | + " cv2.imwrite(\"Kang\\\\\" + imagePath.split(\"\\\\\")[-1], img_numpy)\n", | ||
| 32 | + "print(\"All Done\")" | ||
| 33 | + ] | ||
| 34 | + }, | ||
| 35 | + { | ||
| 36 | + "cell_type": "code", | ||
| 37 | + "execution_count": null, | ||
| 38 | + "metadata": {}, | ||
| 39 | + "outputs": [], | ||
| 40 | + "source": [] | ||
| 41 | + } | ||
| 42 | + ], | ||
| 43 | + "metadata": { | ||
| 44 | + "kernelspec": { | ||
| 45 | + "display_name": "Python 3", | ||
| 46 | + "language": "python", | ||
| 47 | + "name": "python3" | ||
| 48 | + }, | ||
| 49 | + "language_info": { | ||
| 50 | + "codemirror_mode": { | ||
| 51 | + "name": "ipython", | ||
| 52 | + "version": 3 | ||
| 53 | + }, | ||
| 54 | + "file_extension": ".py", | ||
| 55 | + "mimetype": "text/x-python", | ||
| 56 | + "name": "python", | ||
| 57 | + "nbconvert_exporter": "python", | ||
| 58 | + "pygments_lexer": "ipython3", | ||
| 59 | + "version": "3.7.1" | ||
| 60 | + } | ||
| 61 | + }, | ||
| 62 | + "nbformat": 4, | ||
| 63 | + "nbformat_minor": 2 | ||
| 64 | +} |
favicon.ico
0 → 100644
No preview for this file type
21.6 KB
103 KB
26.3 KB
69.8 KB
19.3 KB
105 KB
78.4 KB
110 KB
3.22 KB
3.82 KB
2.99 KB
4.08 KB
4.08 KB
17.7 KB
2.98 KB
2.17 KB
10.6 KB
10.6 KB
14.7 KB
54 KB
31.3 KB
61.7 KB
117 KB
23 KB
118 KB
198 KB
39.5 KB
986 KB
20.9 KB
55 KB
24 KB
48.9 KB
31 KB
58.8 KB
14.1 KB
22.1 KB
15.1 KB
2.65 KB
11.9 KB
18.2 KB
8.52 KB
13.2 KB
21.9 KB
13.9 KB
33.7 KB
57.7 KB
14.5 KB
6.29 KB
27 KB
9 KB
93.1 KB
17.2 KB
30.5 KB
34.6 KB
9.04 KB
35.7 KB
8.93 KB
49.9 KB
82.1 KB
26.6 KB
37.2 KB
7.83 KB
16 KB
37.8 KB
41.7 KB
33.2 KB
34.2 KB
39.7 KB
53.4 KB
86.9 KB
13.1 KB
28.4 KB
7.41 KB
61.6 KB
7.14 KB
15.5 KB
46.7 KB
15.7 KB
9.8 KB
74.6 KB
22.6 KB
1.71 KB
8.29 KB
7.46 KB
13 KB
4.72 KB
45.1 KB
16.4 KB
45.1 KB
12.4 KB
7.79 KB
10.6 KB
24.2 KB
26.4 KB
6.52 KB
44.4 KB
7.16 KB
5.61 KB
12 KB
| ... | @@ -4,8 +4,12 @@ | ... | @@ -4,8 +4,12 @@ |
| 4 | <head> | 4 | <head> |
| 5 | <link rel="stylesheet" href="style.css"> | 5 | <link rel="stylesheet" href="style.css"> |
| 6 | <meta charset="utf-8"> | 6 | <meta charset="utf-8"> |
| 7 | + <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"> | ||
| 8 | + <link rel="icon" href="/favicon.ico" type="image/x-icon"> | ||
| 9 | + <title>겨울왕국 캐릭터 닮은꼴</title> | ||
| 7 | <meta name="keywords" content="엘사, 안나, 크리스토프, 한스, 울라프, 스벤, 브루니"> | 10 | <meta name="keywords" content="엘사, 안나, 크리스토프, 한스, 울라프, 스벤, 브루니"> |
| 8 | <link href="https://fonts.googleapis.com/css2?family=Jua&display=swap" rel="stylesheet"> | 11 | <link href="https://fonts.googleapis.com/css2?family=Jua&display=swap" rel="stylesheet"> |
| 12 | + <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5e64b3727e862b06"></script> | ||
| 9 | </head> | 13 | </head> |
| 10 | 14 | ||
| 11 | <body> | 15 | <body> |
| ... | @@ -14,10 +18,14 @@ | ... | @@ -14,10 +18,14 @@ |
| 14 | Frozen | 18 | Frozen |
| 15 | </h1> | 19 | </h1> |
| 16 | <div class="file-upload"> | 20 | <div class="file-upload"> |
| 21 | + <h2> | ||
| 22 | + 나와 닮은 겨울왕국 캐릭터는? | ||
| 23 | + </h2> | ||
| 17 | <div class="image-upload-wrap"> | 24 | <div class="image-upload-wrap"> |
| 18 | <input class="file-upload-input" type='file' onchange="readURL(this);" accept="image/*" /> | 25 | <input class="file-upload-input" type='file' onchange="readURL(this);" accept="image/*" /> |
| 19 | <div class="drag-text"> | 26 | <div class="drag-text"> |
| 20 | - <h3>얼굴 사진을 업로드 하세요</h3> | 27 | + <h3>이곳에 얼굴 사진을 업로드 하세요!</h3> |
| 28 | + <img src="olaf.png" align="center"> | ||
| 21 | </div> | 29 | </div> |
| 22 | </div> | 30 | </div> |
| 23 | <div class="file-upload-content"> | 31 | <div class="file-upload-content"> |
| ... | @@ -173,7 +181,7 @@ | ... | @@ -173,7 +181,7 @@ |
| 173 | break; | 181 | break; |
| 174 | case "크리스토프": | 182 | case "크리스토프": |
| 175 | resultMessage = "크리스토프" | 183 | resultMessage = "크리스토프" |
| 176 | - resultExplain = "당신은 코가 큰 크리스토프!" | 184 | + resultExplain = "당신은 코가 크고 듬직한 크리스토프!" |
| 177 | break; | 185 | break; |
| 178 | case "한스": | 186 | case "한스": |
| 179 | resultMessage = "한스" | 187 | resultMessage = "한스" |
| ... | @@ -181,15 +189,19 @@ | ... | @@ -181,15 +189,19 @@ |
| 181 | break; | 189 | break; |
| 182 | case "울라프": | 190 | case "울라프": |
| 183 | resultMessage = "울라프" | 191 | resultMessage = "울라프" |
| 184 | - resultExplain = "당신은 최강 귀요미 울라프!" | 192 | + resultExplain = "헐~ 당신은 눈사람?! 최강 귀요미 울라프!" |
| 185 | break; | 193 | break; |
| 186 | case "스벤": | 194 | case "스벤": |
| 187 | resultMessage = "스벤" | 195 | resultMessage = "스벤" |
| 188 | - resultExplain = "당신은 순록?!" | 196 | + resultExplain = "헐~ 당신은 순록?! 크리스토프의 영원한 친구" |
| 189 | break; | 197 | break; |
| 190 | case "브루니": | 198 | case "브루니": |
| 191 | resultMessage = "브루니" | 199 | resultMessage = "브루니" |
| 192 | - resultExplain = "당신은 귀엽고 미간이 넓은 브루니!" | 200 | + resultExplain = "헐~ 당신은 도마뱀?! 정말 귀여운 브루니!" |
| 201 | + break; | ||
| 202 | + case "트롤": | ||
| 203 | + resultMessage = "트롤" | ||
| 204 | + resultExplain = "헐~ 당신은 트롤?! 2등신 요정!" | ||
| 193 | break; | 205 | break; |
| 194 | default: | 206 | default: |
| 195 | resultMessage = "알수없음" | 207 | resultMessage = "알수없음" |
| ... | @@ -230,6 +242,9 @@ | ... | @@ -230,6 +242,9 @@ |
| 230 | case "브루니": | 242 | case "브루니": |
| 231 | labelTitle = "브루니" | 243 | labelTitle = "브루니" |
| 232 | break; | 244 | break; |
| 245 | + case "트롤": | ||
| 246 | + labelTitle = "트롤" | ||
| 247 | + break; | ||
| 233 | default: | 248 | default: |
| 234 | labelTitle = "알수없음" | 249 | labelTitle = "알수없음" |
| 235 | } | 250 | } | ... | ... |
naver_image.py
deleted
100644 → 0
| 1 | -from urllib.request import urlopen | ||
| 2 | -from bs4 import BeautifulSoup as bs | ||
| 3 | -from urllib.parse import quote_plus | ||
| 4 | - | ||
| 5 | -baseUrl = 'https://search.naver.com/search.naver?where=image&sm=tab_jum&query=' | ||
| 6 | -plusUrl = input('검색어를 입력하세요 : ') | ||
| 7 | -# 한글 검색 자동 변환 | ||
| 8 | -url = baseUrl + quote_plus(plusUrl) | ||
| 9 | -html = urlopen(url) | ||
| 10 | -soup = bs(html, "html.parser") | ||
| 11 | -img = soup.find_all(class_='_img', limit = 20) | ||
| 12 | - | ||
| 13 | -n = 1 | ||
| 14 | -for i in img: | ||
| 15 | - imgUrl = i['data-source'] | ||
| 16 | - with urlopen(imgUrl) as f: | ||
| 17 | - with open('사진' + plusUrl + str(n)+'.jpg','wb') as h: # w - write b - binary | ||
| 18 | - img = f.read() | ||
| 19 | - h.write(img) | ||
| 20 | - n += 1 | ||
| 21 | -print('다운로드 완료') | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
olaf.png
0 → 100644
108 KB
| ... | @@ -4,8 +4,7 @@ html, | ... | @@ -4,8 +4,7 @@ html, |
| 4 | body { | 4 | body { |
| 5 | font-family: 'Jua', sans-serif; | 5 | font-family: 'Jua', sans-serif; |
| 6 | } | 6 | } |
| 7 | -/**/ | 7 | +body { |
| 8 | - body { | ||
| 9 | width: 100%; | 8 | width: 100%; |
| 10 | height: 100%; | 9 | height: 100%; |
| 11 | background: #177082; | 10 | background: #177082; |
| ... | @@ -19,31 +18,31 @@ body { | ... | @@ -19,31 +18,31 @@ body { |
| 19 | /* IE10+ */ | 18 | /* IE10+ */ |
| 20 | background: linear-gradient(to bottom, #177082 0%, #52c9e0 100%); | 19 | background: linear-gradient(to bottom, #177082 0%, #52c9e0 100%); |
| 21 | } | 20 | } |
| 22 | - .svg-snowscene { | 21 | +.svg-snowscene { |
| 23 | width: 100%; | 22 | width: 100%; |
| 24 | } | 23 | } |
| 25 | - .snow { | 24 | +.snow { |
| 26 | fill: #fff; | 25 | fill: #fff; |
| 27 | animation-name: snowing; | 26 | animation-name: snowing; |
| 28 | animation-duration: 3s; | 27 | animation-duration: 3s; |
| 29 | animation-iteration-count: infinite; | 28 | animation-iteration-count: infinite; |
| 30 | animation-timing-function: ease-out; | 29 | animation-timing-function: ease-out; |
| 31 | } | 30 | } |
| 32 | - .snow:nth-child(2n) { | 31 | +.snow:nth-child(2n) { |
| 33 | animation-delay: 1.5s; | 32 | animation-delay: 1.5s; |
| 34 | } | 33 | } |
| 35 | - .snow:nth-child(3n) { | 34 | +.snow:nth-child(3n) { |
| 36 | animation-delay: 2.3s; | 35 | animation-delay: 2.3s; |
| 37 | animation-duration: 3.3s; | 36 | animation-duration: 3.3s; |
| 38 | } | 37 | } |
| 39 | - .snow:nth-child(4n) { | 38 | +.snow:nth-child(4n) { |
| 40 | animation-delay: 0.8s; | 39 | animation-delay: 0.8s; |
| 41 | animation-duration: 3.2s; | 40 | animation-duration: 3.2s; |
| 42 | } | 41 | } |
| 43 | - .snow:nth-child(5n) { | 42 | +.snow:nth-child(5n) { |
| 44 | animation-delay: 2.8s; | 43 | animation-delay: 2.8s; |
| 45 | } | 44 | } |
| 46 | - @keyframes snowing { | 45 | +@keyframes snowing { |
| 47 | 0% { | 46 | 0% { |
| 48 | fill-opacity: 1; | 47 | fill-opacity: 1; |
| 49 | } | 48 | } |
| ... | @@ -53,7 +52,6 @@ body { | ... | @@ -53,7 +52,6 @@ body { |
| 53 | } | 52 | } |
| 54 | } | 53 | } |
| 55 | 54 | ||
| 56 | -/**/ | ||
| 57 | p { | 55 | p { |
| 58 | color: white; | 56 | color: white; |
| 59 | text-align: center; | 57 | text-align: center; |
| ... | @@ -110,6 +108,16 @@ h1 { | ... | @@ -110,6 +108,16 @@ h1 { |
| 110 | font-family: 'frozen', serif; | 108 | font-family: 'frozen', serif; |
| 111 | font-weight: 700; | 109 | font-weight: 700; |
| 112 | } | 110 | } |
| 111 | +h2 { | ||
| 112 | + font-weight: 100; | ||
| 113 | + font-size: 2.5rem; | ||
| 114 | + color: #d6ffffe8; | ||
| 115 | + text-align: center; | ||
| 116 | +} | ||
| 117 | + | ||
| 118 | +img { | ||
| 119 | + margin-bottom: 20%; | ||
| 120 | +} | ||
| 113 | 121 | ||
| 114 | /* 이미지 업로드 창 */ | 122 | /* 이미지 업로드 창 */ |
| 115 | .file-upload { | 123 | .file-upload { |
| ... | @@ -339,6 +347,23 @@ h1 { | ... | @@ -339,6 +347,23 @@ h1 { |
| 339 | border-radius: 10px; | 347 | border-radius: 10px; |
| 340 | background-color: rgba(103, 213, 181, 1); | 348 | background-color: rgba(103, 213, 181, 1); |
| 341 | } | 349 | } |
| 350 | +.트롤-box { | ||
| 351 | + position: relative; | ||
| 352 | + top: 0; | ||
| 353 | + left: 0; | ||
| 354 | + height: 2rem; | ||
| 355 | + border-radius: 10px; | ||
| 356 | + width: 100%; | ||
| 357 | + background-color: rgba(116, 116, 116, 0.3); | ||
| 358 | +} | ||
| 359 | +.트롤-bar { | ||
| 360 | + position: relative; | ||
| 361 | + top: -2rem; | ||
| 362 | + left: 0; | ||
| 363 | + height: 2rem; | ||
| 364 | + border-radius: 10px; | ||
| 365 | + background-color: rgba(116, 116, 116, 1); | ||
| 366 | +} | ||
| 342 | .percent-text { | 367 | .percent-text { |
| 343 | font-size: 1rem; | 368 | font-size: 1rem; |
| 344 | color: #ffffff; | 369 | color: #ffffff; |
| ... | @@ -380,3 +405,6 @@ h1 { | ... | @@ -380,3 +405,6 @@ h1 { |
| 380 | .브루니-frozen-title { | 405 | .브루니-frozen-title { |
| 381 | color: #67d5b2; | 406 | color: #67d5b2; |
| 382 | } | 407 | } |
| 408 | +.트롤-frozen-title { | ||
| 409 | + color: #747474; | ||
| 410 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment