๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
  • Tried. Failed. Logged.
728x90

์ „์ฒด ๊ธ€720

ํŒŒ์ด์ฌ - ์ค‘๋ณต ์—†๋Š” ๊ณ ์œ ์„ฑ์ด ๋ณด์žฅ๋˜๋Š” id ๋งŒ๋“ค๊ธฐ(uuid) import uuid uuid.uuid4() #uuid4 => full random uuid # Outputs something like: UUID('0172fc9a-1dac-4414-b88d-6b9a6feb91ea') uuid๋ž€ ๊ณ ์œ ์„ฑ์ด ๋ณด์žฅ๋˜๋Š” id๋ฅผ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ‘œ์ค€ ๊ทœ์•ฝ์„ ๋งํ•œ๋‹ค. ์ถœ์ฒ˜: https://stackoverflow.com/questions/2257441/random-string-generation-with-upper-case-letters-and-digits Random string generation with upper case letters and digits How do I generate a string of size N, made of numbers and uppercase .. 2022. 6. 18.
๋ฐฐ๊ฒฝ ์ง€์›Œ์ฃผ๋Š” ์‚ฌ์ดํŠธ(remove.bg) https://www.remove.bg/ ์ด๋ฏธ์ง€ ๋ฐฐ๊ฒฝ ์ œ๊ฑฐ, ํˆฌ๋ช… ๋ฐฐ๊ฒฝ ๋งŒ๋“ค๊ธฐ – remove.bg ์‚ฌ์ง„์ด๋‚˜ ์ด๋ฏธ์ง€ ๋ฐฐ๊ฒฝ์„ ํ•œ ๋ฒˆ ํด๋ฆญ์œผ๋กœ 5์ดˆ๋งŒ์— ๋ฌด๋ฃŒ๋กœ ์ œ๊ฑฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฏธ์ง€ ๋ฐฐ๊ฒฝ ํˆฌ๋ช…ํ•˜๊ฒŒ ๋งŒ๋“œ๋Š” ๋ฒ•. ๋ˆ„๋ผ ๋”ฐ๊ธฐ ํ”„๋กœ๊ทธ๋žจ. www.remove.bg 2022. 6. 15.
PHP - ์„ธ์…˜(Session) ์‚ฌ์šฉ ์ถœ์ฒ˜: https://teserre.tistory.com/8 [PHP] php ์„ธ์…˜(Session) ์‚ฌ์šฉํ•˜๊ธฐ ๋ชฉ์ฐจ ์„ธ์…˜ ์‹œ์ž‘ ์„ธ์…˜ ๋ณ€์ˆ˜ ์‚ฌ์šฉ ์„ธ์…˜ ๋ณ€์ˆ˜ ํ•ด์ œ ์„ธ์…˜ ๋ณ€์ˆ˜ ๋“ฑ๋ก ํ™•์ธ ์„ธ์…˜ id ๋ณ€๊ฒฝ ์„ธ์…˜ ์ข…๋ฃŒ ์ถ”๊ฐ€ 1. ์„ธ์…˜ ์œ ์ง€์‹œ๊ฐ„ ์ถ”๊ฐ€ 2. ์ถ”๊ฐ€ ๋ณด์•ˆ์„ค์ • ์„ธ์…˜(Session)์€ ๋ชจ๋“  ์ •๋ณด๊ฐ€ ์‚ฌ์šฉ์ž ์ธก์˜ ์ปดํ“จํ„ฐ์— ์ €์žฅ teserre.tistory.com 2022. 6. 1.
PHP - MySQL ์ ‘์† [prepared statement ๋ฐฉ์‹] $dbserver = "localhost"; $dbuser = "username"; $dbpasswd = "userpasswd"; $dbname = "mydb"; $mysqli = new mysqli($dbserver, $dbuser, $dbpasswd, $dbname); if (mysqli_connect_errno()) { die("Connection failed: " . $conn->connect_error); } $sql = "select * from board where idx = ?"; $stmt = $__mysqli->stmt_init(); $stmt = $__mysqli->prepare($sql); $stmt->bind_param("ss", $use.. 2022. 6. 1.
์•„์Šคํ‚ค ํ˜•ํƒœ๋กœ ๋””๋ ‰ํ† ๋ฆฌ ๊ตฌ์กฐ ์ž‘์„ฑ ์‚ฌ์ดํŠธ(ASCII Tree Generator) https://ascii-tree-generator.com/ ASCII Tree Generator Visualize and create your perfect folder structure for your next project. Easily convert to an ASCII format to save to your documentation. Instructions Simply drag n drop your folders/files by dragging the icon, click on the name of the folder/file to chan ascii-tree-generator.com 2022. 5. 31.
PyQt - ๋ฆฌ์†Œ์Šค ์ ์šฉํ•˜๊ธฐ [๊ฒฝ๋กœ] images/ โ”œโ”€ icon.png main.py resources.qrc [resources.qrc] images/icon.png [๋ฆฌ์†Œ์Šค ํŒŒ์ผ ๋ณ€ํ™˜ํ•˜๊ธฐ] pyrcc5 resources.qrc -o icon.py [main.py] import icon ... label=QLabel(Form) label.setPixmap( QPixmap(":/images/icon.png") ) # qrc์—์„œ ์ ์€ ๊ฒฝ๋กœ๋ช… label.resize(label.pixmap().width(), label.pixmap().height()) ... ์ถœ์ฒ˜: https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=browniz1004&logNo=221373310.. 2022. 5. 31.
ํŒŒ์ด์ฌ - ํ˜„์žฌ ๋ผ์ธ๋ฒˆํ˜ธ ์ถœ๋ ฅ import inspect def lineno(): """ ์ด ํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœํ•œ ๊ณณ์˜ ๋ผ์ธ๋ฒˆํ˜ธ๋ฅผ ๋ฆฌํ„ดํ•œ๋‹ค. """ return inspect.getlineno(inspect.getouterframes(inspect.currentframe())[-1][0]) print( lineno() ) try: " " except Exception as e: self.print_log( '[' + str(lineno()) + ']' '์˜ˆ์™ธ: ' + str(e), err=True) ์ถœ์ฒ˜: https://technote.luminance.kr/entry/python-%EB%94%94%EB%B2%84%EA%B7%B8-line-%EB%B2%88%ED%98%B8-%EC%B0%8D%EA%B8%B0 python ๋””๋ฒ„๊ทธ: line ๋ฒˆํ˜ธ.. 2022. 5. 25.
์…€๋ ˆ๋‹ˆ์›€ - chromedriver ์ž๋™ ์—…๋ฐ์ดํŠธ ๋ฐ ์„ค์น˜ pip install chromedriver_autoinstaller from selenium import webdriver import chromedriver_autoinstaller def driverAutoInstall(): chromedriver_autoinstaller.install() driver = webdriver.Chrome() return driver driver = driverAutoInstall() driver.get('http://google.com') ์ถœ์ฒ˜: https://dev-guardy.tistory.com/78 [Python] chromedriver selenium ์ž๋™์„ค์น˜ [์…€๋ ˆ๋‹ˆ์›€, ํฌ๋กฌ๋“œ๋ผ์ด๋ฒ„] Python , chromedrvier, Selenium, ์…€๋ ˆ๋‹ˆ์›€, ํฌ.. 2022. 5. 23.
OpenCV - ์ปค์Šคํ…€ Cascade ๋งŒ๋“ค๊ธฐ(CASCADE TRAINER GUI) ๋ฐ ๋ฌผ์ฒด ํƒ์ง€ ์•„๋ž˜ ๋งํฌ์—์„œ Cascade Trainer GUI๋ฅผ ์ž์‹ ์˜ ์ปดํ“จํ„ฐ ํ™˜๊ฒฝ์— ๋งž๋Š” ๋ฒ„์ „์œผ๋กœ ์„ค์น˜(64๋น„ํŠธ๊ฐ€ 32๋น„ํŠธ ๋ฒ„์ „์œผ๋กœ ์„ค์น˜ํ•˜๋ฉด ์ค‘๊ฐ„์— ์˜ค๋ฅ˜๊ฐ€ ์ƒ๊น€) https://amin-ahmadi.com/cascade-trainer-gui/ Cascade Trainer GUI - Amin Cascade Trainer GUI 1. Introduction Cascade Trainer GUI is a program that can be used to train, test and improve cascade classifier models. It uses a graphical interface to set the parameters and make it easy to use OpenCV tools for training.. 2022. 5. 19.
ํ…์„œํ”Œ๋กœ์šฐ - ๊ฐ„๋‹จํ•œ ๊ธฐ๊ณ„ํ•™์Šต ์‹œํ‚ค๊ธฐ https://teachablemachine.withgoogle.com/ Teachable Machine Train a computer to recognize your own images, sounds, & poses. A fast, easy way to create machine learning models for your sites, apps, and more – no expertise or coding required. teachablemachine.withgoogle.com ์—ฌ๋Ÿฌ๊ฐ€์ง€ ์ข…๋ฅ˜์˜ ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ์Œ [์ด๋ฏธ์ง€ ํ”„๋กœ์ ํŠธ ๋กœ์ปฌ์—์„œ ์‹คํ–‰์‹œํ‚ค๊ธฐ] import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import tensorflow as tf from .. 2022. 5. 19.
PyQt - ๋””๋ ‰ํ† ๋ฆฌ ๋ฐ ํŒŒ์ผ ๊ฒฝ๋กœ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ(QFileDialog) from PyQt5.QtWidgets import * path = QFileDialog.getExistingDirectory() print(path) file = QFileDialog.getOpenFileName() print(file) ์ถœ์ฒ˜: https://wikidocs.net/5247 1) QFileDialog ์ด๋ฒˆ ์ ˆ์—์„œ๋Š” PyQt๊ฐ€ ์ œ๊ณตํ•˜๋Š” QFileDigalog ํด๋ž˜์Šค์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. QFileDigalog๋Š” ๊ทธ๋ฆผ 16.43๊ณผ ๊ฐ™์ด ์‚ฌ์šฉ์ž๊ฐ€ ํŒŒ์ผ์ด๋‚˜ ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ ์„ ํƒํ•  ... wikidocs.net 2022. 5. 19.
OpenCV - ์บก์ฑ  ๋ฌธ์ž ๊ฒ€์ถœํ•˜๊ธฐ import cv2 import numpy as numpy import matplotlib.pyplot as plt img = cv2.imread('./characters.PNG') img = cv2.blur(img, (10, 10), anchor=(-1, -1), borderType=cv2.BORDER_DEFAULT) # ๋ธ”๋Ÿฌ์ฒ˜๋ฆฌ(๋–จ์–ด์ง„ ์กฐ๊ฐ์„ ๋ถ™์ด๊ธฐ) img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # ํšŒ์ƒ‰ ์ „ํ™˜ img_gray = 255 - img_gray # ์ด๋ฏธ์ง€ ๋ฐ˜์ „ res, thr = cv2.threshold(img_gray, 90, 255, cv2.THRESH_BINARY) # ์ด์ง„ํ™” cv2.imshow('gray', thr) contours, hie.. 2022. 5. 18.
728x90