Skip to content

Instantly share code, notes, and snippets.

View YaoC's full-sized avatar
🏠
Working from home

C.YAO YaoC

🏠
Working from home
View GitHub Profile
@YaoC
YaoC / rcu_demo.c
Created May 14, 2017 09:36
Linux内核第四次作业
/**
* @Author: ChengYao
* @Created time: 2017年5月14日 下午5:08
* @Email: chengyao09@hotmail.com
* @Description: Linux内核第四次作业
*
*/
/**
* [thread_writer description]
@YaoC
YaoC / grades.py
Created July 4, 2017 08:16
分数到成绩的对应
import bisect
def grade(score, breakpoints=[60, 70, 80, 90], grades='FDCBA'):
i = bisect.bisect(breakpoints, score)
return grades[i]
if __name__ == '__main__':
grades = [grade(score) for score in [33, 99, 77, 70, 89, 90, 100]]
@YaoC
YaoC / Dockerfile
Created July 29, 2019 06:24
fio test
FROM centos:7
RUN yum install -y libaio-devel fio && \
yum clean all && \
rm -rf /var/cache/yum
package main
import (
"bufio"
"bytes"
"encoding/hex"
"encoding/json"
"fmt"
"io"
"os"