[Go] Ch1: Go Basics - 08 Concurrency

Concurrency Go provides concurrency features as part of the core language. This module goes over goroutines and channels, and how they are used to implement different concurrency patterns. 複習: Concurrency and Parallelism Goroutines A goroutine is a lightweight thread managed by Go runtime. goroutine是輕量級的執行緒(lightwe

[DS] Build JupyterHub with docker

JupyterHub Use Docker to build a JupyterHub for multiple users Notices Before your start to build a JupyterHub with docker, please download the relative file at example. Enable HTTPS (SSL encryption) Generate a self-signed certificate with openssl, as below: create a self-signed certificate. For example, the following command will create a certificate valid for 365 days with both the key and certificate data written to the same file: $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout jupyterhub.

[Go] Ch1: Go Basics - 07 Methods and Interfaces

Methods and Interfaces Learn how to define methods on types, how to declare interfaces, and how to put everything together. Methods (方法) Go does not classes. However, you can define methods on types. A method is a function with a special receiver argument. The receiver appears in its own argument list between the func keword and the method name. Example The Abs() method has a receiver of