일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 파이썬
- jsp 파일 설정
- Python
- spring MVC(모델2)방식
- 자바
- 이력서
- tomoto
- mysql
- RESFUL
- 토픽추출
- java
- Websocket
- (깃)git bash
- db
- Gmarket
- 게시판 만들기
- 방식으로 텍스트
- 크롤링
- pytorch
- test
- oracle
- r
- 幼稚园杀手(유치원킬러)
- 과학백과사전
- Topics
- 네이버뉴스
- word2vec
- 지마켓
- lda
- 코사인 유사도
- Today
- Total
목록Python (124)
무회 Blog
소스: 1) 서버 소스 (python) websocket_server.py import asyncio # 웹 소켓 모듈을 선언한다. import websockets # 클라이언트 접속이 되면 호출된다. async def accept(websocket, path): while True: # 클라이언트로부터 메시지를 대기한다. data = await websocket.recv(); print("receive : " + data); # 클라인언트로 echo를 붙여서 재 전송한다. await websocket.send("echo : " + data); # 웹 소켓 서버 생성.호스트는 localhost에 port는 9998로 생성한다. start_server = websockets.serve(accept, "lo..
소스: 1) 서버 소스 (python) websocket_server.py import asyncio # 웹 소켓 모듈을 선언한다. import websockets # 클라이언트 접속이 되면 호출된다. async def accept(websocket, path): while True: # 클라이언트로부터 메시지를 대기한다. data = await websocket.recv(); print("receive : " + data); # 클라인언트로 echo를 붙여서 재 전송한다. await websocket.send("echo : " + data); # 웹 소켓 서버 생성.호스트는 localhost에 port는 9998로 생성한다. start_server = websockets.serve(accept, "lo..
websocket_client.py ############################################################### #!/usr/bin/env python # WS client example import asyncio import websockets async def hello(): uri = "ws://localhost:8765" async with websockets.connect(uri) as websocket: name = input("What's your name? ") await websocket.send(name) print(f"> {name}") greeting = await websocket.recv() print(f"< {greeting}") async..
## REST_ FUL 셋팅 import requests import json from bs4 import BeautifulSoup as bs tt = input API_HOST = 'http://localhost:8080/' _headers = {'Authorization': 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36'} def req(path, query, method, data={}): url = API_HOST + path if method == 'GET': return requests.get(url, heade..
testBot001.py # import modules from telegram.ext import (Updater, CommandHandler, MessageHandler, Filters,) import logging from melon_rank import show_music_rank # print(show_music_rank()) print('kase',show_music_rank) # Enable logging logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) logger = logging.getLogger(__name__) #My bot token from Bot..