Backend/Python

    Python Flask + mysql 웹 기반 어플리케이션 제작

    Directory project └static └style.css └ ... └templates └index.html └login.html └ ... └run.py #run.py # Import Flask Library from flask import Flask, render_template, request, session, url_for, redirect import pymysql.cursors # Initialize the app from Flask app = Flask(__name__) # Configure MySQL conn = pymysql.connect(host='localhost', user='root', password='1234', db='travel', charset='utf8mb4',..

    백준 코딩 연습

    python 언어 사용 github : https://github.com/jiwon1027/code_backjoon 다시 풀어볼만한 문제들만 오답노트 해보기

    리얼센스 code

    ## License: Apache 2.0. See LICENSE file in root directory. ## Copyright(c) 2015-2017 Intel Corporation. All Rights Reserved. ############################################### ## Open CV and Numpy integration ## ############################################### import pyrealsense2 as rs import numpy as np import cv2 # Configure depth and color streams pipeline = rs.pipeline() config = rs.config() co..

    라즈베리 파이 TTS 활용(Python)

    TTS(Text-to-Speech) 문자열로 입력한 내용에 대해 직접 음성 파일을 생성하고, 이를 출력 사용할 TTS 소프트웨어 espeak text-to-speech(TTS) 프로그램 사용 gTTS( google Text-to-Speech) 프로그램

    (Python) MariaDB와 python 이미지 통신(pandas 이용)

    import pandas as pd from sqlalchemy import create_engine from PIL import Image import base64 from io import BytesIO engine = create_engine('mysql+pymysql://root:111111@113.198.234.39/project', echo = False) ## 이미지 DB에 저장하는 code buffer = BytesIO() im = Image.open('test3.jpg') im.save(buffer, format = 'jpeg') img_str = base64.b64encode(buffer.getvalue()) img_df = pd.DataFrame({'carnumber': '999가12..

    (Python) TCP socket 통신 채팅 구현

    Client.py from socket import * import threading import time def send(sock): while True: sendData = input('>>>') sock.send(sendData.encode('utf-8')) def receive(sock): while True: recvData = sock.recv(1024) print('상대방 :', recvData.decode('utf-8')) port = 8081 clientSock = socket(AF_INET, SOCK_STREAM) clientSock.connect(('127.0.0.1', port)) print('접속 완료') sender = threading.Thread(target=send, arg..