-
<PYTHON> requestsFlower in my dev/Python 2021. 2. 15. 09:44
1. Call import requests url = 'http://www.google.com' payload = {'param1':'value1'} headers = {'Content-Type': 'application/json; charset=utf-8'} cookies = {'session_id': 'flower'} response = requests.get(url) # response = requests.get(url, params=payload) # response = requests.get(URL, headers=headers, cookies=cookies) response = requests.post(url, data=payload) response = requests.put(url, dat..
-
<PYTHON> Slack webhookFlower in my dev/Python 2021. 2. 15. 09:10
1. python 내부함수사용 import json import requests URL = "Slack webhook url" TEXT = "Message" HEADER = {'Content-Type':'application/json'} payload= {"text": TEXT} requests.post( URL, data=json.dumps(payload), headers=HEADER ) 2. slack-webhook 사용 pypi.org/project/slack-webhook/ slack-webhook slack-webhook is a python client library for slack api Incoming Webhooks on Python 3.6 and above. pypi.org $ pip..
-
<PYTHON3> jupyter notebook 설치Flower in my dev/Python 2021. 1. 19. 18:07
jupyter notebook 설치 $ pip3 install jupyter Login 설정 $ jupyter notebook --generate-config $ jupyter notebook password jupyter notebook 도움말 $ jupyter notebook --h usage: jupyter-notebook [-h] [--debug] [--generate-config] [-y] [--no-browser] [--no-mathjax] [--allow-root] [--autoreload] [--script] [--no-script] [--log-level NotebookApp.log_level] [--config NotebookApp.config_file] [--ip NotebookApp..
-
<Git> Subtree & SubmoduleFlower in my dev/Git 2020. 11. 20. 15:18
사전준비 - subtree 와 submodule을 추가할 repo가 있는 상태 ### main으로 사용할 저장소 (이하 main) ### subtree로 사용할 저장소 (이하 sub) ### git clone {main_repo} ### cd {main_dir} $ git clone git@github.com:flower/sub_main.git $ cd sub_main $ ls -alh Subtree - 등록 ### git remote add {sub_repo_name} {sub_repo} ### git remote ### git subtree add -P {sub_dir} {sub_repo_name} ### ls -alh # ~/sub_main/ $ git remote add git@github.com..
-
<github> remote: Invalid username or password.Flower in my dev/Others 2020. 1. 29. 22:27
[remote: Invalid username or password 에러해결] 1. 저장소 주소를 ssh로 수정한다. git remote set-url origin 2. 설정 확인 git config -l 3. 재시도 후 아래와 같은 에러가 발생한다면, Warning: Permanently added the RSA host key for IP address git@github.com: Permission denied (publickey) fatal: Could not read from remote repository Please make sure you have the corrent access rights and the repository exists. pub키를 만들고 내용을 복사하여 github/해..
-
<REACT>[Hello React]Flower in my dev/React 2017. 12. 20. 10:58
[Hello React] *velopert 님의 유투브 강의를 듣고 작성하였습니다. 1. nodejs와 npm 버전확인 node -v npm -v 2. 프로젝트 디렉토리 생성 mkdir hello_react cd hello_react 3. 프로젝트 디렉토리를 초기화 npm init (설정은 필요 없이 모두 Enter로 넘어간다.) 4. 초기화 후 package.json 확인 1 2 3 4 5 6 7 8 9 10 11 12 13 { "name": "hello_react", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "dev-..
-
<NODE>[라즈베리파이 node&npm 업그레이드]Flower in my dev/React 2017. 12. 17. 01:53
[라즈베리파이 node&npm 업그레이드] 1. nodejs&npm 버전확인 1) node -v 2) npm -v 2. nodejs 삭제 1) sudo apt-get remove nodejs 2) sudo apt-get autoremove 3. nodejs 설치 1) curl -sL https://deb.nodesource.com/setup_8.x|sudo -E bash - - setup_(version).x - 최신 LTS 버전은 8.x - nodejs는 짝수 버전이 LTS - 최신 버전은 9.x (글작성시점) 2) sudo apt-get install nodejs 3) 버전확인
-
<PYTHON>[Numpy_07 집합&파일입출력]Flower in my dev/Python 2017. 11. 29. 21:15
[Numpy_07 집합&파일입출력] 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 59 60 61 62 63 64 65 66 67 68 69 70 import numpy as np arr1 = np.array(['wing','flower','sky','wind','flower','wing']) # 중복된 원소 제거 print(np.unique(arr1)) # 순수 파이썬으로 구현 print(sorted(set(arr1))) arr2 = np.array(['fl..