How to convince your friends vertical farming is the next big thing

The Urban Vertical Farming Project

Sign up here for more exclusive vertical farming access.

Can resilient, regenerative agriculture refresh the ecological condition of our planet?  It can, and vertical farms can help us.

Why Vertical Farms-

View original post 1,403 more words

Advertisements
Posted in Uncategorized | Leave a comment

Easy way to capture Android network packets

tPacketCapture is the easy way to capture Android network packets. It sets up an VPN to do this, so root isn’ t required. It generates standard pcap files that can be analysed on PC with tools like wireshark.

Posted in Uncategorized | Leave a comment

Note on using OneHotEncoder in scikit-learn to work on categorical features

OneHotEncoder is used to transform categorical feature to a lot of binary features. The fit method takes an argument of array of int. But one thing not clearly stated in the document is that the np.max(int_array) + 1 should be equal to the number of  categories. Otherwise, if you have discrete integers, some very large, you will have a huge memory leak. And get Memory Error.

So the best way is to use LabelEncoder() first to convert discrete integers to a continuous integer set with a smaller max value:

encoder = sklearn.preprocessing.OneHotEncoder()
label_encoder = sklearn.preprocessing.LabelEncoder()
data_label_encoded = label_encoder.fit_transform(data['category_feature'])
data['category_feature'] = data_label_encoded
data_feature_one_hot_encoded = encoder.fit_transform(data[['category_feature']].as_matrix())

Then a sparse matrix containing one hot encoded categorical feature is generated.

Posted in Uncategorized | Leave a comment

Shadowsocks搭在ramnode seattle 简直酸爽

http://wuchong.me/blog/2014/10/17/digitalocean-vps-experience/

还有ipv6地址。

Posted in Uncategorized | Leave a comment

Solve Mathematica 10 install error

CRITICAL FAILURE: PrintIntroduction() Error
$ProductTitle not defined.

Copy the installer sh file to a directory with no space.

Posted in Math, Program | Tagged | 1 Comment

Introduction to Backtesting library in the Systematic Investor Toolbox

Systematic Investor

I wrote a simple Backtesting library to evaluate and analyze Trading Strategies. I will use this library to present the performance of trading strategies that I will study in the next series of posts.

It is very easy to write a simple Backtesting routine in R, for example:

The code I implemented in the Systematic Investor Toolbox is a bit longer, but follows the same logic. It provides extra functionality: ability to handle multiple securities, weights or shares backtesting, and customized reporting. Following is a sample code to implement the above strategies using the backtesting library in the Systematic Investor Toolbox:

The bt.prep function merges and aligns all symbols in the data environment. The bt.apply function applies user given function to each symbol in the data environment. The bt.run computes the equity curve of strategy specified by data$weight matrix. The data$weight matrix holds weights (signals) to open/close positions. The

View original post 79 more words

Posted in Uncategorized | Leave a comment

An explanation on ADF test

http://stats.stackexchange.com/questions/44647/which-dickey-fuller-test-should-i-apply-to-a-time-series-with-an-underlying-mode#

Posted in Uncategorized | Leave a comment