분류
-
Docker: 윈도우에서 ssh 연결로 간단한 Docker VM 만들기컴퓨터/소프트웨어 2021. 3. 28. 20:16
Docker 1. 준비물 Docker, 윈도우에서 쓸 ssh 윈도우10 에서 CMD로 SSH 접속하기 (Windows 10 SSH) SSH 뜻: 시큐어 셸(Secure Shell, SSH) charging.tistory.com 2. 할 것 가끔 코딩을 할 때 linux에서만 가능한 부분이 있다. 이럴 때 듀얼 부팅을 하거나 VMWare를 사용할 수 있는데 Docker라는 툴을 이용해서 작고 빠른 가상 환경을 만들어 볼 것이다. 아래 결과물은 윈도우에서 생성한 Debian을 VSCode에서 ssh로 연결해서 데비안 환경으로 코딩하고 실행하는 모습이다. 이렇게 하면 VMWare나 듀얼 부팅으로 데비안 실행 후 파일 옮겨서 할 필요 없다. 가상 OS에 연결해서 윈도우안에서 VSCode로 코딩하면 끝이다. (터..
-
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를 안 한다. (&, >,