일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- java
- Topics
- Python
- 이력서
- 파이썬
- test
- Websocket
- r
- pytorch
- 네이버뉴스
- 과학백과사전
- spring MVC(모델2)방식
- word2vec
- oracle
- db
- lda
- 코사인 유사도
- 크롤링
- tomoto
- 토픽추출
- Gmarket
- (깃)git bash
- 방식으로 텍스트
- 幼稚园杀手(유치원킬러)
- 게시판 만들기
- mysql
- 지마켓
- 자바
- RESFUL
- jsp 파일 설정
- Today
- Total
목록Python (124)
무회 Blog
from gensim import corpora from gensim.models import LsiModel from gensim.parsing.preprocessing import preprocess_string import re def clean_text(x): pattern = r'[^a-zA-Z0-9\s]' text = re.sub(pattern,'',x) return x def clean_numbers(x): if bool(re.search(r'\d',x)): x = re.sub('[0-9]{5,}','#####',x) x = re.sub('[0-9]{4,}','####',x) x = re.sub('[0-9]{3,}','###',x) x = re.sub('[0-9]{2,}','##',x) re..
import numpy as np import pandas as pd import matplotlib.font_manager as fm import matplotlib.pyplot as plt from future.utils import iteritems from sklearn.manifold import TSNE from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.feature_extraction.text import CountVectorizer from string import punctuation from collections import Counter from gensim import corpora from gensim..
from excel to oracle table dbcode 01 CREATE TABLE "PYTEST001"."VITA5" ("GN_NM" VARCHAR2(20 BYTE) NOT NULL ENABLE, "GN_MEMO" VARCHAR2(20 BYTE) NOT NULL ENABLE, "GN_EVALUATION" VARCHAR2(4000 BYTE), "GN_CONTENT" VARCHAR2(4000 BYTE), "GN_DATE" DATE, "GN_EVALUATIONCOUNT" NUMBER(5,0) ) SEGMENT CREATION IMMEDIATE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEX..
# DB-003, python DB insert import pandas as pd import cx_Oracle import time # conn=cx_Oracle.connect("scott/tiger@192.168.182.1:1521/xe") # def save_data(): db = conn=cx_Oracle.connect("scott/tiger@192.168.182.1:1521/xe") try: cr = db.cursor() except: print('database connection faile') # # insert into emp( # EMPNO =7500 # ENAME ='ALLEN' # JOB ='SALESMAN' # MGR =7698 # HIREDATE ='SYSDATE' # SAL =..
# exec_oracle_sql.py #encoding=gbk import cx_Oracle #查询数据库,并返回数据 def query_sql(v_sql): conn=cx_Oracle.connect("scott/tiger@192.168.182.1:1521/xe") #连接数据库 c=conn.cursor() #获取cursor try: c.parse(v_sql) # 解析sql语句 # 捕获SQL异常 except cx_Oracle.DatabaseError as e: print(e) c.execute(v_sql) #使用cursor进行各种操作 row = c.fetchone() #可以调用cursor.fetchall()一次取完所有结果,或者cursor.fetchone()一次取一行结果 c.close() #关闭cursor co..