Code highlight and LaTex math formula in markdown file editing in VSC and post processed by Nodejs.

Image by Andrew Zhu, afternoon sunset in Issaquah, WA

Enable code highlight and Math formulas in Visual Studio Code

```python
def func():
print("hello python")
```


import pandas…


How we can use TF-IDF to give weights # to text data, and figure out why the result from scikit-learn is different compare with formula from Textbooks

Image by Andrew Zhu, my son, Charles’s lego board



The Rabbit And The Turtle — By Charles Zhu, my 6 years old son

People said Python is slow, how slow it can be

import numpy as np
np.random.seed(0)
values = np.random.randint(1, 100, size=1000000)
def get_reciprocal(values):
output = np.empty(len(values))
for i in range(len(values)):
output[i] = 1.0/values[i]
%timeit get_reciprocal(values)
3.37…


CODEX


Build a User Friendly Chart with Matplotlib

Two plotting styles, but which one to use?

import matplotlib.pyplot as plt
(fig, ax) = plt.subplots()
ax.plot([1, 2, 3, 4], [1, 4, 2, 3])
import matplotlib.pyplot as plt
plt.plot([1, …


Use Regular Expression in Python


What happens when PIP install a package

pip install <pkg_name>
/home/<user_name>/.local/lib/python3.x/site-packages

Import from where


The smile of Mona Lisa

Andrew Zhu

Daddy of two kids, husband and Data Scientist @ Microsoft, Redmond.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store