Published at April 5, 2019 · 1 min read
label 在 Golang 中的用法,在 Python 没有接触过这种用法,在 Golang 见到略懵 Labels in Go...
Published at April 5, 2019 · 1 min read
label 在 Golang 中的用法,在 Python 没有接触过这种用法,在 Golang 见到略懵 Labels in Go...
Published at April 1, 2019 · 1 min read
用 k8s 的 rbac 可以很好的说明 role based control。把 pod 当成用户的话,每个 pod 分别有 apiGroup, resources, verbs 三个大类,其中针对 verbs 则有七个的细分,如 get, list, watch, create, update, patch, delete 等操作 RBAC——基于角色的访问控制...
Be a more efficient data scientist, master pandas with this guide
Published at April 1, 2019 · 1 min read
做数据科学不可或缺的 pandas,常见命令和操作教程 Be a more efficient data scientist, master pandas with this guide...
Consistent Hash Rings Explained Simply
Published at April 1, 2019 · 1 min read
在 hashtable 中,如何有效解决动态增加删减节点所带来的一致性哈希问题。避免在一个节点一个值,而是一个节点存储多个key 的值。不要连续的命名地址,而是从 0 到无限之间随机取值。寻找比哈希后的值大的一个最小节点。 Consistent Hash Rings Explained Simply...
Python Metaclasses and Metaprogramming
Published at March 31, 2019 · 1 min read
python metaclass 和 metaprogramming 的一些特点,主要是通过 metaclass 更改原有 class 中 new,init,prepare,call 的默认属性以达到对新 class 的更改 Python Metaclasses and Metaprogramming...
Essential Python Interview Questions
Published at March 30, 2019 · 1 min read
由 Toptal 出的 python interview 问题,其中几个关键的分别为,1. 函数默认值的传值问题,默认值只在函数定义时执行过一次。2. lambda 闭包函数中的 late binding 问题,循环中只取最新的一个值,可以通过 generator,将 [] 换成 () ,解决。3. Python 继承类中的赋值问题,类的属性是以 dict 的形式保存,当子类中的属性不存在时,则向父类递归查询,直到查到或抛出 AttributeError 为止。当更改父类的属性时,若子类属性未做变更,查询子类相关属性时返回的未父类的属性值。4. [[]] * N 的操作并未生成包含 N 个 Item 的list,而是 N 个对应的引用,所以当改变某个 item 中的值时,改变的是其中所有 item 的值。 Essential Python Interview Questions...
How to Stand Out in a Python Coding Interview – Real Python
Published at March 30, 2019 · 1 min read
python interview 中的几个技巧,计算要多用 generator 以节省内存及提高计算效率,以及多用 enumerate 代替 range 获取 item 的同时得到 index How to Stand Out in a Python Coding Interview – Real Python...
Top 40 Python Interview Questions & Answers
Published at March 30, 2019 · 1 min read
python常见面试题及答案 Top 40 Python Interview Questions & Answers...