Skip to content

Instantly share code, notes, and snippets.

MARKET_DATA_DIR='/media/nnesterov/data_files/milton/output/indidump_v2_20sec_al/'
mlid = cppmft.MlidReader(MARKET_DATA_DIR)
mlid.send(json.dumps(dict(action='seek_to_first_ts_gte', seek_ts=misc.date_to_epoch_micros(misc.ensure_date(20230101)))))
v4_pf_dict=dict(patch_from="binance", patch_to="binancefut", limited_median_default_ct=32)
time_grid = cppmft.FixedTimeGrid2( 10.*60.*1000.*1000., #react every 10 minutes
24.*60.*60.*1000.*1000.,
0.)
pf = cppmft.PfReader(mlid, time_grid, json.dumps(v4_pf_dict))
fsr = fut_spot_strat.FutSpotStratReader('{}', pf)
class ColArrayReader:
def __init__(self, columns, array):
""" a simple reader that wraps column names and array in a reader """
if not isinstance(columns, cppmft.NSCols):
cb = cppmft.ColBuilder()
for c in columns:
cb.add(c)
self.columns = cppmft.NSCols(cb)
self.columns = columns
@kaykurokawa
kaykurokawa / Instruction for QMK usage on YMDK Split 64 using linux
Last active January 9, 2023 07:47
QMK usage on YMDK Split 64 using linux
This is all the steps required to use QMK on YMDK Split 64: https://ymdkey.com/products/ymdk-split-64-sp64-cnc-aluminum-case-plate-hot-socket-hot-swap-pcb-underglow-rgb-fully-programmable-diy-kit
Install qmk : https://docs.qmk.fm/#/newbs_getting_started
Setup proper priviledge to communicate with keyboard bootloader device: https://docs.qmk.fm/#/faq_build?id=linux-udev-rules
Set up your own keymap folder or choose available pre-built keymap in ~/qmk_firmware/keyboards/ymdk/sp64/keymaps
Run 'qmk flash -kb ymdk/sp64 -km default' with your desired keymap folder replacing 'default'
Unplug device , press down left control (bottom left most key) while plugging the device back in to put the keyboard in a flashable state. Note some older versions of Split 64 may require you to press down the escape (top left most key).
Flashing should finish. Plug in and out your keyboard and the new keymaps should be working.
@kaykurokawa
kaykurokawa / .vimrc
Last active September 4, 2019 05:18
.vimrc
" .vimrc file (must be named _vimrc)
"pathogen
execute pathogen#infect()
set ts=4 shiftwidth=4 "tab wdith set to 2 or 4
set expandtab
"colorscheme evening
syntax on
@kaykurokawa
kaykurokawa / claimtrienormalize_tests.cpp
Created September 26, 2018 23:20
Test the normalization function
#include "claimtrie.h"
#include "test/test_bitcoin.h"
#include <boost/test/unit_test.hpp>
using namespace std;
BOOST_FIXTURE_TEST_SUITE(claimtrienormalize_tests, RegTestingSetup)
@kaykurokawa
kaykurokawa / lbrycrdd_crash_tester.py
Created July 9, 2018 00:34
test lbrycrdd crashes
import subprocess
import json
from bitcoinrpc.authproxy import AuthServiceProxy
import time
lbrycrd_rpc_user = 'test'
lbrycrd_rpc_pw = 'test'
lbrycrd_rpc_ip = '127.0.0.1'
lbrycrd_rpc_port = '9245'
import subprocess
import json
from bitcoinrpc.authproxy import AuthServiceProxy
import time
# Change this to lbrycrd binary location
LBRYCRD_BIN_LOCATION = 'src/lbrycrdd'
lbrycrd_rpc_user = 'test'
lbrycrd_rpc_pw = 'test'
lbrycrd_rpc_ip = '127.0.0.1'