#! /usr/bin/env python3 # def hello ( ): #*****************************************************************************80 # ## hello() tries to load keras, say hello, and exit. # # Discussion: # # Why? Because on some systems, it is almost impossible to load keras. # This program is so small that it eliminates many excuses for the failure. # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 22 July 2020 # # Author: # # John Burkardt. # import keras import numpy as np import platform import tensorflow print ( '' ) print ( 'hello():' ) print ( ' python version: ' + platform.python_version ( ) ) print ( ' numpy version: ' + np.version.version ) print ( ' tensorflow version: ' + tensorflow.__version__ ) print ( ' keras version: ' + keras.__version__ ) print ( ' Apparently, we were able to load keras!' ) print ( '' ) print ( ' Hello, world!' ) # # Terminate. # print ( '' ) print ( 'hello():' ) print ( ' Normal end of execution.' ) return def timestamp ( ): #*****************************************************************************80 # ## timestamp() prints the date as a timestamp. # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 21 August 2019 # # Author: # # John Burkardt # import time t = time.time ( ) print ( time.ctime ( t ) ) return if ( __name__ == '__main__' ): timestamp ( ) hello ( ) timestamp ( )