Programming Language (20) 썸네일형 리스트형 pip ssl error 해결 방화벽과 프록시 등의 이슈로 pip를 이용하여 설치 등 진행 시 SSL Error가 발생하는 경우 아래와 같이 host를 신뢰하는 옵션을 주어 해결할 수 있다. 1 pip --trusted-host pypi.org --trusted-host files.pythonhosted.org install cs Python requests InsecureRequestWarning 삭제 requests를 이용하여 SSL 요청 시 verify=False을 이용하는 경우 InsecureRequestWarning의 경고성 문구가 나타난다. 이런경우 다음과 같이 문구를 추가하면 나타나지 않는다. 예전부터 애용을 했지만, 매번 사용할 때 마다 검색하는데 이참에 블로그에 글도 남길겸 해당 내용을 작성해본다. 1 2 3 4 import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) Colored by Color Scripter cs Python 한줄 for문 123456789101112131415161718192021222324252627282930313233343536373839404142# _*_ coding:utf-8 _*_ '''for i in [][] is iterable type data ==> string, list, tuple, dictionaryoneline for str, list, tuple, dictionary''' oneline_for_str = "".join((str(i) for i in range(5)))print(oneline_for_str) # expect result : "01234" oneline_for_list = list(i for i in range(5)) # oneline_for = [i for i in range(5.. React npm start 외부접근 설정 BeautifulSoup을 이용한 파이썬 크롤링(Python Crawling with BeautifulSoup) 크롤링 대상 URL : https://stackexchange.com/leagues/ 소스코드 : https://github.com/hack-yu/Programming/blob/master/python/stack_exchange_emails_crawling.py hack-yu/Programming Contribute to hack-yu/Programming development by creating an account on GitHub. github.com [Django] 우분투 18.04 LTS Django 설치 https://www.howtoforge.com/tutorial/how-to-install-django-on-ubuntu/ # pip3 설치하고 default로 설치되어있는 python 3.6.8 사용 (ubuntu 18은 python3이 기본으로 설치되어있음) ## ln -s /usr/bin/python3 /usr/bin/python ln -s /usr/bin/pip3 /usr/bin/pip ## pip install virtualenv pip install django ## 위의 명령어대로 하면 최신버전 장고가 설치됨. 가상환경에서 django 안정버전인 2.0.5 설치 해도됨 pip install Django==2.0.5 ## django 설치 확인 django-admin --version # 가상.. 파이썬 10진수 n진수로 변환 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 def toN(n, num=2): res=[] res2='' while n>0: n, tmp = divmod(n, num) res.append((str(tmp) if tmp C++ 뒤집은 소수 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 #include #include #include #include using namespace std; int prime[101]; int ints[101]; string s[101]; bool isPrime(int x){ int chk; if (x >= 2){ chk = 0; for (int i = 2; i > n; int temp; for (int i = 0; i > s[i]; temp = reverse(stoi.. 이전 1 2 3 다음