Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

backtest = function(filename, traindata, alldata, algo, learn, skip_train_count) {
# ... omit
return(list(train_buy_cnt=train_buy_cnt, test_buy_cnt=test_buy_cnt,
t11=t[1,1], t12=t[1,2], t21=t[2,1], t22=t[2,2],rate=rate, earn=earn))
# Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, :
# arguments imply differing number of rows: 1, 0
}
main <- function(report_file, stk_cnt, data_cnt, algo_cnt, learn_cnt) {
# ... omit
br = backtest(infile, dat$traindata, dat$alldata, i_algo, i_learn, 250)
@dlintw
dlintw / PKGBUILD
Created March 22, 2017 00:42 — forked from anonymous/PKGBUILD
# Maintainer: Daniel YC Lin <dlin.tw@gmail.com>
pkgname=tarantool-avro-schema
_pkgname=avro-schema
pkgver=2.0
pkgrel=1
pkgdesc='Apache Avro schema tools for Tarantool'
arch=(i686 x86_64)
url='http://github.com/tarantool/avro-schema'
license=(BSD)
@dlintw
dlintw / build log
Created February 28, 2017 23:08
missing gcin-dev
...
install -m 644 zh_CN/gcin.gmo /home/dlin/aports/testing/gcin/pkg/gcin/usr/share/locale/zh_CN/LC_MESSAGES/gcin.mo
make[1]: Leaving directory '/home/dlin/aports/testing/gcin/src/gcin-2.8.4/po'
>>> gcin-dev*: Running split function dev...
>>> gcin-dev*: Preparing subpackage gcin-dev...
/usr/bin/abuild: cd: line 2315: can't cd to /home/dlin/aports/testing/gcin/pkg/gcin-dev
>>> ERROR: gcin-dev*: Missing /home/dlin/aports/testing/gcin/pkg/gcin-dev
>>> ERROR: gcin*: prepare_subpackages failed
>>> ERROR: gcin: all failed
abuild -i 183.34s user 16.02s system 68% cpu 4:51.97 total
141 dlin@cfw5 ~/aports/testing/synergy (git)-[new-synergy] % git log --pretty=oneline | head :(
0ea39cd660288eddf6a005553db7de8afafa3380 Added synergy package and depend packages
542c18c4739f7c612f81b0f695e771aefb25cb4c Revert "testing/ghc: temporarily disable on armhf since the bootstrap package is not yet available"
dlin@cfw5 ~/aports/testing/synergy (git)-[new-synergy] % git push origin new-synergy
To https://github.com/dlintw/aports
! [rejected] new-synergy -> new-synergy (non-fast-forward)
error: failed to push some refs to 'https://github.com/dlintw/aports'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
dlin@cfw5 ~/aports/testing/synergy (git)-[heads/master] % git co new-synergy
Checking out files: 100% (2082/2082), done.
Previous HEAD position was c2fdb8a1ee... Added synergy package and depend packages
Switched to branch 'new-synergy'
dlin@cfw5 ~/aports/testing/synergy (git)-[new-synergy] % vim APKBUILD
dlin@cfw5 ~/aports/testing/synergy (git)-[new-synergy] % git diff
diff --git a/testing/synergy/APKBUILD b/testing/synergy/APKBUILD
index 92bb179bc3..7d0d0c10ae 100644
--- a/testing/synergy/APKBUILD
+++ b/testing/synergy/APKBUILD
@dlintw
dlintw / APKBUILD
Created February 27, 2017 04:46
strange abuild failed at line 8
# Contributor: Daniel YC Lin <dlin.tw@gmail.com>
# Maintainer: Daniel YC Lin <dlin.tw@gmail.com>
pkgname=synergy
pkgver=1.8.7
pkgrel=1
pkgdesc='Share a single mouse and keyboard between multiple computers'
url='https://symless.com/synergy/'
arch=('x86' 'x86_64')
license=('GPL2')
depends=('gcc-libs' 'libxtst' 'libxinerama' 'libxkbcommon-x11' 'avahi' 'curl' 'openssl')
$ lsmod|grep dvb :(
smsdvb 20480 3
dvb_core 94208 1 smsdvb
smsmdtv 49152 2 smsdvb,smsusb
$ pacman -Q w_scan
w_scan-20161022-1
$ w_scan
w_scan version 20161022 (compiled for DVB API 5.10)
@dlintw
dlintw / gist:29652985c24fb85959f4e2cb61299f3d
Created February 12, 2017 03:32
Simple test for browsers memory usage
Test in Arch Linux by ps -ef and login www.shanbay.com
chromium 56.0.2924.87-1
xombrero 1.6.4-5
min 1.5.1-1
RSS SIZE VSZ command
143,584 180,388 2,574,768 xombrero
447,612 892,584 5,636,312 /usr/lib/electron/electron
1,232,760 1,934,004 13,264,756 /usr/lib/chromium/chromium
1,208,668 1,815,096 13,371,500 /usr/lib/chromium/chromium # login by about:blank
@dlintw
dlintw / helloworld.tla
Created January 30, 2017 16:06
hello world of +cal (pluscal language)
---- MODULE helloworld ----
EXTENDS TLC
(*
--algorithm helloworld
begin print "Hello, world."
end algorithm
*)
====
@dlintw
dlintw / .vimrc
Created January 19, 2017 03:59
Simplified vim settings with 'dein' plugin manager
" vim:et sta sw=2 ts=2
" d=~/.vim/dein/repos/github.com/Shougo/dein.vim ; mkdir -p $d
" git clone https://github.com/Shougo/dein.vim $d
scriptencoding utf-8
" let big5 file happier under utf8 environment
set fileencodings=ucs-bom,utf-8,big5,gbk,latin1
set nocompatible
set runtimepath+=~/.vim/dein/repos/github.com/Shougo/dein.vim