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数据特征分析”

WiFi安全初识笔记 / WiFi Security Elementary Learning Note

  • [WARNING] 这份笔记记录于作者对无线技术的了解基本为0的阶段。
  • Goal: 针对身份认证、数据传输等可能存在无线安全性的问题做基本了解。旨在了解各个基本概念、常用技术手段的粗略轮廓以及常用攻击策略。欢迎纠错~
  • 查阅了很多资料,有重新总结后记录的,有部分拷贝的,全部列在文尾。
  • Linux系统可以用iwaircrack-ng两个packages辅助学习。

Continue reading “WiFi安全初识笔记 / WiFi Security Elementary Learning Note”

算法设计与分析笔记0x09 —— 网络流

Max-flow and Ford-Fulkerson Algorithm

  • 网络流是一个有向图,源点s,汇点t
  • 每条边流量f(e)不能超过容量c(e)
  • 守恒: 指向结点的流量之和($\sum_{e\,in\,to\, v}f(e)=\sum_{e\,out\,of\,v}f(e)$)等于流出结点的流量之和 (except source and sink points)
  • 流的值: 流出源点的流量综合 $v(f)=\sum_{e\,out\,of\,s}f(e)$.
  • Max flow problem 找到 s-t flow 使其流的值最大
  • Greedy algorithm: 局部最优, 非全局最优.
    • Start with f(e) = 0 for all edge e ∈ E.
    • Find an s-t path P where each edge has f(e) < c(e).
    • Augment flow along path P.
    • Repeat until you get stuck.

Continue reading “算法设计与分析笔记0x09 —— 网络流”