Dev's Logging

Welcome to my blog !


Labels in Go

Published at April 5, 2019 ·  1 min read

label 在 Golang 中的用法,在 Python 没有接触过这种用法,在 Golang 见到略懵 Labels in Go...

GET vs POST

Published at April 5, 2019 ·  1 min read

较为完整的总结了 GET 和 POST 的区别 GET vs POST...

Design a Parking Lot

Published at April 2, 2019 ·  1 min read

提车场的面向对象设计方案 Design a Parking Lot...

RBAC——基于角色的访问控制

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——基于角色的访问控制...

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...

Tags

abcs accept acid activemq affinity algorithm allocation android array async aws b+tree b-tree backoff benchmark best-practices bfs big-o bigquery bind bitcount blog break broker bubble buffer cache cap cert cgroups channel citus class classmethod closure closures cluster concurrency config consumer container context cookie cors crawler cronjob csrf ctr data-science data-structure database datadog dataflow datascience decorator defer dfs distributed django dns docker double-shipping drf ecosia elastic-search enumerate epoll errgroup escaping extra fabric2 facebook-pixel financial-report flask flutter forward-proxy freelance frontend frp garbage-collector gc gcp generator gesture get gil git golang goroutine graphql ha handbook haproxy hash hash-slot hashring hashtable hpa http http-auth http-proxy http_proxy https index init innodb instagram intergration interview ios javascript jinja2 jobboard jwt k8s kafka kibana kqueue label lambda layer4 layer7 lean levels.io linked-list linux list listen loadbalancer logs long-tail lru marketing master matplotlib memory merge metaclass metaprogramming metrics metrics-server microservices mitm mobile model mq myisam mysql namespace nat netflix network-extension nginx nodejs nomad nosql npm oodesign openssl optimization orm pandas parallelism paramiko parkinglot patroni permission pg pipeline pixelme post postgresql postresql prefetch_related prerender private-key process proxy proxycommand put pvm python queue rabbitmq rbac react-native reactive reactjs rebase redis redis-cluster replication resource rest restfulapi retargeting retry revenue reverse-proxy rocketmq rsa rxswift saas scaffold scaleable search-engine security select seo serverless service session set shadosocks shadowsocks shard sharding shell shopify sigint signal sigterm slack slave slow-query sniper sns socket socks5 source-code spa sql sqlalchemy sqs ssh ssl ssl-pinning stack startup state stateful stateless staticmethod string struct swift swiftui switch syscall system-design systemctl tcp tcp-proxy thread tmpreaper token traefik trustkit tunning type typeform udp userdefaults variable vc voidcallback vpn vuejs weak web web-development where widget yarn zset 削峰 宽索引 异步 看源码学-golang 窄索引 解耦 跨域 跳板机


Archives

2019 (157)