Tag Archives: Python

Bokeh – A Python package to create figure & UI

To plot figure in Python, matplotlib is an native module. Now there is another good option, Bokeh, https://docs.bokeh.org/en/latest/index.html. Bokeh is Python lib, which core module is written by JS.

Using Bokeh, you can create more interactive & beautiful user interface using build-in models, or even using native html script (I like). This is a snapshot I use Bokeh to display candlestick using selected date range, and also update information in a table (integrating native html script).

Candlestick plot using Bokeh

How to setup PostgreSQL in Python

  • Install Psycopg2 package in Python
pip install psycopg2 or
pipenv install psycopg2 (virtual python environment)
  • Install postgresql in Ubuntu
sudo apt update
sudo apt install postgresql postgresql-contrib
  • After successfully install postgresql, the default role is postgres. So when you connect postgresql service in your own Ubuntu user, you cannot connect it, reporting the username not in the role. Thus create a role using your own username, and add your username in ROLE of postgres
psql postgres 

postgres=# CREATE ROLE ubuntu_username superuser;
postgres=# ALTER ROLE ubuntu_username WITH LOGIN;
  • In python, connect postgresql, e.g.
import psycopg2

conn = psycopg2.connect("dbname=test user=user_name")

Learning Python, a step closing to AI – 8

If you are interested in AI, machine learning, master a programming language is a must. Python is top-1 language for its simplicity and many third-party packages available that allow you develop your own product and funny application. Coding transfers your ideas to real application and product.

I will share some slides when teaching my child and his friends. Learning coding through practice, try – wrong – correct bug – ok, let you quick catch up main concept, syntax and behaviors.

Each course has exercise and code. if you are interested, please contact me.

Learning Python, a step closing to AI – 7

If you are interested in AI, machine learning, master a programming language is a must. Python is top-1 language for its simplicity and many third-party packages available that allow you develop your own product and funny application. Coding transfers your ideas to real application and product.

I will share some slides when teaching my child and his friends. Learning coding through practice, try – wrong – correct bug – ok, let you quick catch up main concept, syntax and behaviors.

Each course has exercise and code. if you are interested, please contact me.

Learning Python, a step closing to AI – 5

If you are interested in AI, machine learning, master a programming language is a must. Python is top-1 language for its simplicity and many third-party packages available that allow you develop your own product and funny application. Coding transfers your ideas to real application and product.

I will share some slides when teaching my child and his friends. Learning coding through practice, try – wrong – correct bug – ok, let you quick catch up main concept, syntax and behaviors.

Each course has exercise and code. if you are interested, please contact me.

Learning Python, a step closing to AI – 6

If you are interested in AI, machine learning, master a programming language is a must. Python is top-1 language for its simplicity and many third-party packages available that allow you develop your own product and funny application. Coding transfers your ideas to real application and product.

I will share some slides when teaching my child and his friends. Learning coding through practice, try – wrong – correct bug – ok, let you quick catch up main concept, syntax and behaviors.

Each course has exercise and code. if you are interested, please contact me.

Learning Python, a step closing to AI – 4

If you are interested in AI, machine learning, master a programming language is a must. Python is top-1 language for its simplicity and many third-party packages available that allow you develop your own product and funny application. Coding transfers your ideas to real application and product.

I will share some slides when teaching my child and his friends. Learning coding through practice, try – wrong – correct bug – ok, let you quick catch up main concept, syntax and behaviors.

Each course has exercise and code. if you are interested, please contact me.

Learning Python, a step closing to AI – 3

If you are interested in AI, machine learning, master a programming language is a must. Python is top-1 language for its simplicity and many third-party packages available that allow you develop your own product and funny application. Coding transfers your ideas to real application and product.

I will share some slides when teaching my child and his friends. Learning coding through practice, try – wrong – correct bug – ok, let you quick catch up main concept, syntax and behaviors.

Each course has exercise and code. if you are interested, please contact me.

Learning Python, a step closing to AI – 2

If you are interested in AI, machine learning, master a programming language is a must. Python is top-1 language for its simplicity and many third-party packages available that allow you develop your own product and funny application. Coding transfers your ideas to real application and product.

I will share some slides when teaching my child and his friends. Learning coding through practice, try – wrong – correct bug – ok, let you quick catch up main concept, syntax and behaviors.

Each course has exercise and code. if you are interested, please contact me.

Learning Python, a step closing to AI – 1

If you are interested in AI, machine learning, master a programming language is a must. Python is top-1 language for its simplicity and many third-party packages available that allow you develop your own product and funny application. Coding transfers your ideas to real application and product.

I will share some slides when teaching my child and his friends. Learning coding through practice, try – wrong – correct bug – ok, let you quick catch up main concept, syntax and behaviors.

Each course has exercise and code. if you are interested, please contact me.