Linode published $5 VPS

pricing-1G-2.png

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;
        }

Introduction

Sci-Hub is a website with over 64.5 million academic papers and articles available for direct download. It bypasses publisher paywalls by allowing access through educational institution proxies. Sci-Hub stores papers in its own repository, and additionally the papers downloaded by Sci-Hub are also stored in Library Genesis (LibGen). From Wiki

Here is a note of how to build a reverse proxy to the sci-hub.cc just for personal use.

Envioronment

  • Linux
  • Docker
  • Nginx image

Read more »

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
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
tar -xzf ta-lib-0.4.0-src.tar.gz
cd ta-lib

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

Install the python package via pip

pip install ta-lib

In python, simply import the package:

import talib

Envirenment

Juypter Notebook in Docker container
System: Debian
Python: 3.6

Step 1

Download font file:
https://github.com/kent119/Toolkit__python-tools/raw/master/msyh.ttf

And store in the following path:
/opt/conda/lib/python3.6/site-packages/matplotlib/mpl-data/fonts/ttf

Stpe 2

Modify the configuration file:

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

Remove the # infront of font.family 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

Notes

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

Reference:

https://www.zhihu.com/question/25404709/answer/128171562

Introduction

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 »