算法设计与分析笔记0x0E —— Part 3 NP完全

Partitioning Problems

3-Dimensional Matching

3D-MATCHING. Given n instructors, n courses, and n times, and a list of the possible courses and times each instructor is willing to teach, is it possible to make an assignment so that all courses are taught at different times?
3D-MATCHING. Given disjoint sets X, Y, and Z, each of size n and a set T X × Y × Z of triples, does there exist a set of n triples in T such that each element of X Y Z is in exactly one of these triples?

Continue reading “算法设计与分析笔记0x0E —— Part 3 NP完全”

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.

Continue reading “Sketchy OAuth2 & Docker & SSH”

Python 数据分析与展示笔记目录

python数据分析与展示 – 第三周/单元八/Pandas数据特征分析

和单元七一样,直接从课件中整理笔记。

数据排序

  • .sort_index()方法在指定轴上根据索引进行排序,默认升序
    • .sort_index(axis=0, ascending=True)
    • For DataFrame, first argument is some index or columns by which data is sorted.
    • NaN统一放在排序末尾

Continue reading “python数据分析与展示 – 第三周/单元八/Pandas数据特征分析”