laike9m.com
最近的几个面试 - laike9m's blog
https://laike9m.com/blog/zui-jin-de-ji-ge-mian-shi,71
AUG 6TH, 2015. 基 本 都 在 问 项 目 我简历上的每个项目至少讲了两遍。 是怎么创建的( (゚Д゚;) )。 一文中的观点,他用 指令集并行 的例子反驳了并行是属于并发的说法,并且指出 并发 是逻辑上的, 并行 是物理上的,两者并没有包含关系。 WHAT THE FUCK 于是就没有面。 题说实话不难,但是描述得非常含糊,第一题我 clarify 了五分钟,第二题 clarify 了超过十分钟。 7:20 的时候我还在就第二题到底是什么意思反复和面试官讨论,这可是限定在 45 分钟内完成的面试啊 我急了,面试官也急了。 我能感觉到她非常不理解我为什么不能理解题意,但是我 TM 就是不能理解啊 没办法了,我说,我给这样的一个输入,你能不能告诉我应该输出什么 最后终于终于通过举一个例子弄清了题意,我发现我之前想得太复杂了。 一个去了 Google 的师兄叮嘱我, 一定要 10、11 月再面试,8、9 月好多大牛都挂了。 拿到 Offer 的基本都是 10、11 月面的。 但是今年 Google 听说是缩招了,要求内推的人必须 8 月份面试完。 Hi, I'm laike9m.
laike9m.com
laike9m's blog
https://laike9m.com/blog/talks
Concurrent.futures: history, usage, internal, future. A 30-minutes talk I gave at PyCon2014 China(Beijing). I tried to make clear why. Is brought into Python beyond how to use it, explore the internal implementation of. And finally explained why we should use it. 在 PyCon2014 北京场做的主题演讲,主要针对 Python3.2引入的. FBT客户端内幕 Node.js 和 node-webkit. A talk at OpenCAS seminar. I talked about the technology we use to build FBT client. 在中科院开源软件协会技术交流会上的演讲,关于 Python HTTP 相关任务,也概述了 HTTP 的基础知识。 And Python Context Manager.
laike9m.com
PyCon2015 笔记 - laike9m's blog
https://laike9m.com/blog/pycon2015-bi-ji,66
MAY 16TH, 2015. 1 Type Hints - Guido van Rossum. 视频 https:/ www.youtube.com/watch? 主要就是讲 PEP 484 - Type Hints,通过 typing 这个模块,从 3.5 版本开始,Python 也可以做静态检查了 更新 实际上 3.5 里还不能做静态检查,只是加入了类型标记,参见 What's New In Python 3.5. 2 Raymond Hettinger - Beyond PEP 8 - Best practices for beautiful intelligible code. 视频 https:/ www.youtube.com/watch? 强烈推荐 Raymond Hettinger 的演讲适合所有层次的程序员看。 这个演讲说的是,我们都知道用 PEP8 来规范 Python 代码,但是这样是否就够了呢 我们可能忽视了一件更重要的事 Pythonic 这个演讲举了几个例子,怎么 make code more pythonic,比如使用 context manager,使用. Raymon...
laike9m.com
laike9m's blog
https://laike9m.com/2
JUL 16TH, 2016. 发布 zhihu-card 0.2.0. Cdnjsdelivr.net/zhihu-card/latest/widget.js ". 如果你有兴趣一起来改进,欢迎给项目提 issue 和 pr。 唯一的解决方法就是用一个 server 去获取用户信息,然后 zhihu-card 去访问 server。 Server 是拿 Go 写的,目前不开源,因为之后打算大改。 JUN 3RD, 2016. 上完课之后我就再也没碰过 GRE 的东西,为什么呢 因为根本没有余力去学,更重要的是,我意识到凭我的渣成绩根本不可能有学校要 即使连 GPA 都没算过。 去年 6 月 26 号的时候,同事前辈邀请我参与创业项目。 这种感觉在听了无数国外 PyCon 和参加了三次国内 PyCon 之后变得愈发强烈。 我不怀疑在 BAT 干五年能成为独当一面的工程师然后被安上个 架构师 的头衔,然而也就到头了,你能接触到把你带入各种核心开发者圈子的人吗 不能。 Robert Frost 在著名的 The Road Not Taken 中写道. 某天看见 Fenng 写的一个 答案. Crazy At...
laike9m.com
laike9m's blog
https://laike9m.com/blog/archive
Daemon is not daemon, but what is it? Posted in python,. 发布 zhihu-card 0.2.0. Posted in zhihu-card,. Posted in python, requests,. Requests secret: pool connections and pool maxsize. Posted in python, requests,. 解决 Mac 无法编译带 C 扩展库的问题. Posted in Mac,. Posted in website,. Posted in deploy,. Posted in iterator,. Posted in golang,. Posted in VPS,. Posted in python, super,. Useful Hack Lazy module attribute. Posted in python, import,. Posted in algorithm,. Posted in python, testing,. Ubuntu 运行 mongodb 的正确姿势.
laike9m.com
还在疑惑并发和并行? - laike9m's blog
https://laike9m.com/blog/huan-zai-yi-huo-bing-fa-he-bing-xing,61
MAR 1ST, 2015. OK,如果你还在为并发 concurrency 和并行 parallesim 这两个词的区别而感到困扰,那么这篇文章就是写给你看的。 OK,下面进入正题, concurrency vs parallesim. 并发 指的是程序的结构, 并行 指的是程序运行时的状态. 但是 Python 的多线程由于存在著名的 GIL,无法让两个线程真正 同时运行 ,所以实际上是无法到达并行状态的。 要理解 并发 这个概念,必须得清楚, 并发指的是程序的 结构. 正确的并发设计的标准是 使多个操作可以在重叠的时间段内进行(two tasks can start, run, and complete in overlapping time periods). 我们先看 操作 在重叠的时间段内进行 这个概念。 Task1, task2 是两段不同的代码,比如两个函数,其中黑色块代表某段代码正在执行。 但是,由于 task1 和 task2 在重叠的时间段内执行,所以这是一个支持并发的设计。 在重叠的时间段内进行 中的 可以 两个字。 Gopher is moe, but confusing.
laike9m.com
laike9m's blog
https://laike9m.com/blog
AUG 22ND, 2016. AUG 6TH, 2016. Daemon is not daemon, but what is it? A thread can be flagged as a daemon thread . The significance of this flag is that the entire Python program exits when only daemon threads are left. Daemon (Daemon Process)" is a notion in UNIX denoting a process detached from any controlling terminal, typically waiting for some event to occur and to respond to in some way. Windows services are similar but I assume Bil et alia chose deliberately a different word for them. The exit meth...
laike9m.com
理解 Python super - laike9m's blog
https://laike9m.com/blog/li-jie-python-super,70
AUG 5TH, 2015. Parent. init (self). 这种方式与super(Child, self). init. 不要一说到 super 就想到父类 super 指的是 MRO 中的下一个类. 不要一说到 super 就想到父类 super 指的是 MRO 中的下一个类. 不要一说到 super 就想到父类 super 指的是 MRO 中的下一个类. 忘记了这件事之后,再去看这篇文章 Python’s super() considered super! 这是 Raymond Hettinger 写的一篇文章,也是全世界公认的对. 讲解最透彻的一篇文章,凡是讨论 super 都一定会提到它 当然还有一篇 Python's Super Considered Harmful。 两个参数 cls 和 inst 分别做了两件事. 1 inst 负责生成 MRO 的 list. 2 通过 cls 定位当前 MRO 中的 index, 并返回 mro[index 1]. MRO 全称 Method Resolution Order,它代表了类继承的顺序。 This is Root ".
laike9m.com
laike9m's blog
https://laike9m.com/blog/about
Hi, I'm laike9m. I do a lot of different things. If you want to get in touch with me you can email me. Or find me on GitHub. I didn't really start programming before I became a Junior student. Since then, I've done a lot of different things, most of which are tools for my personal use, but you may find some useful too. You can take a look at my projects. To see some of the major stuff I've worked on, or look at my Github account. Supporter since high school. To learn more about my taste. Hi, I'm laike9m.