#!/usr/bin/env python3
#
# This script is used for downloading the dataset used by the examples.
# Dataset used: UCI / Pima Indians Diabetes (in libsvm format)

import os
import urllib.request


DATASET_URL = 'http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/diabetes'
TARGET_PATH = os.path.dirname(os.path.realpath(__file__)) + '/dataset.txt'


def main():
    urllib.request.urlretrieve(DATASET_URL, TARGET_PATH)


if __name__ == '__main__': main()

@@ -110,35 +110,24 @@
 ed: 
-UCI / Pima Indians Diabetes
+Statlog / Letter
  (in
@@ -175,16 +175,30 @@
 request%0A
+import random%0A
 %0A%0ADATASE
@@ -265,24 +265,52 @@
 ets/
-binary/diabetes'
+multiclass/letter.scale'%0ADATASET_SIZE = 1000
 %0ATAR
@@ -399,16 +399,28 @@
 ():%0A    
+rows = list(
 urllib.r
@@ -433,16 +433,12 @@
 .url
-retrieve
+open
 (DAT
@@ -449,21 +449,151 @@
 _URL
-, TARGET_PATH
+))%0A    selected = random.sample(rows, DATASET_SIZE)%0A    with open(TARGET_PATH, 'wb') as f:%0A        for row in selected:%0A            f.write(row
 )%0A%0A%0A

Change dataset used in example (letter)