• ## Mesos Architecture in Brief

### Incentive

Before coming to Mesosphere as an intern, I read the mesos paper and have a general understanding of it’s architecture, well none of these understanding is based on actual code. After 1.5 month in Mesosphere, contributing some code to the project, it’s necessary to connect both the general flow and code logic together.

### Background

Mesos Architecture

There has been a pretty well explanation of different roles and relationships between these important components in Mesos.

In brief, we have several important concepts: Master, Agent/Slave, Framework (consisting of Scheduler and Executor). Master and Agent nodes are physical or virtual machines in datacenter. Master node is responsible for scheduling tasks (this “task” is our general understanding of task, meaning “a specific work to do, such as running a Spark job”, which is different from the definition of “task” in Mesos project), Agent node is responsible for running task. In order to scheduler and execute tasks in this distributed system, it’s necessary to have corresponding parts on both Master and Agent doing scheduling and executing work respectively. We call it Framework as a whole. The part that’s working on the Master node is called scheduler, the other part working on the Agent node is called executor. From this perspective, it’s pretty easy to understand how do these two names come from.

Since there might be multiple kind of tasks to run, we sometimes need to run multiple Frameworks (thus multiple schedulers, executors components) on Mesos, thus on the Master node, there might multiple schedulers, on Agent node, there might be multiple executors.

... more
• ## Rvalue Reference

### Background

Rvalue reference:

• An rvalue reference is a reference that will bind only to a temporary object.

std::move, std::forward

• std::move
* takes an object and allows you to treat it as a temporary (an rvalue)

• std::forward
* has a single use case: to cast a templated function parameter (inside the function) to the value category (lvalue or rvalue) the caller used to pass it.
* This allows rvalue arguments to be passed on as rvalues, and lvalues to be passed on as lvalues, a scheme called "perfect forwarding."


operator =

• default implementation for operator= is copy
* it copies each member, it’s calling the constructor that accepting the type on the right of the operator=
* for example for base_string, the 7th constructor:
* basic_string( const basic_string& other );
* Copy constructor. Constructs the string with the copy of the contents of other.

• Thus in order for the the class type to accept rvalue reference, it should also have a constructor accepting a rvalue reference
* and the constructor should be implemented by std::move
* see the 8th constructor


move constructor

• Move constructors typically “steal” the resources held by the argument (e.g. pointers to dynamically-allocated objects, file descriptors, TCP sockets, I/O streams, running threads, etc.) rather than make copies of them
... more
• ## Intro to Convolutional Neural Network (Personal Notes)

This is my personal note when I study convolutional neural network by myself. The main motivation for this blog is to record some core concept and design choice of convolutional neural work. Although today’s neural network has much similar structure (conv, fc, dropout, lrn ..etc.). Much of these design choices are tried and tested by many generations of researchers. I was strongly wondering about these choice, so when I first implement the AlexNet, I stoped in the second line and decided to figure out reasons for these choices.

### Incentive

• Convolutional Neural Networks (CNN) are biologically-inspired variants of MLPs.
• Two basic cell types have been identified: Simple cells respond maximally to specific edge-like patterns within their receptive field. Complex cells have larger receptive fields and are locally invariant to the exact position of the pattern.
... more
• ## Classic Nets & LeNet Analysis

This is one of the very first convolutional neural networks, many of the important concepts origin from this paper. It discussed through the whole process of abstracting digit recognition problem, choosing machine learning method, utilizing back propagation, analysis and utilizing convolutional neural network and finally construct the network.

The LeNet5 architecture was fundamental because of several core concepts:

• image features are distributed across the entire image
• convolutions with learnable parameters are an effective way to extract similar features at multiple location with few parameters
• This is in contrast to using each pixel as a separate input of a large multi-layer neural network. LeNet5 explained that those should not be used in the first layer, because images are highly spatially correlated, and using individual pixel of the image as separate input features would not take advantage of these correlations.
... more
• ## Classic Nets & AlexNet Structure and Analysis

This is the first utilization of convolutional neural network that achieve state of art result in the image classification competition (ILSVRC). Amazingly, the accuracy of Alexnet exceeds previous record by large scale (16.4% top-5 error rate compared to 26.2% in previous record). Driven by the convolutional neural network, there are huge advantages over mannual-implemented filters/classifiers. While there are still some challenges such as the selection of activation functions, overcoming overfitting. Below are my brief note about the analysis of AlexNet: the structure and techniques utilized by the neural network.

### Layer Construction:

• Layer 0: Input image
* Size: 227 x 227 x 3
* Note that in the paper referenced above, the network diagram has 224x224x3 printed which appears to be a typo.

• Layer 1: Convolution with 96 filters, size 11×11, stride 4, padding 0
* Size: 55 x 55 x 96
* (227-11)/4 + 1 = 55 is the size of the outcome
* 96 depth because 1 set denotes 1 filter and there are 96 filters

... more

... more

## Project GoMarkdown

This is a Google-Doc-like online document collaboration web application. Instead of supporting complicated Word document formating or simple plaint text format, we chose to implement a flexible, widely-used format: Markdown. In order to make it fully customized, I decided to implement all syntax by myself, this left room for more customized syntax. In this project, I am mainly responsible for the websocket communication, Markdown syntax parse and data synchronization. Thanks for efficient and funny collaboration with Jiupeng, Lu and Shiyue :)

### Project Brief

• Description: A online collaborative markdown editor that support real-time synchornized edit of multiple users
• Related Techques: Javascript, Python, Websocket, Syntax tree, Django
• Features & Markdown Parse: real-time, line-based parse without referencing any other libraries. supported syntax include: heading, code block, list, nested list, bold, hyper text, underline, image.
• Feature & Collaborative Editing: edit operation synchronize with all other users, utilize different types of operations to represent operations. Restore cursor position to avoid cursor conflict
• Feature & File Management: Support document create, update, delete and access control
• Duration: 2016.09 - 2016.12
• Team member: Hongkun Leng, Rui Lu, Jiupeng Sun, Shiyue Liu
... more
• ## Django Tutorial Quick Reference

### Django Tutorial for Beginners

This is a brief tutorial for Django setup, only critical steps are noted, it aims serve as a quick reference when you want to setup a Django project or when yo forget some part of it. For more detailed information, please see official tutorial

#### Create a Project

• \$ django-admin startproject [project name]

... more
• ## 开学第一个月

很快第一个月就过去了。上飞机之前对当初憧憬着的这片土地曾有过无数幻想。教学楼会是怎么样？三年没上课的我面对呼啸而来的课程会是什么反应？这片诞生了无数神奇人物和事物的地方会给自己怎样的影响？在一群工科男里自己的厨艺是否可以带来一些不同？短短一个月里，大多数的疑问都很快有了答案。

#### 安全感和生活方式

这一个月里对生活质量的容忍程度让自己都感到惊讶。曾经每天晒太阳喝咖啡的自己突然开始每天八点半起床一天学习十四个小时，曾经为了吃一餐饭纠结一上午的自己突然将就着炒个饭凑合一天，也不记得活动范围多久没有超出过学校和住所一公里了，然而每天的重复和重复并没有让自己感到厌倦，这份执着像是无尽的油井，支撑着整个人的运转。在找到安全感之前，我的生活是保守的，几乎没有娱乐，没有休息，没有工作和生存必须之外的任何事情。我不确定这种生活方式是否可持续，但我可以确信的是目标不远了。

... more
• ## CMU 租房指南

#### 前言

虽然文章内容是我整理出来的，但最主要的工作是和可爱的室友们一起完成的，非常感谢这样一群可爱的室友~。如果你觉得指南里有不够完善或者不够准确的地方请指出，也欢迎加入我们一起完善这份文档，给以后的学弟学妹（尤其是学妹）提供有价值的信息~

BTW，我们通过这套指南里的方法找到了性价比超高的一套房子，现在刚好却一个室友（五缺一），如果你是一个有生活态度的人，一个有责任感的人，或者一个有趣的人，欢迎加入~

合作编辑：冷宏坤（蒜苗白菜-INI-Mobility）、丁晓都（胖胖胖丁）、姚逸云（姚托尼）、陈同广等等

1）房子的分类及区别

• Apartment
• House
• Studio
... more