Skip to content

Instantly share code, notes, and snippets.

View lookis's full-sized avatar

Jingsi lookis

  • 快手
  • BeiJing
  • 21:15 (UTC +08:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am lookis on github.
  • I am lookis (https://keybase.io/lookis) on keybase.
  • I have a public key whose fingerprint is AAA0 29AF 6ACE 5604 8917 D0DA 6038 D951 DE43 0E91

To claim this, I am signing this object:

@lookis
lookis / gist:81136a37ba0c8bed37f5
Created September 4, 2014 09:00
Mysql Create User
CREATE USER 'jeffrey'@'localhost' IDENTIFIED BY 'mypass';
GRANT ALL ON db1.* TO 'jeffrey'@'localhost';
flush privileges;
@lookis
lookis / gist:77bf0ee3ba762b1bfbd4
Last active February 21, 2021 10:13
代码管理与规范

代码工作流程

1.先把要修改的工程fork到自己的github账号上.

2.在具体解决某个issue之前,先在自己的工程里创建一个分支,分支名字建议和issue的id相关以方便自己维护

3.在这个分支上具体解决该issue, 自己做好review之后提交一个pull-request

4.在pull-request被merge之前,如果需要解决一个新的issue,就再建立新的branch来工作,如果临时需要修改之前的那个提交,记得切换回刚才的branch

import pandas as pd
import numpy as np
import talib
import tushare as ts
import datetime
def timing(df):
r = []
for index, row in df.iterrows():
if(index != len(df.index) - 1 and (row['low'] < df.iloc[[index + 1]]['low']).tolist()[0] and (row['high'] > df.iloc[[index + 1]]['high']).tolist()[0]):
gotmp () {
cd `mktemp -d`
}
@lookis
lookis / gist:c198ccde7b8741c19d3e4c749cc4bee0
Created November 29, 2017 06:24
Remo Omni Sync Server Directory
echo -n "To remove your OmniPresence data, please enter your Omni Sync Server account name: "; read OSSACCOUNT; curl -v --request DELETE --location-trusted --digest --user "$OSSACCOUNT" "https://sync.omnigroup.com/$OSSACCOUNT/usage"
@lookis
lookis / setup.md
Created January 17, 2018 09:52 — forked from novemberborn/setup.md
OS X Redirect ports 80 and 443 to 8080 and 8443 respectively

Changes with .dev domains in mind.

Create /etc/pf.anchors/dev, containing:

rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443

@lookis
lookis / pypy3-fix
Last active March 1, 2020 07:05
fix tk 8.6 in pypy3
/usr/local/Cellar/pypy3/7.3.0/libexec/lib_pypy/_tkinter
mv tklib_cffi.pypy36-pp73-darwin.so tklib_cffi.pypy36-pp73-darwin.so.bak
cp ~/Downloads/pypy3.6-v7.3.0-osx64/lib_pypy/_tkinter/tklib_cffi.pypy36-pp73-darwin.so .
@lookis
lookis / gist:87bbd6e8d55a016a0e5436f4ebaa2815
Last active March 27, 2021 04:13
安装 zipline 1.4.1
参考 dockerfile 的安装:
使用 python 3.5.10 (需要补丁)
brew install openssl bzip2 readline
安装 python
CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib"
pyenv install --patch 3.x.x < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1)
安装zipline所需库依赖
# Best Shadowrocket Rules (https://github.com/h2y/Shadowrocket-ADBlock-Rules)
# by Moshel
# build time: 2021-03-29 02:33:16
[General]
bypass-system = true
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local, e.crashlytics.com, captive.apple.com
bypass-tun = 10.0.0.0/8,100.64.0.0/10,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.0.0.0/24,192.0.2.0/24,192.88.99.0/24,192.168.0.0/16,198.18.0.0/15,198.51.100.0/24,203.0.113.0/24,224.0.0.0/4,255.255.255.255/32
dns-server = system, 114.114.114.114, 112.124.47.27, 8.8.8.8, 8.8.4.4
[Rule]