This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%matplotlib inline | |
from matplotlib import pyplot as plt | |
import numpy as np | |
x = np.arange(0, 10, 0.01) | |
plt.plot(x, np.cos(x)) | |
plt.plot(x, np.sin(x)) |
melon_top100 = get_song_list()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
res = requests.get("http://naver.com") | |
html = res.text | |
soup = BeautifulSoup(html, 'html.parser') | |
tag_list = soup.select('.PM_CL_realtimeKeyword_rolling .ah_k') | |
for rank, tag in enumerate(tag_list, 1): # 항상 하위 block 전에 콤마(:)를 씁니다. | |
label = tag.text |
keyword_encode
로직은 교보문고 페이지의 javascript
로직을 그대로 흉내내어 만들었습니다.
실행결과
>>> search('파이썬')
Do it! 점프 투 파이썬
http://www.kyobobook.co.kr/product/detailViewKor.laf?ejkGb=KOR&mallGb=KOR&barcode=9788997390915&orderClick=LAG&Kc=
http://dream.ahboom.net/entry/한글-유니코드-자소-분리-방법 에 대한 파이썬 구현입니다.
>>> korean_to_code('파이썬')
'vkdlTjs'
Extension을 통한 설치에서는 종종 Timeout이 발생합니다.
본 설치를 통해 Azure Function에서 파이썬3를 활용하고 있습니다.
함수 앱 > 플랫폼 기능 > 고급도구 (KUDU) > Debug Console > CMD
필요한 라이브러리는 d:/home/site/tools/python -m pip install 필요한팩키지명
명령으로 설치해주세요.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def myfilter(filter_fn, alter_value): | |
def wrap (fn): | |
def inner(*args): | |
# fn을 호출하는 코드가 없네요. | |
# iterator = list(filter (filter_fn, [*args])) | |
# if [*args] not in iterator: | |
# return alter_value | |
# args 값이 현재 (1, 2, 3, 4, 5) 이죠? |