Skip to content

Instantly share code, notes, and snippets.

@mrhaoji
mrhaoji / cheatsheet.py
Created September 2, 2016 02:53 — forked from fuyufjh/cheatsheet.py
My Python Cheatsheet
Python Cheatsheet
=================
################################ Input & Output ###############################
name = input('please enter your name: ')
print('hello,', name)
ageStr = input('please enter your age: ')
age = int(ageStr)
# decision_tree.R
#
# Artificial Intelligence A Modern Approach (3rd Edition): Figure 18.5, page 702.
#
# Figure 18.5 The decision-tree learning algorithm
#
# Author: [email protected]
#
decision_tree <- function(class, examples)
{