Python (75) ์ธ๋ค์ผํ ๋ฆฌ์คํธํ [Python] Flask ์ค๋ฅ๋ค [Flask] ImportError: cannot import name 'json' from 'itsdangerous' https://velog.io/@___pepper/Flask-ImportError-cannot-import-name-json-from-itsdangerous [Flask] ImportError: cannot import name 'json' from 'itsdangerous' itsdangerous import error in flask velog.io [Python] Flask - api, sqlalchemy ์ฌ์ฉ๋ฐฉ๋ฒ Install Flask-RESTful with pip pip install flask-restful api.py from flask import Flask from flask_restful import reqparse, abort, Api, Resource app = Flask(__name__) api = Api(app) TODOS = { 'todo1': {'task': 'build an API'}, 'todo2': {'task': '?????'}, 'todo3': {'task': 'profit!'}, } def abort_if_todo_doesnt_exist(todo_id): if todo_id not in TODOS: abort(404, message="Todo {} doesn't exist".fo.. [Python] SQL Server (pyodbc) local class Database(): def __init__(self): self.server = 'localhost' self.database = 'adb' self.cnxn = pyodbc.connect('Trusted_Connection=yes', DRIVER=self.driver, SERVER=self.server, PORT=1433, DATABASE=self.database) import pyodbc import pandas as pd class aDb(): def __init__(self): self.server = '130.1.1.1' self.database = 'adb' self.username = 'sa' self.password = '1234' self.driver = '{ODB.. [Juyter] Tips https://hnanmal.tistory.com/entry/%EC%A3%BC%ED%94%BC%ED%84%B0%EB%85%B8%ED%8A%B8%EB%B6%81-%EC%88%98%EB%A7%8E%EC%9D%80-%EC%85%80-%EC%A4%91-%EB%94%B1-%ED%95%98%EB%82%98%EB%A7%8C-%ED%8C%8C%EC%9D%BC%EB%A1%9C-%EC%A0%80%EC%9E%A5%ED%95%98%EA%B8%B0 ์ฃผํผํฐ๋ ธํธ๋ถ ์๋ง์ ์ ์ค, ๋ฑ! ํ๋๋ง ํ์ผ๋ก ์ ์ฅํ๊ธฐ! ์ฃผํผํฐ ๋ ธํธ๋ถ์์ ํ์ด์ฌ์ผ๋ก ํ๋ก๊ทธ๋๋ฐ์ ํ๋ค ๋ณด๋ฉด ๋ฐ๋ณต๋๋ ์ฝ๋๋ฅผ ์ฌ์ฌ์ฉํ๊ธฐ ์ฝ๊ฒ ํจ์๋ก ๋ง๋ค๊ฒ ๋ฉ๋๋ค. ์ด๋ฐ ํจ์๋ค์ ๋ณดํต ํ ์ ์ ๋ชฐ์๋ฃ๊ณ , ๋ค๋ฅธ ์ ์์๋ ์ด ํจ์๋ค์ ํธ์ถํ๋ฉด์ hnanmal.tistory.com [Python] ํ์ผ ๊ด๋ จ ํด๋น ๊ฒฝ๋ก์ ๋๋ ํ ๋ฆฌ๋ฅผ list ํํ๋ก ๋ฐํ os.listdir(path) Data๋ฅผ ํฌํจํ๋ ํ์ผ๋ช ์ฐพ๊ธฐ file_name = [s for s in files if "Data" in s] with os.scandir(path) as files: for file in files: print(file.name) ํ์ผ ๋ณต์ฌ ํ๊ธฐ ํ์ผ์ ๋ณต์ฌํ๋ copyfile, copy, copy2 ํจ์๋ ๊ธฐ๋ณธ์ ์ธ ์ฌ์ฉ๋ฐฉ๋ฒ์ ๊ฐ์ต๋๋ค. import shutil shutil.copyfile("./test1/test1.txt", "./test2.txt") shutil.copy("./test1/test1.txt", "./test3.txt") shutil.copy2("./test1/test1.txt", "./test4.txt") .. [Streamlit] bookmarks 5. Use Screen Streamlit will close the session as soon as you exit SSH session. To make it persistence, we need to use screen tool. Once you create session in screen, you can close the terminal and connect the server using new terminal. It will create persistence session. # screen -S streamlit Deploy Streamlit app: # streamlit run main.py --server.port 80 Now close the terminal and connect with .. Ubuntu ์์ Jupyter lab ์ค์น, ์๊ฒฉ ์ค์ python ์ค์น ํ์ํ ๊ฒฝ์ฐ sudo apt install python3 sudo apt install python3-pip ์ค์น pip3 install jupyterlab Config ํ์ผ ์์ฑ jupyter lab --generate-config jupyter์ ์ ์ํ ๋น๋ฐ๋ฒํธ ์ค์ jupyter notebook password ์๊ฒฉ ์ค์ jupyter_lab_config.py ์์ ๊ฒฝ๋ก : /home/ubuntu/.jupyter/jupyter_lab_config.py c.ServerApp.allow_remote_access = True c.ServerApp.ip = '0.0.0.0' # or '*' : ๋ชจ๋ ip ์ ์ ๊ฐ๋ฅ # ์ธ๋ถ์์ jupyter ์ธํฐํ์ด์ค์ ์ฒ์ ์ ์ํ์ ๋ ๋์ค๋ ๊ฒฝ๋ก๋ฅผ ์ค.. [Python] Selenium https://stackoverflow.com/questions/72773206/selenium-python-attributeerror-webdriver-object-has-no-attribute-find-el Selenium - Python - AttributeError: 'WebDriver' object has no attribute 'find_element_by_name' I am trying to get Selenium working with Chrome, but I keep running into this error message (and others like it): AttributeError: 'WebDriver' object has no attribute 'find_element_by_na.. ์ด์ 1 2 3 4 5 6 ยทยทยท 10 ๋ค์ ํฐ์คํ ๋ฆฌํด๋ฐ Developer๐ค๊ตฌ๋ ํ๊ธฐ