Skip to content

Instantly share code, notes, and snippets.

@Cphilo
Cphilo / a.py
Last active June 3, 2022 05:14
Snapshot proto file read test
from libs.walter_protobuf.python import message_pb2
import delimited_protobuf
from google.protobuf.json_format import Parse
class ProtobufParser:
def get_messages(self, proto_file, header_market=True):
f_in = open(proto_file, "rb")
if header_market:
market = delimited_protobuf.read(f_in, message_pb2.Market)
@Cphilo
Cphilo / test_protobuf_parser.py
Last active May 7, 2022 02:35
Test proto read.
import json
import gzip
import os
from libs.walter_protobuf.python import message_pb2
import delimited_protobuf
from google.protobuf.json_format import Parse
def wrap_into_message(trade_or_orderbook)->message_pb2.Message:
message = message_pb2.Message()
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDaWdVTgPD/t8jpyt8C1OSw80tJd7ZQ55qeHaf9g3v5kPZHaUDuvnLfIKuRJ3BS7DOUw4rfCEaEY5NUy0/oCVVnRogxf1cKRB6ePgHEbb4Le1NPk3dcidsHWZr3mCB5kaLoBYAWZ/kIVJGsjHzz3QY5+RjPhEH6Jcb6mhSFt7ZudJJMxLBthid7pZhbzyNxH+f62Qu3Fn/bHsMG4ppKtJ1JNHmZl1dEpKHHBBCUPxQAF1mo5R7tIlrrrJTEvtml97FTEtIpa/zf+qUrNlC0VF9wq4KuECzrI7t4FAn6w3h5+xU3yn+On4byfBtLF3cI11Ajpbv9lxEaecG1yMpfJAGZgTGtgUOmHnLhTEdK57pqCZwcdLQIIAvfYG6aUf7wzLDKyzDq9EttY9nJKY9jUI/tiM3NoLp660cmcgQc5SmQbLu6K1AXaAKGNxkKeAdW2WgiiaywjSiDVTbn+l+lJOJ2JkuoqLvCGFTNEt0y7OowXJM6Pwh1HKyHLCNehM0RY2S0Nm4Uj8CtlU4U5uQvovM/qAU+okCGT7O8pIcYCdPflL1e+xvABEyRbFNxWgj3mbX1veTWYb5wqfAw6THYfusyiOTbJ9rlgHtE4j8MmBmaH5zVZwa1eV+CG6trHUfGmn+UM828QqlGkBkzEb68G22A17zc1Yi3RhakYvt1GQJ3/Q== cphilo@qq.com
@Cphilo
Cphilo / gist:c0404ecef2a991cd5387b2dfefb788d3
Created March 29, 2017 17:17
2017-03-29T16_44_39_042Z-debug.log
This file has been truncated, but you can view the full file.
0 info it worked if it ends with ok
1 verbose cli [ '/home/vagrant/.nvm/versions/node/v7.8.0/bin/node',
1 verbose cli '/home/vagrant/.nvm/versions/node/v7.8.0/bin/npm',
1 verbose cli 'install',
1 verbose cli 'electron',
1 verbose cli '--save-dev' ]
2 info using npm@4.4.4
3 info using node@v7.8.0
4 verbose config Skipping project config: /home/vagrant/.npmrc. (matches userconfig)
5 silly loadCurrentTree Starting
@Cphilo
Cphilo / .vimrc
Created June 16, 2016 14:03
vim config
" 设置tab键可以移动块状代码
vmap <Tab> >gv " 设置tab键可以移动块状代码
vmap <S-Tab> <gv
@Cphilo
Cphilo / gist:27fba8bc6720c0800d60a0d634264dd3
Created May 30, 2016 01:09 — forked from entaroadun/gist:1653794
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation:

@Cphilo
Cphilo / xhstyle.css
Created May 7, 2016 09:01
This is a customize bootstrap css style designed by Xiaohua Li.
label {
font-weight: normal !important;
}
/* span link css start */
.table>tbody>tr>td.operation {
color: #64b8e8;
}