Building Asynchronized HTTP Services With Sanic

Python introduced async/await syntax from Python3.5. it makes your code non-blocking and speedy. Developers can use it to build a high-performance / NIO web services like NodeJS. Most of the Python web developers are familiar with Flask. But unfortunately flask has no plan to support the async request headers. Sanic is a Flask-like webserver that’s written to go fast. It was inspired by uvloop.

Read More

Several Important Concepts of CNN

A trained convolutional layer is made up of many feature detectors, called filters, which slide over an input image tensor as a moving window. This is a very powerful technique and it possesses several advantages over the flatten and classify method or deep learning.

Read More

Tips for Hyperparameter Optimization

One of the biggest headaches of using deep neural networks is that they have tons of hyperparameters that should be optimized so that the network performs optimally. Below are some notes coming from Deep Learning Quick Reference.

Read More

Started to go through convnetjs

After reading several books about deep learning, now I can use keras / tensorflow to train some models, but the mathmatical implementations behind the libraries are still have to follow.

Read More

Scaling NodeJS Apps -- Archtectural Patterns

This is the notes when I read the book Scaling Your Nodej.js Apps.

Layered Architecture

It is based on the logistic seperation of concerns of your application (or platform) into layers. And the layers must comply with the following points:

Read More

Scaling NodeJS Apps -- The Need to Scale

This is the notes when I read the book Scaling Your Nodej.js Apps.

An increasing in incoming traffic could affect your system in different ways; we can describe these as direct or indirect.

Read More

JavaScript 机器学习之分类与聚合算法

聚类是接触无监督式学习时常见的一个问题。通常在你想将一个大的数据集重新编排组织成小的群组,或者是将其按逻辑相似性分解成小的群组时我们会考虑聚类。例如,你可以尝试将人口普查数据中的家庭收入分成三个群组:低收入,中等收入及高收入。如果你将家庭收的数据集做为指定的一种聚类算法的输入,你将期望得到三个数据聚点 及其对应的前述三个收入分组的平均值做为结果。即使是这种家庭收入数据的一维聚类问题,你也可能很难通过手动解决——难点在于无法快速地确定两个分组之间的边界值。你可能可以参考政府部门所定义的收入分组的标准,但无法确定这类定义的标准是几何均衡的; 这类的标准可能是被政策制定者所发明出来的,因此它可能无法精确地表达数据之间的正真关系。

Read More

Set up SSL for website with Nginx and StartSSL

If you enable HTTPS and set up the certifications correctly, which means data will not be decrypted or modified during the transportation. Today I try to enable SSL to my website. Here is what I did to make it happen:

Read More

我的一个夏日清晨,写在天津塘沽码头集装箱爆炸后

8月13日,东一区时间早晨六点多。

我朦胧着醒来,习惯性得拿起手机想看看刚回国的男朋友是在做什么。可还没来得及看他的留言,就被公共号订阅里面的一批文章炸醒了。这些天已经关闭了朋友全功能,是为了免去朋友圈刷屏和被刷屏的干扰,安心写作的。但这些一眼望去的小标题们——天津?爆炸?阴谋论?一线?核弹?——足够把我拉出本来就不够有定力的小世界。原来,天津塘沽码头集装箱发生了爆炸,周边数公里内的居民区都受到严重震摄,并且因为爆炸剧烈且有毒气体、液体蔓延,消防和救护都直接升级到牺牲的警戒线。还躺在床上,一个人,刷一些新闻、图片和视频。没说什么话也没人说话,也根本没想要说什么话。起床冲凉前,却发现,眼角已经不知觉得弄湿了枕巾一片。

Read More

走进人生的第一个十年

2015,我可以把它称作自己的第一个十年。当然,我不是十岁,这不是我的自然生命的第一个十年,而是我打算标记、也可以标记一下的第一个十年。同样,我也不是二十岁或三十岁,这样用十进制来做标记。甚至,这也不是我人生中有多么重要的一个标记——比如像娱乐圈人士走上星光大道的第几个十年,像穿过婚姻殿堂后的第几个十年,甚至开始工作后的第几个十年。真的都不是。如果一定要安置一个名头,那它是我离开家独自生活的第一个十年,也是我进入大学以后的第一个十年——并且我至今还未被放出来。

Read More