#NEWLINE# def put_deltas_to_server( delta , master_url = 'localhost:5000' ) : #NEWLINE# #INDENT# '\n    Update master parameters with deltas from training process\n    ' #NEWLINE# request = urllib2 . Request ( 'http://{0}/update' . format ( master_url ) , pickle . dumps ( request , ( - 1 ) ) , headers = { #NEWLINE# #INDENT# 'Content-Type' : 'application/elephas' , #NEWLINE# #UNINDENT# } ) #NEWLINE# return urllib2 . urlopen ( request ) . read ( )