전체 글
-
Go언어: Generics 이용하기 (v1.17+)컴퓨터/Go language 2021. 3. 24. 22:22
The Go Programming Language Download Go Binary distributions available for Linux, macOS, Windows, and more. // You can edit this code! // Click here and start typing. package main import "fmt" func main() { fmt.Println("Hello, 世界") } Hello, World! Conway's Game of Life Fibonacci golang.org Go 1.17 버전 이상 Generic이 드디어 생겼다. (욕먹던 부분) type X interface로 지정 후 또는 (any로 모든 타입 받을 수 있음) 자바처럼 T로 사용하면 된다. 1...
-
C언어: 간단한 REST api 웹 서버 만들어보기컴퓨터/C & C++ 2021. 3. 9. 16:57
Kore Introduction · Kore 4.0.0 documentation No results matching "" docs.kore.io 1. 소개 Kore는 C언어로 사용할 수 있는 웹 프레임워크이다. (Python 버전도 있음) 아래 웹 프레임워크 벤치마크에 따르면 35위로 되어있는데 (Go언어 gin은 48위) concurreny 256, 512 기준은 activej 아래인 2위일 정도로 역시 C언어 속도는 대단한 것 같다. 10위권도 못 들 정도로 역시 REST api로 쓰기엔 적합하진 않다 the-benchmarker/web-frameworks Which is the fastest web framework? Contribute to the-benchmarker/web-frameworks ..
-
C언어: url HTML 가져오기 (C에서 Python 사용하기)컴퓨터/C & C++ 2021. 3. 8. 20:03
libcurl libcurl - the multiprotocol file transfer library libcurl - the multiprotocol file transfer library libcurl is a free and easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, curl.se C언어는 libcurl을 이용해서 http request를 할 수 있다. 그런데 html을 가져와서 modest 엔진이나 google의..
-
Golang: 카카오 챗봇 API 응답 JSON 빌더 헬퍼 모듈컴퓨터/Go language 2021. 2. 21. 13:44
The Go Programming Language Download Go Binary distributions available for Linux, macOS, Windows, and more. // You can edit this code! // Click here and start typing. package main import "fmt" func main() { fmt.Println("Hello, 世界") } Hello, World! Conway's Game of Life Fibonacci golang.org 소개 아래 글을 참고해보면, Golang으로 챗봇 서버를 만들면 빠르지만 파이썬처럼 dictionary를 쉽게 사용할 수 없기 때문에 Golang: gin으로 카카오 챗봇 서버 만들기 gin ..
-
Python: Google TTS 오디오 재생하기컴퓨터/파이썬 2021. 2. 17. 19:50
gTTS gTTS (Google Text-to-Speech), a Python library and CLI tool to interface with Google Translate text-to-speech API pypi.org 1. 설치 pip install gTTS pip install pydub pip install simpleaudio 2. TTS 예제 import os from glob import glob from io import BytesIO from gtts import gTTS from pydub import AudioSegment from pydub.playback import play def tts(word, toSlow=True): tts = gTTS(text=word, lang=..
-
Golang: soup를 이용한 네이버 날씨 정보 가져오기컴퓨터/Go language 2021. 2. 14. 17:49
Go The Go Programming Language Download Go Binary distributions available for Linux, macOS, Windows, and more. // You can edit this code! // Click here and start typing. package main import "fmt" func main() { fmt.Println("Hello, 世界") } Hello, World! Conway's Game of Life Fibonacci golang.org 1. 크롤링 우선 데이터를 가져올 사이트는 다음과 같다. ?cpName=ACCUWEATHER을 넘겨서 아큐웨더 제공자 사용함 (아주대 지역 날씨) 네이버 날씨 국내외 날씨와 미세먼지에 대..
-
Golang: JSON <, >, & HTML 기호 escape 하기컴퓨터/Go language 2021. 2. 9. 15:42
Go The Go Programming Language Download Go Binary distributions available for Linux, macOS, Windows, and more. // You can edit this code! // Click here and start typing. package main import "fmt" func main() { fmt.Println("Hello, 世界") } Hello, World! Conway's Game of Life Fibonacci golang.org 기본적으로 Marshal은 HTML 기호들을 escape를 안 한다. (&, >,
-
RustPython: Rust로 작성된 파이썬 인터프리터컴퓨터/Rust 2021. 2. 7. 20:01
RustPython RustPython/RustPython A Python Interpreter written in Rust. Contribute to RustPython/RustPython development by creating an account on GitHub. github.com 1. 소개 Microsoft, Google 등 여러 회사로부터 점점 사랑받고 있는 메모리 안정성 좋은 Rust 이 Rust로 작성된 파이썬 인터프리터가 있어서 얼마나 빠를지 테스트해볼 것이다. (개발 단계라 많이 느림) 2. 설치 Git으로 clone한 다음 cargo로 실행하면 바로 target/debug/rustpython.exe가 생긴다. $ git clone https://github.com/RustPytho..