"""A hello world.

Uses the main libraries to verify the environment installation.
"""

import sys

import numpy as np
import matplotlib.pyplot as plt
import pydensecrf.densecrf as crf
import SimpleITK as sitk
import tensorflow as tf
from tensorflow.python.platform import app


def main(_):

    print('Welcome to MIALab 2017!')

    # --- TensorFlow

    # Create a Constant op
    # The op is added as a node to the default graph.
    #
    # The value returned by the constructor represents the output
    # of the Constant op.
    hello = tf.constant('Hello, TensorFlow!')

    # Start tf session
    sess = tf.Session()

    # Run the op
    print(sess.run(hello).decode(sys.getdefaultencoding()))

    # --- SimpleITK
    image = sitk.Image(256, 128, 64, sitk.sitkInt16)
    print('Image dimension:', image.GetDimension())
    print('Voxel value before setting:', image.GetPixel(0, 0, 0))
    image.SetPixel(0, 0, 0, 1)
    print('Voxel value after setting:', image.GetPixel(0, 0, 0))

    # --- numpy and matplotlib
    array = np.array([1, 23, 2, 4])
    plt.plot(array)
    plt.ylabel('Some meaningful numbers')
    plt.xlabel('The x-axis')
    plt.title('Wohoo')

    plt.show()

    # --- pydensecrf
    d = crf.DenseCRF(1000, 2)

    print('Everything seems to work fine!')


if __name__ == "__main__":
    """The program's entry point."""

    app.run(main=main, argv=[sys.argv[0]])

@@ -214,67 +214,39 @@
 ort 
-tensorflow as tf%0Afrom tensorflow.python.platform import app
+sklearn.ensemble as sk_ensemble
 %0A%0A%0Ad
@@ -253,17 +253,16 @@
 ef main(
-_
 ):%0A%0A    
@@ -309,369 +309,93 @@
 --- 
-TensorFlow%0A%0A    # Create a Constant op%0A    # The op is added as a node to the default graph.%0A    #%0A    # The value returned by the constructor represents the output%0A    # of the Constant op.%0A    hello = tf.constant('Hello, TensorFlow!')%0A%0A    # Start tf session%0A    sess = tf.Session()%0A%0A    # Run the op%0A    print(sess.run(hello).decode(sys.getdefaultencoding())
+scikit-learn%0A    clf = sk_ensemble.RandomForestClassifier(max_depth=2, random_state=0
 )%0A%0A 
@@ -1050,43 +1050,11 @@
     
-app.run(main=main, argv=%5Bsys.argv%5B0%5D%5D
+main(
 )%0A

change TensorFlow to scikit-learn random forest