<s> """<STR_LIT>""" <EOL> import os <EOL> DEFAULT_DOMAIN = '<STR_LIT>' <EOL> DEFAULT_PROTOCOL = '<STR_LIT>' <EOL> BIGML_DOMAIN = os . environ . get ( '<STR_LIT>' , DEFAULT_DOMAIN ) <EOL> BIGML_PROTOCOL = os . environ . get ( '<STR_LIT>' , <EOL> DEFAULT_PROTOCOL ) <EOL> BIGML_SSL_VERIFY = os . environ . get ( '<STR_LIT>' ) <EOL> BIGML_PREDICTION_DOMAIN = os . environ . get ( '<STR_LIT>' , <EOL> BIGML_DOMAIN ) <EOL> BIGML_PREDICTION_PROTOCOL = os . environ . get ( '<STR_LIT>' , <EOL> DEFAULT_PROTOCOL ) <EOL> BIGML_PREDICTION_SSL_VERIFY = os . environ . get ( '<STR_LIT>' ) <EOL> class Domain ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , domain = None , prediction_domain = None , <EOL> prediction_protocol = None , protocol = None , verify = None , <EOL> prediction_verify = None ) : <EOL> """<STR_LIT>""" <EOL> self . general_domain = domain or BIGML_DOMAIN <EOL> self . general_protocol = protocol or BIGML_PROTOCOL <EOL> if prediction_domain is None : <EOL> if domain is not None : <EOL> self . prediction_domain = domain <EOL> self . prediction_protocol = protocol or BIGML_PROTOCOL <EOL> else : <EOL> self . prediction_domain = BIGML_PREDICTION_DOMAIN <EOL> self . prediction_protocol = BIGML_PREDICTION_PROTOCOL <EOL> else : <EOL> self . prediction_domain = prediction_domain <EOL> self . prediction_protocol = prediction_protocol or BIGML_PREDICTION_PROTOCOL <EOL> self . verify = None <EOL> self . verify_prediction = None <EOL> if self . general_protocol == BIGML_PROTOCOL and ( verify is not None or BIGML_SSL_VERIFY is not None ) : <EOL> try : <EOL> self . verify = verify if verify is not None else bool ( int ( BIGML_SSL_VERIFY ) ) <EOL> except ValueError : <EOL> pass <EOL> if self . verify is None : <EOL> self . verify = self . general_domain . lower ( ) . endswith ( DEFAULT_DOMAIN ) <EOL> if self . prediction_protocol == BIGML_PROTOCOL and ( prediction_verify or BIGML_PREDICTION_SSL_VERIFY is not None ) : <EOL> try : <EOL> self . verify_prediction = prediction_verify if prediction_verify is not None else bool ( int ( BIGML_PREDICTION_SSL_VERIFY ) ) <EOL> except ValueError : <EOL> pass <EOL> if self . verify_prediction is None : <EOL> self . verify_prediction = ( <EOL> ( self . prediction_domain . lower ( ) . endswith ( DEFAULT_DOMAIN ) and <EOL> self . prediction_protocol == DEFAULT_PROTOCOL ) ) </s>
