Skip to content

Instantly share code, notes, and snippets.

View rinh's full-sized avatar

rinh rinh

  • Qunar
  • Beijing, China
View GitHub Profile
import arrow
import asyncio
from pyppeteer import launch
from bs4 import BeautifulSoup
from pync import Notifier
import time
def parse_html(html_content):
@rinh
rinh / checker.md
Created February 3, 2020 03:28
checker

Checker

Checker的主要工作是, 要能根据一定的规则, 在接收到业务数据后, 以及产生薪酬数据后, 进行一系列的合理性校验

陈兴的经验

Review机制 
a) 常规性检查 
	i. 极值判断:当月最大值,当月最小值,与上月差异绝对值最大,包含业务数据与薪酬数据两个维度. 

ii. 实发为负数,是否满足当地最低工资标准(税后)

fixed = (num) ->
if num.length is 1 then "0" + num else num
_format = (line) ->
line.replace( /(\d+)/g , ($0, $1) ->
return fixed($1)
)
.replace /\./g , " "
format = (n) ->
@rinh
rinh / require.jison
Created February 5, 2013 04:49
使用jison进行语义分析,生成AST并修改源代码
%lex
%s l_comment req
%%
"/*" { this.begin('l_comment'); return 'L_COMMENT_START'; }
<l_comment>"*/" { this.popState(); return 'L_COMMENT_END'; }
<l_comment>(.|\n) { return 'L_COMMENT_CHR'; }