Ben Chuanlong Du's Blog

It is never too late to learn.

Use Tkinter to Build GUI Applications in Python

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Installation

Tkinter should be available by default after Python is installed. However, please continue read if you encounter the following error.

import _tkinter # If this fails your Python may not be …

Tips on Public Speech

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Talk Slowly (2x slower than usual)

  2. Invite Questions

  3. Excited!!!

  4. Fun

  5. Mention people's name (gave people credit)

Incognito Mode for Browsers

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

The incognito mode is important for browsers for a few reasons.

  1. Testing purpose
  2. Some apps (e.g., secure emails) can only be used in incognito mode.

Chrome

Firefox

Format a Flash Drive in a Linux Virtual Machine

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Install VirtualBox.

  2. Create a Ubuntu virtual machine.

  3. Install extension package.

  4. enable USB support

  5. select the flash drive you want to format to connect to the VM.

  6. use linux commands to format …

Numpy Arrays in Python

Tips and Traps

  1. The Pythonic way of checking whether a collection (string, list, set, dict, etc.) coll is non-empty is to use if coll. However, do NOT use if arr to check whether a numpy array is non-empty or not. Instead, you shoule use arr.size >0 to check whether a numpy array is non-empty or not.

Hive SQL

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Hive is case-insensitive, both keywords and functions

  2. You can use both double and single quotes for strings

  3. use = rather than == for equality comparison but it seems that == also works

  4. use % rather …