Skip to content

Instantly share code, notes, and snippets.

@allieus
allieus / README.md
Last active May 6, 2019 15:41
인스타그램 인증 예시 by Ask Company
%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))
@allieus
allieus / README.md
Last active November 23, 2020 18:29
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
<a href="https://www.askcompany.kr" style="display: block;">
<img src="https://askcompanyjpe.blob.core.windows.net/static/askcompany_vod_shared_banner.jpg" style="border: 0; width: 250px;" />
</a>
@allieus
allieus / README.md
Last active December 3, 2018 06:23
교보문고 검색결과 크롤링 by Ask Company

keyword_encode 로직은 교보문고 페이지의 javascript 로직을 그대로 흉내내어 만들었습니다.

실행결과

>>> search('파이썬')

Do it! 점프 투 파이썬
http://www.kyobobook.co.kr/product/detailViewKor.laf?ejkGb=KOR&mallGb=KOR&barcode=9788997390915&orderClick=LAG&Kc=

Extension을 통한 설치에서는 종종 Timeout이 발생합니다.

본 설치를 통해 Azure Function에서 파이썬3를 활용하고 있습니다.

함수 앱 > 플랫폼 기능 > 고급도구 (KUDU) > Debug Console > CMD

필요한 라이브러리는 d:/home/site/tools/python -m pip install 필요한팩키지명 명령으로 설치해주세요.

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) 이죠?