1. 라이브러리 설치!pip install pymysql # 암호화 모듈을 설치한 후 런타임을 재시작합니다.(아나콘다의 경우 설치 불필요)# !pip install cryptography 2. 라이브러리 불러오기import pymysqlimport pandas as pdfrom sqlalchemy import create_engine 3. mysql 연결user = 'root'password = 'aivle'host = '127.0.0.1'database = 'myshop2024'connect_string = f'mysql+pymysql://{user}:{password}@{host}/{database}'mysql = create_engine(connect_string) 비밀번호에 @이 들어갈 경우fro..
MySQL로 SQL문 공부하기
·
KT AIVLE School/SQL
1. SQL 종류 PL/SQL : Oracle DatabaseSQL : MYSQL, MariaDBT-SQL : Microsoft SQL ServerANSI SQL : 모든 표준 준수 DBMS 2. Mysql 설치 및 실행 SCHEMAS = DATABASES 3. 문법 배우기- 주석/*다 줄의 주석*/-- 이렇게 주석달기 - 별칭 사용 ASSELECT 'Hello SQL World' AS Start; - 데이터베이스 연결, 확인-- 데이터베이스 연결USE hrdb2024;-- 현재 데이터베이스 확인SELECT DATABASE(); - 데이터 조회원하는 열을 원하는 순서대로 조회SELECT emp_id, emp_name FROM employee; MySQL 내장 ERD 조회하는 법더보기 - LI..
예외, 컬렉션
·
KT AIVLE School/JAVA
1. 예외잘못된 조작 및 코딩이 발생할 때 예외 처리 (Error와 다름)IOException입력 및 출력 작업 실패, 인터럽트 시 발생FileNotFoundException파일이 없을 때ParseException문자열 파싱 오류ClassNotFoundException클래스를 못찾을 때SQLException데이터베이스 접근 오류MalformedURLException잘못된 URL일때InterruptedException쓰레드가 작업 중 인터럽트될 때NoSuchMethodException메소드를 못찾을 때NoSuchFieldException필드를 못찾을 때package com.chap09;import java.net.MalformedURLException;import java.net.URL;public cla..
상속, 추상화, 제네릭
·
KT AIVLE School/JAVA
1. 상속- 오버라이드 오버라이딩오버로딩메서드명==매개변수=!=class Prod { int id; String name; Prod(int i, String n) { id = i; name = n; } void info() { System.out.println(id + " : " + name); }}class ExtProd extends Prod { int qty; ExtProd(int i, String n, int q) { super(i,n); qty = q; } @Override // 어노테이션 void info() { super.info(); System..
객체지향
·
KT AIVLE School/JAVA
- 클래스 선언과 객체 생성public class Cls { static double radius; public Cls(){ this.radius = radius; }; public Cls(double r){ this.radius = r; } double getVolume(){ return 4.0 / 3.0 * Math.PI * Math.pow(radius, 3); } double getArea(){ return 4 * Math.PI * radius * radius; } public static void main(String[] args) { Cls ball = new Cls(2.0); ..
자바 시작 ( 자바 변수 및 제어문 )
·
KT AIVLE School/JAVA
JVM : class 바이트 코드를 실행 가능JRE : 자바를 실행시키기 위해 필요JDK : 자바 프로그래밍 시 필요한 컴파일러 포함( .java → .class), 플랫폼에 종속적임 Java SE : 표준적인 자바 플랫폼Java EE : 서버 측에서 개발하기 위한 플랫폼 1. Intellij IDEA 설치Jetbrain 사에서 제작 Ultimate는 유료지만 Community Edition은 무료입니다! 최고의 Java 및 Kotlin IDE인 IntelliJ IDEA를 다운로드하세요 www.jetbrains.com - 단축키액션, 옵션 찾기 : [Ctrl] + [Shift] + [A]찾기 : [Shift] x 2 자동 완성 : [Ctrl] + [Space] 템플릿 보기 : [Ctrl] + J스마트 자..
Colab에서 음성파일 만들기
·
KT AIVLE School/프로젝트
- gTTS 설치!pip install gTTS - text를 음성파일로 저장하기from gtts import gTTS# 원하는 파일 위치path = ''# 변환할 텍스트text = "안녕하세요. 이것은 음성 파일 생성 예제입니다."# 언어 설정 (한국어는 'ko')tts = gTTS(text=text, lang='ko')# 음성 파일 저장tts.save(path + "output.mp3")print("음성 파일이 저장되었습니다.")
LLM
·
KT AIVLE School/언어지능 딥러닝
Hugging Face – The AI community building the future. Hugging Face – The AI community building the future. huggingface.co토큰 생성하기 - 설치 및 환경설정!pip install -qq -U transformers accelerate!pip install -qq datasets!pip install -qq peft!pip install -qq bitsandbytes!pip install -qq trlimport osimport pandas as pdfrom tqdm.auto import tqdmimport torchfrom datasets import load_datasetfrom transformers impo..
PLM NSMC Finetuning
·
KT AIVLE School/언어지능 딥러닝
Hugging Face 사용 Hugging Face – The AI community building the future.The Home of Machine Learning Create, discover and collaborate on ML better. We provide paid Compute and Enterprise solutions. We are building the foundation of ML tooling with the community.huggingface.co 1. 환경 설정 및 데이터 이해from google.colab import drivedrive.mount('/content/drive')# install datasets 라이브러리!pip install -qq datasets..