Linode published $5 VPS


Get $5 Linode

Linode 1G/20GB for $5/month

Solving 404 error of Nginx

location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to index.html
                #try_files $uri $uri/ =404;
                try_files $uri $uri/ @typecho;

location @typecho {
                fastcgi_pass unix:/var/run/php-fpm.sock;
                fastcgi_param SCRIPT_FILENAME $document_root/index.php;
                include fastcgi_params;

Install RQAlpha

Installing the package

# Installing
pip install -U pip setuptools cython
pip install bcolz
pip install rqalpha

# Check the version
rqalpha version

Update the history price

rqalpha update_bundle

Install TA-Lib

Install the source file first

If there is not TA-Lib on the server, there will be error when directly install from pip. Just like this:

talib/common.c:242:10: fatal error: 'ta-lib/ta_defs.h' file not found
    #include "ta-lib/ta_defs.h"
    1 error generated.
    error: command 'gcc' failed with exit status 1

The solution is to install the source file in the Linux first, and then use the pip to install it to python environment.

# Download the source file and unzip it
tar -xzf ta-lib-0.4.0-src.tar.gz
cd ta-lib

# Install the source file
./configure --prefix=/usr
make install

Install the python package via pip

pip install ta-lib

In python, simply import the package:

import talib


Juypter Notebook in Docker container
System: Debian
Python: 3.6

Step 1

Download font file:

And store in the following path:

Stpe 2

Modify the configuration file:

sudo vim /opt/conda/lib/python3.6/site-packages/matplotlib/mpl-data/matplotlibrc

Remove the # infront of and font.sans-serif.

Add Microsoft YaHei at the line of font.sans-serif.

Stpe 3

Remove the cache file of matplotlib:
rm ~/.cache/matplotlib/fontList.py3k.cache

Final Step

Restart python, or close and reopen notebook


If not working on Ubuntu, try to copy the ttf file to /usr/share/fonts



Careful! These question can make you think THRICE!
Here is the link to the source

Machine learning and data science are being looked as the drivers of the next industrial revolution happening in the world today. This also means that there are numerous exciting startups looking for data scientists. What could be a better start for your aspiring career!

However, still, getting into these roles is not easy. You obviously need to get excited about the idea, team and the vision of the company. You might also find some real difficult techincal questions on your way. The set of questions asked depend on what does the startup do. Do they provide consulting? Do they build ML products ? You should always find this out prior to beginning your interview preparation.

To help you prepare for your next interview, I’ve prepared a list of 40 plausible & tricky questions which are likely to come across your way in interviews. If you can answer and understand these question, rest assured, you will give a tough fight in your job interview.

Note: A key to answer these questions is to have concrete practical understanding on ML and related statistical concepts.

40 interview questions asked at startups in machine learning

Read more »

Launch the container

I choose this image: jupyter/datascience-notebook.
Its quite large (7.53 GB). But it has many packages pre-installed:

  • For python: pandas, matplotlib, scipy, seaborn, scikit-learn, scikit-image, sympy, cython, patsy, statsmodel, cloudpickle, dill, numba, bokeh
  • For R: plyr, devtools, shiny, rmarkdown, forecast, rsqlite, reshape2, nycflights13, caret, rcurl, and randomforest

Read more »