else: print "_" * 80, "\n" print "Invalid choice!!!!!\n\n" print "_" * 80, "\n" elif choice == '3': while True: print "*" * 80, "\n" print "\n1.form Image\t 2.From PNR No 3.Back" choice = raw_input("Enter your choice:\t") if choice == '1': print "_" * 80, "\n" TC().extract() print "_" * 80, "\n" elif choice == '2': print "_" * 80, "\n" TC().validate() print "_" * 80, "\n" elif choice == '3': break else: print "_" * 80, "\n" print "Invalid choice!!!!" print "_" * 80, "\n" elif choice == '4': break else:
## ## Importing the rest of ZSI. import version def Version(): return version.Version from writer import SoapWriter from parse import ParsedSoap from fault import Fault, \ FaultFromActor, FaultFromException, FaultFromFaultMessage, \ FaultFromNotUnderstood, FaultFromZSIException import TC TC.RegisterType(TC.String, minOccurs=0, nillable=False) TC.RegisterType(TC.URI, minOccurs=0, nillable=False) TC.RegisterType(TC.Base64String, minOccurs=0, nillable=False) TC.RegisterType(TC.HexBinaryString, minOccurs=0, nillable=False) #TC.RegisterType(TC.Integer) #TC.RegisterType(TC.Decimal) for pyclass in ( TC.IunsignedByte, TC.IunsignedShort, TC.IunsignedInt, TC.IunsignedLong, TC.Ibyte, TC.Ishort, TC.Iint, TC.Ilong,
# connectivity matrix for structured Ward connectivity = kneighbors_graph(X, n_neighbors=params['n_neighbors'], include_self=False) # make connectivity symmetric connectivity = 0.5 * (connectivity + connectivity.T) # ============ # Create cluster objects # ============ import TC import kernel tempL = [0.1] rbkdict = {x: TC.TC("rbk", 2) for x in tempL} for i in rbkdict: rbkdict[i].ker = kernel.kernel("rbk", [i]) clustering_algorithms = [("TC " + str(i), rbkdict[i]) for i in tempL] for name, algorithm in clustering_algorithms: t0 = time.time() # catch warnings related to kneighbors_graph with warnings.catch_warnings(): warnings.filterwarnings( "ignore", message="the number of connected components of the " + "connectivity matrix is [0-9]{1,2}" + " > 1. Completing it to avoid stopping the tree early.",