Title

加速github文件下载
github文件下载加速

使用 直接在 copy 出来的文件 url 或者 https clone 地址前加https://gh.api.99988866.xyz/ 即可 比如

git clone https://gh.api.99988866.xyz/https://github.com/hunshcn/gh-proxy.git

go get 超时, 使用以下方法解决

#linux 下
export GO111MODULE=on
export GOPROXY=https://goproxy.cn
go get -u -v github.com/gin-gonic/gin

http和rpc的区别

HTTP 就是一种 RPC,你通过一定的方法去调用 HTTP 服务器上的某个 procedure,执行完以后把结果返回给你。 
有的时候我们嫌标准 HTTP 太慢/太复杂/不适合特定场景,那么就自己发明一个新的。 

Python约瑟夫圆环的解法
现在有13个人围成一个环,从1开始报数,数到3的人离开,写出程序计算最后剩下的是谁

def josephus(alist, k=1, m=3):
   # alist: 要循环的列表 [1, 2,3, 4,5]
   # k: 从编号为k的人开始
   # m: m为报数
   if len(alist) > 1:
       index, step = k - 1, m
       index = (index + step -1) % len(alist)
       alist.pop(index)
       return josephus(alist, index+1, m)
   else:
       return alist[0]

斐波那契数列

def fib(num):
    a, b = 0, 1
    for i in xrange(num):
        yield b
        a, b = b, a+b
原文地址:https://www.cnblogs.com/guotianbao/p/12559494.html