Skip to content

Instantly share code, notes, and snippets.

View tsekityam's full-sized avatar
🏘️
Working from home

Tse Kit Yam tsekityam

🏘️
Working from home
View GitHub Profile
data/lp data/vl data/trading_time
1118.14 0 20170208_160000
1119.48 0 20170209_160000
1120.37 0 20170212_160000
1118.3 0 20170213_160000
1115.34 0 20170214_160000
1110.27 0 20170215_160000
1112.92 0 20170216_160000
1108.17 0 20170219_160000
1115.66 0 20170220_160000
### Keybase proof
I hereby claim:
* I am tsekityam on github.
* I am tsekityam (https://keybase.io/tsekityam) on keybase.
* I have a public key ASCNJa4IBi9k_Bijim45r6nWvrJMHRKid7ISr8C1K522rwo
To claim this, I am signing this object:
  1. add the following code to ~/bash_profile
# Enable GPG keys for SSH Auth
if [ -f "${HOME}/.gpg-agent-info" ]; then
     . "${HOME}/.gpg-agent-info"
       export GPG_AGENT_INFO
       export SSH_AUTH_SOCK
       export SSH_AGENT_PID
fi
/*******************************************************************************
* Student part begin
******************************************************************************/
//predict sigma points
//avoid division by zero
//write predicted sigma points into right column
for (int i = 0; i < 2 * n_aug + 1; i++) {
VectorXd x = Xsig_aug.col(i);
let first = 0
let last = dataSource.lines.lines.count
let missing = dataSource.lines.computeMissing(first, last)
for (f, l) in missing {
Swift.print("requesting missing: \(f)..\(l)")
// output: requesting missing: 0..1
_ = dataSource.document.sendRpc("request_lines", params: [f, l])
}
import pickle
import cv2
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
# Read in the saved camera matrix and distortion coefficients
# These are the arrays you calculated using cv2.calibrateCamera()
dist_pickle = pickle.load( open( "wide_dist_pickle.p", "rb" ) )
mtx = dist_pickle["mtx"]
@tsekityam
tsekityam / Scintilla #1879.md
Last active November 2, 2016 10:14
Scintilla / Bugs / #1879 weird background colour of line with a marker on a zero width margin
  • How to reproduce:

    1. Add the following code to ScintilaTest xcode project, AppController.mm, - (void) setupEditor method.

// Marker setup. [mEditor setGeneralProperty: SCI_SETMARGINWIDTHN parameter: 1 value: 0]; [mEditor setGeneralProperty: SCI_MARKERDEFINEPIXMAP parameter: 0 value: (sptr_t)box_xpm]; [mEditor setGeneralProperty: SCI_MARKERADD parameter: 0 value: 0];

1. Run the project
@tsekityam
tsekityam / opml.xml
Created October 18, 2016 14:01
A simple opml template for adding new feed to AOL Reader
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>AOL Reader add feed helper</title>
</head>
<body>
<outline type="rss" text="NYT > Home Page" title="NYT > Home Page" xmlUrl="http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml" htmlUrl="http://www.nytimes.com/pages/index.html?partner=rss&emc=rss"/>
</body>
</opml>
@tsekityam
tsekityam / resetLaunchpad.sh
Created October 13, 2016 15:54
simple script for reset Launchpad on macOS
defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock
@tsekityam
tsekityam / mainwindow.cpp
Created October 12, 2016 04:34
Demo toggle line with text displayed
// mainwindow.cpp
// Testing code for port of Scintilla to Qt.
// Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware
#include <QtGui>
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
#include <QFileDialog>
#endif
#include "mainwindow.h"