Sketchy OAuth2 & Docker & SSH

I wrote this post for Environment Setup & Basic Knowledge for Data Science. (of course under Ubuntu16.04, but also other Debian systems should be OK)

For python, I’ve written a series of notes. https://today2tmr.com/2017/07/18/python-爬虫学习笔记目录/ https://today2tmr.com/2017/12/13/python-数据分析与展示笔记目录/

OAuth2

Authorization Grant Types
Refer to http://www.ruanyifeng.com/blog/2014/05/oauth_2_0.html

  • 授权码模式 Authorization Code
    • User-Agent applies for code
    • Client uses code to apply for token
  • 简化模式 Implicit
    • Client applies for token directly
  • 密码模式 Resource Owner Password Credentials
    • User tells Client password to apply for authorization.
  • 客户端模式 Client Credentials
    • Client applies for authorization in the name of itself.

Docker Base

I pull continuumio/anaconda3 and run conda install scrapy for my special container for data science.

Doc: https://docs.docker.com/

  • docker pull + remote registry
  • docker images to list images
  • docker ps to list running containers
  • docker cp container_id:path local_path or docker cp local_path container_id:path to move files between host and container
  • docker run -it image /bin/bash run image as a container with bash
  • <CTRL-P-Q> to exit container without closing it
  • <CTRL-D> to exit and close a container
  • docker commit container_id image_name:tag to store container
  • docker rmi image to remove image
  • docker stop container_id to stop a container
  • docker rm $(docker ps -q -a) to remove all containers

SSH Base

Leave a Reply

Your email address will not be published.